Fetch token
From ePrize Developers Wiki
(Difference between revisions)
Line 1: | Line 1: | ||
+ | {{RESTfulAPI | ||
+ | |crumbs=[[API Home Page]] :: [[Games and Awards]] | ||
+ | |summary=TODO: Fill me in. | ||
+ | }} | ||
+ | |||
+ | {{RESTfulExample | ||
+ | |title=Requesting A Valid Token | ||
+ | |summary=This demonstrates a good request for a token that exists. | ||
+ | |responsecode=200 OK | ||
+ | |response=<?xml version="1.0" encoding="UTF-8" ?> | ||
+ | <result ver="ePrize Web Services 1.0"> | ||
+ | <result> | ||
+ | <token> | ||
+ | <id>1</id> | ||
+ | <user>Bill</user> | ||
+ | <game>12345-1234-1234-1234</game> | ||
+ | </token> | ||
+ | </result> | ||
+ | <status>1</status> | ||
+ | </result> | ||
+ | }} | ||
+ | |||
<pre>Request representation: empty | <pre>Request representation: empty | ||
Revision as of 16:10, 24 March 2009
API Home Page :: Games and Awards
Summary
TODO: Fill me in.
Example: Requesting A Valid Token
Summary
This demonstrates a good request for a token that exists.
Response
HTTP Status Code: 200 OK
<?xml version="1.0" encoding="UTF-8" ?> <result ver="ePrize Web Services 1.0"> <result> <token> <id>1</id> <user>Bill</user> <game>12345-1234-1234-1234</game> </token> </result> <status>1</status> </result>
Request representation: empty Response: 200 OK game: {game}, profile: {profile}, redeemed: {redeemed?}, awards: [ prizes: [ /v1/{apikey}/game/{game1}/prize/{prize}, ... ], tokens: [ /v1/{apikey}/game/{game2}/token/{token}, ... ] ] actions: [ redeem: /v1/{apikey}/game/{game}/token/{token} ] Response if token doesn't exist: 404 Not Found
The redeem action does not appear on tokens that may not be redeemed.