Fetch prize
From ePrize Developers Wiki
(Difference between revisions)
Line 1: | Line 1: | ||
+ | {{RESTfulAPI | ||
+ | |crumbs=[[API Home Page]] :: [[Games and Awards]] | ||
+ | |summary=TODO: Write me. | ||
+ | }} | ||
+ | |||
+ | {{RESTfulExample | ||
+ | |title=Requesting a Valid Prize | ||
+ | |summary=This demonstrates a good request for a prize that exists. | ||
+ | |responsecode=200 OK | ||
+ | |response=<?xml version="1.0" encoding="UTF-8"?> | ||
+ | <result ver="ePrize Web Services 1.0"> | ||
+ | <result> | ||
+ | <prize> | ||
+ | <id>{prize}</id> | ||
+ | <name>{prize-description}</name> | ||
+ | <game>{game}</game> | ||
+ | </prize> | ||
+ | </result> | ||
+ | <status>1</status> | ||
+ | </result> | ||
+ | }} | ||
+ | |||
+ | {{RESTfulExample | ||
+ | |title=Requesting An Invalid Prize | ||
+ | |summary=This demonstrates a good request for a prize that does not exist. | ||
+ | |responsecode=404 Not Found | ||
+ | |response=<?xml version="1.0" encoding="UTF-8"?> | ||
+ | <result ver="ePrize Web Services 1.0"> | ||
+ | <result/> | ||
+ | <status>0</status> | ||
+ | </result> | ||
+ | }} | ||
+ | |||
+ | == Extra Notes == | ||
+ | |||
+ | The {profile} value identifies the profile that the prize was awarded to, or null if the prize has not been awarded. The {prize-name} value is the name of the prize for tracking purposes and may not make sense to a consumer. The client is expected to translate the name before displaying it. | ||
+ | |||
+ | The claim action represents a resource that will help a consumer claim the prize. This action is only present if ePrize is performing prize fulfilment. | ||
+ | |||
+ | |||
<pre>Request representation: empty | <pre>Request representation: empty | ||
Line 13: | Line 53: | ||
404 Not Found | 404 Not Found | ||
</pre> | </pre> | ||
- | |||
- | The {profile} value identifies the profile that the prize was awarded to, or null if the prize has not been awarded. The {prize-name} value is the name of the prize for tracking purposes and may not make sense to a consumer. The client is expected to translate the name before displaying it. | ||
- | |||
- | The claim action represents a resource that will help a consumer claim the prize. This action is only present if ePrize is performing prize fulfilment. |
Revision as of 18:55, 9 April 2009
API Home Page :: Games and Awards
Summary
TODO: Write me.
Example: Requesting a Valid Prize
Summary
This demonstrates a good request for a prize that exists.
Response
HTTP Status Code: 200 OK
<?xml version="1.0" encoding="UTF-8"?> <result ver="ePrize Web Services 1.0"> <result> <prize> <id>{prize}</id> <name>{prize-description}</name> <game>{game}</game> </prize> </result> <status>1</status> </result>
Example: Requesting An Invalid Prize
Summary
This demonstrates a good request for a prize that does not exist.
Response
HTTP Status Code: 404 Not Found
<?xml version="1.0" encoding="UTF-8"?> <result ver="ePrize Web Services 1.0"> <result/> <status>0</status> </result>
Extra Notes
The {profile} value identifies the profile that the prize was awarded to, or null if the prize has not been awarded. The {prize-name} value is the name of the prize for tracking purposes and may not make sense to a consumer. The client is expected to translate the name before displaying it.
The claim action represents a resource that will help a consumer claim the prize. This action is only present if ePrize is performing prize fulfilment.
Request representation: empty Response: 200 OK game: {game}, profile: {profile}, name: {prize-name}, actions: [ claim: {prize-center-url} ] Response if token doesn't exist: 404 Not Found