I will be using a RESTful API. I don’t have much time to post so I thought I would give a quick snippet of JSON output from an event list request.
A successful response:
{
* request: "/api/events?format=json"
*
-
items: [
o
-
{
+ id: 16
+ user_id: 1
+ guild_id: 11
+ character_id: 1
+ title: "Test Event for Blitzaroo"
+ description: "This is a test event for Blitzaroo to demonstrate how the JSON output will look. XML will be very similar in output. All information receives a request, HTTP response code and a list of items or an error code."
+ date: "2009-10-02"
+ invite_time: "00:00:00"
+ start_time: "00:00:00"
+ freeze_time: "00:00:00"
+ duration: 4
+ min_level: 0
+ max_level: 40
+ limit: 10
+ guild_only: 1
+ character_name: "Test Character"
+ guild_name: "Team Trammel"
+ user_name: "SpiffyJr"
}
]
}
Unsuccessful
{
* request: "/api/events?format=json"
* error: "You are not authorized for that request"
}
GD Star Rating
loading...
loading...