This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
connections-api [2014/12/27 16:19] jposeika [Response code] |
connections-api [2014/12/27 16:29] (current) jposeika [User functions] |
||
---|---|---|---|
Line 16: | Line 16: | ||
* How do we handle users that already are ChiliFresh users and will have registered with the particular e-mail addresses? | * How do we handle users that already are ChiliFresh users and will have registered with the particular e-mail addresses? | ||
* How do we identify OPAC requests with user_key parameter? Can we set up specific OPAC IP(s)? | * How do we identify OPAC requests with user_key parameter? Can we set up specific OPAC IP(s)? | ||
- | ===== User functions ===== | + | ======= User functions ======= |
* Register **[API/widget/lightbox]** | * Register **[API/widget/lightbox]** | ||
* Using single sign-on **[API]** | * Using single sign-on **[API]** | ||
Line 26: | Line 26: | ||
* Using Twitter and Facebook **[widget/lightbox]** | * Using Twitter and Facebook **[widget/lightbox]** | ||
* Sign-out **[API]** | * Sign-out **[API]** | ||
+ | |||
+ | ===== getUserProfile: get user profile information ===== | ||
+ | Get user profile information | ||
+ | |||
+ | ==== Input ==== | ||
+ | * URL for XML output: https://secure.chilifresh.com/api/connections/ | ||
+ | * URL for JSON output: https://secure.chilifresh.com/api/connections/json/ | ||
+ | * Method: POST | ||
+ | * Parameters: | ||
+ | |||
+ | |**Parameter** |**Type (size)** |**Mandatory** | | ||
+ | |action|**getUserProfile** |Yes| | ||
+ | |account|Integer (10)|Yes| | ||
+ | |user_id|Integer (10)|If //session_id// empty| | ||
+ | |session_id|If //user_id// empty| | ||
+ | |location|Variable characters (40)|If applicable| | ||
+ | |api_key|Variable characters (40)|Yes| | ||
+ | |||
+ | ==== Output ==== | ||
+ | |||
+ | |||
+ | **XML output example:** | ||
+ | <code> | ||
+ | <?xml version="1.0"?> | ||
+ | <response> | ||
+ | <response_code>2900</response_code> | ||
+ | <response_description>User account</response_description> | ||
+ | <response_time>Sat, 27 Dec 2014 17:23:23</response_time> | ||
+ | <nickname>Administrator</nickname> | ||
+ | <location>Mesa, Arizona, United States</location> | ||
+ | <age>4</age> | ||
+ | <avatar_small_img>http://chilifresh.com/userpic/small/blank.png</avatar_small_img> | ||
+ | <avatar_large_img>http://chilifresh.com/userpic/large/blank.png</avatar_large_img> | ||
+ | <last_login>2014-12-27 12:02:07</last_login> | ||
+ | <current_read> | ||
+ | <isbn>24640175</isbn> | ||
+ | <title>Harry Potter and the goblet of fire</title> | ||
+ | <author>by J.K. Rowling.</author> | ||
+ | <cover>https://content.chilifresh.com/?size=SC&isbn=24640175</cover> | ||
+ | </current_read> | ||
+ | </response> | ||
+ | |||
+ | </code> | ||
+ | |||
+ | ==== Response code ==== | ||
+ | |**Code** |**Code description** | | ||
+ | |2900|User profile information provided| | ||
+ | |2901|Inexistent user or profile restrictions| | ||
+ | |61|User not logged in or not specified| | ||
+ | |||
* Get/edit user information **[API/widget/lightbox]** | * Get/edit user information **[API/widget/lightbox]** | ||
* Gender | * Gender |