Games and Awards

From ePrize Developers Wiki

(Difference between revisions)
Jump to: navigation, search
Current revision (14:20, 31 March 2014) (edit) (undo)
 
(8 intermediate revisions not shown.)
Line 1: Line 1:
 +
__NOTOC__
{{Logo}}
{{Logo}}
[[API Home Page]]
[[API Home Page]]
 +
 +
== Games Overview ==
 +
 +
There are two types of games that can be played with HelloWorld Web Service, Instant Win and Sweepstakes games. These will be configured into your [[API Key]]. Your key may have only one type of game, both, or neither. If there are multiple games, each must be played separately, based on the desired behavior.
 +
 +
=== Instant Win Games ===
 +
 +
An instant win game is a game where the user can be notified immediately if they are a winner or not. Instant win games require a valid token to play. [[Redeem_token|Tokens]] can only be awarded within the limits associated with your [[API Key]] and must be redeemed before the game can be played. Unredeemed tokens can be fetched later on.
<div class="api_table">
<div class="api_table">
{|
{|
|-
|-
-
| [[Fetch games]]
+
| [[Award token|Award instant win token]]
-
| GET /v1/{apikey}/games
+
| POST
-
|
+
| /v1/{apikey}/game/{game}/tokens
-
|-
+
-
| [[Award sweepstakes entry]]
+
-
| POST /v1/{apikey}/game/{game}/sweeps
+
-
|
+
-
|-
+
-
| [[Award token]]
+
-
| POST /v1/{apikey}/game/{game}/tokens
+
-
|
+
|-
|-
| [[Fetch token]]
| [[Fetch token]]
-
| GET /v1/{apikey}/game/{game}/token/{token}
+
| GET
-
|
+
| /v1/{apikey}/game/{game}/token/{token}
|-
|-
| [[Redeem token]]
| [[Redeem token]]
-
| POST /v1/{apikey}/game/{game}/token/{token}
+
| POST
-
|
+
| /v1/{apikey}/game/{game}/token/{token}
 +
|-
 +
|}
 +
</div>
 +
 
 +
=== Sweepstakes Games ===
 +
 
 +
A sweepstakes game collects [[Award_sweepstakes_entry|entries]] from users throughout the duration of the game. These can be awarded for various actions such as a login or registrations. A winner will be selected at the end of the game.
 +
 
 +
<div class="api_table">
 +
{|
 +
|-
 +
| [[Award sweepstakes entry]]
 +
| POST
 +
| /v1/{apikey}/game/{game}/sweeps
 +
|-
 +
|}
 +
</div>
 +
 
 +
 
 +
== Prizes ==
 +
 
 +
Games are holders of prizes. The prizes to be awarded will be configured when the [[API Key]] is created. Prizes are only won from a game, but the Fetch prize resource can be used to find out information about a prize.
 +
 
 +
<div class="api_table">
 +
{|
|-
|-
| [[Fetch prize]]
| [[Fetch prize]]
-
| GET /v1/{apikey}/game/{game}/prize/{prize}
+
| GET
-
|
+
| /v1/{apikey}/game/{game}/prize/{prize}
|-
|-
|}
|}
</div>
</div>
-
TODO: explain games, prizes, limits and token play model. steal from existing docs?
+
 
 +
== Limits ==
 +
 
 +
Each game and prize will have limits associated with it during the creation of the [[API Key]]. For example, in a sweepstakes a limit would be that 1 entry could be awarded per day.

Current revision

API Home Page

Games Overview

There are two types of games that can be played with HelloWorld Web Service, Instant Win and Sweepstakes games. These will be configured into your API Key. Your key may have only one type of game, both, or neither. If there are multiple games, each must be played separately, based on the desired behavior.

Instant Win Games

An instant win game is a game where the user can be notified immediately if they are a winner or not. Instant win games require a valid token to play. Tokens can only be awarded within the limits associated with your API Key and must be redeemed before the game can be played. Unredeemed tokens can be fetched later on.

Award instant win token POST /v1/{apikey}/game/{game}/tokens
Fetch token GET /v1/{apikey}/game/{game}/token/{token}
Redeem token POST /v1/{apikey}/game/{game}/token/{token}

Sweepstakes Games

A sweepstakes game collects entries from users throughout the duration of the game. These can be awarded for various actions such as a login or registrations. A winner will be selected at the end of the game.

Award sweepstakes entry POST /v1/{apikey}/game/{game}/sweeps


Prizes

Games are holders of prizes. The prizes to be awarded will be configured when the API Key is created. Prizes are only won from a game, but the Fetch prize resource can be used to find out information about a prize.

Fetch prize GET /v1/{apikey}/game/{game}/prize/{prize}


Limits

Each game and prize will have limits associated with it during the creation of the API Key. For example, in a sweepstakes a limit would be that 1 entry could be awarded per day.

Personal tools