Difference between revisions of "SpaceAPI"
(updated the project) |
(SpaceAPI 0.12 -> 0.13) |
||
| Line 1: | Line 1: | ||
{{Project | {{Project | ||
|State=Completed | |State=Completed | ||
| − | |Members=Vicarious, CoolePascal | + | |Members=Vicarious, CoolePascal, Prodigity |
|Description=HackerSpace Status API | |Description=HackerSpace Status API | ||
}} | }} | ||
| Line 8: | Line 8: | ||
== Done so far: == | == Done so far: == | ||
| − | * | + | * Updated JSON object to become SpaceAPI 0.13 compliant (see status.php) |
| + | **Content type and Cache-Control headers are now sent | ||
| + | **Now uses location object | ||
| + | **Now uses state object | ||
| + | **Space state now has a third state; null. (In case of uncertain state) | ||
| − | |||
<pre> | <pre> | ||
{ | { | ||
| − | "api":"0. | + | "api":"0.13", |
"space":"ACKspace", | "space":"ACKspace", | ||
| − | "logo":"https: | + | "logo":"https://ackspace.nl/ACKspace.150px.png", |
| − | " | + | "url":"https://ackspace.nl/", |
| − | + | "location":{ | |
| − | " | + | "address":"Kloosterweg 1, 6412 CN Heerlen, The Netherlands", |
| + | "lat":50.892665, | ||
| + | "lon":5.971104 | ||
}, | }, | ||
| − | " | + | "issue_report_channels":[ |
| − | " | + | "email" |
| − | + | ], | |
| − | + | "feeds":{ | |
| − | + | "calendar":{ | |
| − | + | "type": "text/calendar", | |
| − | + | "url": "http://www.google.com/calendar/ical/f3j6egtm35u2v027rog3sob7gk%40group.calendar.google.com/public/basic.ics" | |
| − | + | } | |
| − | + | }, | |
| − | + | "contact":{ | |
| − | + | "email":"contact@ackspace.nl", | |
| − | + | "irc":"irc://freenode/#ACKspace", | |
| + | "keymaster":[ | ||
| + | "31457112345, extension 1333" | ||
| + | ], | ||
| + | "ml":"info@lists.ackspace.nl", | ||
| + | "phone":"31457112345", | ||
| + | "sip":"31457112345@sip1.budgetphone.nl", | ||
| + | "twitter":"@ACKspace" | ||
| + | },"state":{ | ||
| + | "open":true, | ||
| + | "message":"open for public", | ||
| + | "lastchange":1415742805, | ||
| + | "icon":{ | ||
| + | "open":"https://ackspace.nl/icon/open.png", | ||
| + | "closed":"https://ackspace.nl/icon/closed.png" | ||
| + | } | ||
} | } | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
} | } | ||
</pre> | </pre> | ||
| Line 67: | Line 62: | ||
== To do list: (Optional) == | == To do list: (Optional) == | ||
* I created and uploaded really simple [https://ackspace.nl/icon/open.png open] & [https://ackspace.nl/icon/closed.png closed] icons so they won't give HTTP 404 errors, improved icons are welcome! -- [[User:Vicarious|Vicarious]] 12:37, 9 December 2011 (CET) | * I created and uploaded really simple [https://ackspace.nl/icon/open.png open] & [https://ackspace.nl/icon/closed.png closed] icons so they won't give HTTP 404 errors, improved icons are welcome! -- [[User:Vicarious|Vicarious]] 12:37, 9 December 2011 (CET) | ||
| − | * 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." | + | * <del>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."</del> Done. |
Revision as of 22:56, 11 November 2014
| Project: SpaceAPI | |
|---|---|
| Featured: | |
| State | Completed |
| Members | Vicarious, CoolePascal, Prodigity |
| 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:
- Updated JSON object to become SpaceAPI 0.13 compliant (see status.php)
- Content type and Cache-Control headers are now sent
- Now uses location object
- Now uses state object
- Space state now has a third state; null. (In case of uncertain state)
{
"api":"0.13",
"space":"ACKspace",
"logo":"https://ackspace.nl/ACKspace.150px.png",
"url":"https://ackspace.nl/",
"location":{
"address":"Kloosterweg 1, 6412 CN Heerlen, The Netherlands",
"lat":50.892665,
"lon":5.971104
},
"issue_report_channels":[
"email"
],
"feeds":{
"calendar":{
"type": "text/calendar",
"url": "http://www.google.com/calendar/ical/f3j6egtm35u2v027rog3sob7gk%40group.calendar.google.com/public/basic.ics"
}
},
"contact":{
"email":"contact@ackspace.nl",
"irc":"irc://freenode/#ACKspace",
"keymaster":[
"31457112345, extension 1333"
],
"ml":"info@lists.ackspace.nl",
"phone":"31457112345",
"sip":"31457112345@sip1.budgetphone.nl",
"twitter":"@ACKspace"
},"state":{
"open":true,
"message":"open for public",
"lastchange":1415742805,
"icon":{
"open":"https://ackspace.nl/icon/open.png",
"closed":"https://ackspace.nl/icon/closed.png"
}
}
}
- Uploaded it to https://ackspace.nl/status.php 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 ‘*’ ".
- Added the JSON object to the existing Space state PHP script. Thanks CoolePascal for the help with the PHP stuff!
To do list: (Optional)
- 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)
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."Done.