SpaceAPI
Project: SpaceAPI | |
---|---|
Featured: | |
State | Active |
Members | Vicarious, CoolePascal |
GitHub | No GitHub project defined. Add your project here. |
Description | HackerSpace Status API |
Picture | |
No project picture! Fill in form Picture or Upload a jpeg here |
See hackerspaces.nl SpaceAPI website for details.
Done so far:
- Prepared the JSON object:
If ACKspace is open:
{ "api":"0.11", "space":"ACKspace", "logo":"https:\/\/ackspace.nl\/ACKspace.150px.png", "icon":{ "open":"https:\/\/ackspace.nl\/icon\/open.png", "closed":"https:\/\/ackspace.nl\/icon\/closed.png" }, "url":"https:\/\/ackspace.nl\/", "address":"Kloosterweg 1, 6411 VM Heerlen, The Netherlands", "contact":[ {"phone":"+31457112345"}, {"sip":"sip:31457112345@sip1.budgetphone.nl"}, {"irc":"irc://freenode/#ACKspace"}, {"twitter":"@ACKspace"}, {"email":"contact@ackspace.nl"}, {"ml":"info@lists.ackspace.nl"}, "open":true, "status":"open for public", "lastchange":1320586506, }
If ACKspace is closed:
{ "api":"0.11", "space":"ACKspace", "logo":"https:\/\/ackspace.nl\/ACKspace.150px.png", "icon":{ "open":"https:\/\/ackspace.nl\/icon\/open.png", "closed":"https:\/\/ackspace.nl\/icon\/closed.png" }, "url":"https:\/\/ackspace.nl\/", "address":"Kloosterweg 1, 6411 VM Heerlen, The Netherlands", "contact":[ {"phone":"+31457112345"}, {"sip":"sip:31457112345@sip1.budgetphone.nl"}, {"irc":"irc://freenode/#ACKspace"}, {"twitter":"@ACKspace"}, {"email":"contact@ackspace.nl"}, {"ml":"info@lists.ackspace.nl"}, "open":false, "status":"closed", "lastchange":1320586507, }
- Uploaded it to [1] but the URL can be changed if necessary..
- From the SpaceAPI website: "In order to be able to retrieve the object from within a javascript sandbox, the server of the JSON object should set the ‘Access-Control-Allow-Origin’ header with a value of ‘*’ ".
To do list:
- I created and uploaded really simple open & closed icons so they won't give HTTP 404 errors, improved icons are welcome! -- Vicarious 12:37, 9 December 2011 (CET)
- Add the JSON object to the existing Space state perl script or create a new script.
- From the SpaceAPI website: "Additionally, it might be beneficial to add a ‘Cache-Control’ header with a value of ‘no-cache’, to prevent browser caches from retaining old data."