Fetch games
From ePrize Developers Wiki
(Difference between revisions)
(New page: {{RESTfulAPI |crumbs=API Home Page :: Games and Awards |summary=TODO: Fill me in. }} {{RESTfulExample |title=Requesting Games for Valid Apikey |summary=This demonstrates a good re...) |
|||
Line 1: | Line 1: | ||
{{RESTfulAPI | {{RESTfulAPI | ||
|crumbs=[[API Home Page]] :: [[Games and Awards]] | |crumbs=[[API Home Page]] :: [[Games and Awards]] | ||
- | |summary= | + | |summary=The purpose of this call is to see what games a promotion has. There is currently one supported game type, which is InstantWin, which will show up in the response as type "iw". There is also another game type that is currently in development, Sweepstakes. When completed, it will have a game type in the response as "sw". |
}} | }} | ||
Line 11: | Line 11: | ||
<result ver="ePrize Web Services 1.0"> | <result ver="ePrize Web Services 1.0"> | ||
<game href="/v1/{apikey}/game/{game}" type="iw" /> | <game href="/v1/{apikey}/game/{game}" type="iw" /> | ||
- | <game href="/v1/{apikey}/game/{game2}" type=" | + | <game href="/v1/{apikey}/game/{game2}" type="sw" /> |
... | ... | ||
<game href="/v1/{apikey}/game/{gameN}" type="iw" /> | <game href="/v1/{apikey}/game/{gameN}" type="iw" /> |
Revision as of 21:29, 13 May 2009
API Home Page :: Games and Awards
Summary
The purpose of this call is to see what games a promotion has. There is currently one supported game type, which is InstantWin, which will show up in the response as type "iw". There is also another game type that is currently in development, Sweepstakes. When completed, it will have a game type in the response as "sw".
Example: Requesting Games for Valid Apikey
Summary
This demonstrates a good request for a list of games.
Response
HTTP Status Code: 200 OK
<?xml version="1.0" encoding="UTF-8" ?> <result ver="ePrize Web Services 1.0"> <game href="/v1/{apikey}/game/{game}" type="iw" /> <game href="/v1/{apikey}/game/{game2}" type="sw" /> ... <game href="/v1/{apikey}/game/{gameN}" type="iw" /> </result>
Example: Requesting Games for Invalid Apikey
Summary
This demonstrates a good request for a list of games but the apikey can't be found.
Response
HTTP Status Code: 404 Not Found
<?xml version="1.0" encoding="UTF-8"?> <result ver="ePrize Web Services 1.0"></result>