Get All Contest Entries for a Profile

From ePrize Developers Wiki

(Difference between revisions)
Jump to: navigation, search
Current revision (18:49, 19 April 2011) (edit) (undo)
 
Line 1: Line 1:
{{RESTfulAPI
{{RESTfulAPI
|crumbs=[[API Home Page]] :: [[Contest API|Contest]]
|crumbs=[[API Home Page]] :: [[Contest API|Contest]]
-
|summary=Based on a profile ID, fetch that's users [[Enter Contest|contest entries]]. This will return a list of entries with information about the each.
+
|summary=Based on a profile ID, fetch that user's [[Enter Contest|contest entries]]. This will return a list of entries with information about the each.
|resource=/v1/{apikey}/profile/{profileId}.{webkey}/contest/entry
|resource=/v1/{apikey}/profile/{profileId}.{webkey}/contest/entry
|methods=GET
|methods=GET

Current revision

API Home Page :: Contest

Summary

Based on a profile ID, fetch that user's contest entries. This will return a list of entries with information about the each.

Resource

/v1/{apikey}/profile/{profileId}.{webkey}/contest/entry

Valid Methods

GET

Resource Arguments

Note: resource arguments are always required.

apikey: Your API Key.

profileID.webkey: ProfileID and WebKey from a profile URL. In this case, do not use the full URL and only the profileID and WebKey.

Parameters Required

None.



Example: Successfully fetch entries for a user

Summary

Demonstrates successful response


Response

HTTP Status Code: 200 OK


<?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>approved</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>
   <entry>
    <body>this is also the body of my essay</body>
    <category>0</category>
    <city>livonia</city>
    <description>this is my description</description>
    <entry_id>3</entry_id>
    <entry_status>approved</entry_status>
    <first_name>brian</first_name>
    <last_name>Y</last_name>
    <rating_ave>0.000</rating_ave>
    <rating_count>0</rating_count>
    <state>MI</state>
    <title>title</title>
    <views>0</views>
    <votes>0</votes>
   </entry>
 </result>


Example: Request entries for a non-existent user

Summary

Demonstrates unsuccessful response


Response

HTTP Status Code: 404 Not Found


<?xml version="1.0" encoding="UTF-8" ?>
<result>
  <status>0</status>
</result>


Personal tools