Difference between revisions of "SpaceAPI"

From Hackerspace ACKspace
Jump to: navigation, search
(Created page with "{{Project |State=Active |Members=Vicarious, CoolePascal |Description=HackerSpace Status API }} See [https://hackerspaces.nl/spaceapi/ hackerspaces.nl SpaceAPI website] for detail...")
 
Line 61: Line 61:
 
</pre>
 
</pre>
  
 +
* Uploaded it to [https://ackspace.nl/status/index.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 ‘*’ ".
 
* 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 ‘*’ ".
  

Revision as of 10:05, 9 December 2011

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:

  • The open/closed icons still have to be created and uploaded.
  • 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."