Getting Started

From ePrize Developers Wiki

Revision as of 14:56, 5 August 2009 by Nathan-hughes (Talk | contribs)
Jump to: navigation, search

The secret of getting ahead is getting started. The secret of getting started is breaking your complex overwhelming tasks into small manageable tasks, and then starting on the first one.

- Mark Twain


Hello, Developer. If you are reading this, you are itching to get started building your interactive promotion. First, please accept our warm Welcome.

In order to create a promotion using BReWS, you don't need much:

  1. You need to be a programmer, or be friends with one, well versed in Internet (HTTP) technologies
  2. You need to be able to deploy your application in an environment connected to the Internet so that it can communicate with our services
  3. You need to have an API Key

Once you have all that, you are ready to get started.


Contents

Getting Help

First, start with this site. Documentation on services available, call mechanisms, and debugging can be found here. Good starting points are this page, especially the #Your First Calls section, and the FAQ.

Second, make use of the Webservices Mailing List. You can interact with other BReWS users, including the engineering team that builds and maintains it.

Third, if you are really in a pickle, call your primary ePrize contact. They can get you the additional help you need.

Your First Calls

Below is an example of using a command line utility, curl, to access a test promotion installed on a staging server.

Verify API Key and basic communication with ePrize is working

$ curl -i -X GET -H "Accept: text/xml" \
  http://test.url.eprize.com/v1/eprize/ews12/test/communication
HTTP 200 OK
Cache-Control: no-cache
Date: Thu, 25 Jun 2009 13:59:01 GMT
Pragma: no-cache
Server: POE HTTPD Component/0.09 (5.008008)
Content-Length: 79
Content-Type: text/xml; charset=utf-8
Expires: Thu, 25 Jun 2009 13:59:01 GMT
X-Cache: MISS from broker.int.eprize.net
Via: 1.0 broker.int.eprize.net (squid/3.1.0.6)
Connection: close

<?xml version="1.0" encoding="UTF-8" ?>
<result ver="1.0">Hello world</result>

Fetch Games

(the games will not change unless client reconfigures--game URLs can be hardcoded to reduce API calls)

$ curl -i -X GET -H "Accept: text/xml" \
  http://test.url.eprize.com/v1/eprize/ews12/games
HTTP 200 OK
Content-Type: text/xml
Date: Thu, 25 Jun 2009 14:05:27 GMT
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Accept-Ranges: bytes
Server: Noelios-Restlet-Engine/1.1..2
X-Cache: MISS from broker.int.eprize.net
Via: 1.0 broker.int.eprize.net (squid/3.1.0.6)
Connection: close

<?xml version="1.0" encoding="UTF-8"?><result>
     <game href="/v1/eprize/ews12/game/36191b82-7747-102c-bf89-93727f294d11" type="iw"/>
</result>
Personal tools