Enter Contest
From ePrize Developers Wiki
(Difference between revisions)
(→Entering a Contest) |
(→Entering a Contest) |
||
Line 4: | Line 4: | ||
$ curl -i -X POST -H "Accept: text/xml" \ | $ curl -i -X POST -H "Accept: text/xml" \ | ||
- | -dprofile=http:// | + | -dprofile=http://test.url.eprize.com/v1/solution/contestv2v2/profile/1.5J4L55FNLN2CZZDV \ |
http://test.url.eprize.com/v1/eprize/ews12/contest/entry | http://test.url.eprize.com/v1/eprize/ews12/contest/entry | ||
Line 44: | Line 44: | ||
$ curl -i -X POST -H "Accept: text/xml" \ | $ curl -i -X POST -H "Accept: text/xml" \ | ||
- | -dprofile=http:// | + | -dprofile=http://test.url.eprize.com/v1/solution/contestv2v2/profile/1.5J4L55FNLN2CZZDV \ |
-dbody="this is the body of my essay" \ | -dbody="this is the body of my essay" \ | ||
-dtitle="this is the title of my essay" \ | -dtitle="this is the title of my essay" \ |
Revision as of 03:01, 27 July 2010
Entering a Contest
Blank entry:
$ curl -i -X POST -H "Accept: text/xml" \ -dprofile=http://test.url.eprize.com/v1/solution/contestv2v2/profile/1.5J4L55FNLN2CZZDV \ http://test.url.eprize.com/v1/eprize/ews12/contest/entry HTTP 400 (Bad Request) Cache-Control: no-cache Connection: close Date: Mon, 12 Jul 2010 01:43:00 GMT Pragma: no-cache Server: POE HTTPD Component/0.09 (5.008008) Content-Length: 479 Content-Type: text/xml; charset=utf-8 Expires: Fri, 23 Jul 2010 21:34:45 GMT <?xml version="1.0" encoding="UTF-8" ?> <result> <input_error> <name>body</name> <error>NULL</error> </input_error> <input_error> <name>title</name> <error>NULL</error> </input_error> <input_error> <name>category</name> <error>NULL</error> </input_error> <input_error> <name>original_work</name> <error>NULL</error> </input_error> <input_error> <name>official_rules</name> <error>NULL</error> </input_error> </result>
Successful entry:
$ curl -i -X POST -H "Accept: text/xml" \ -dprofile=http://test.url.eprize.com/v1/solution/contestv2v2/profile/1.5J4L55FNLN2CZZDV \ -dbody="this is the body of my essay" \ -dtitle="this is the title of my essay" \ -doriginal_work=yes \ -dofficial_rules=yes \ -dcategory=1 \ http://test.url.eprize.com/v1/eprize/ews12/contest/entry HTTP 201 (Created) Cache-Control: no-cache Connection: close Date: Fri, 23 Jul 2010 21:41:43 GMT Pragma: no-cache Location: http://127.0.0.1:10001/v1/solution/contestv2/contest/entry/1 Server: POE HTTPD Component/0.09 (5.008008) Content-Length: 533 Content-Type: text/xml; charset=utf-8 Expires: Fri, 23 Jul 2010 21:41:43 GMT <?xml version="1.0" encoding="UTF-8" ?> <result> <entry> <body>this is the body of my essay</body> <category>1</category> <city>PLEASANT RIDGE</city> <description></description> <entry_id>1</entry_id> <entry_state>transmuted</entry_state> <first_name>Todd</first_name> <last_name>C</last_name> <rating_ave>0.000</rating_ave> <rating_count>0</rating_count> <state>MI</state> <title>this is the title of my essay</title> <views>0</views> <votes>0</votes> </entry> </result>