Read up on the current cliqck API.

API

I'm sure you already know this by now, but API stands for Application Programming Interface. It's a nifty way to automatically perform certain tasks. This enables you to interact with cliqck from the comfort of your own website (or widget, or whatever you can think of).

There are 3 main API calls at this time. All calls require an API Key.

Click here to generate your API Key


List Items

This call will return a list of items that either an individual user has entered, or a list of the most recent items added (like on the index page).

URL: http://www.cliqck.com/xml/items/[username]/[options]/[start]/[limit]

Variables:

  • username - The name of the user. Use the letter "i" if you'd like the index page.
  • options (Optional)
    • Set this to "envylist" to get items from people on the user's envy list.
    • Set this to "search/[searchterm]" to search the user. NOTE: View the last example for more clarity.
  • start - (Optional) A number specifying the offset. If you specify this, you must specify the limit.
  • limit - (Optional) The number of items to return. Max is 100. Default is 50.

Examples:

http://www.cliqck.com/xml/items?apikey=abc123

This will return a list of 50 of the most recent items added to the site.

http://www.cliqck.com/xml/items/billy/25/5?apikey=abc123

This will return 5 of billy's items from the 25th most recently added.

http://www.cliqck.com/xml/items/billy/envylist/0/5?apikey=abc123

This will return the last 5 items from people on billy's envy list.

http://www.cliqck.com/xml/items/i/search/xbox?apikey=abc123

This will search everyone for "xbox"

http://www.cliqck.com/xml/items/billy/search/apples?apikey=abc123

This will search billy's items for the word "apples"

Example XML return:

<cliqck>
 <found>14</found>
  <item>
   <pid>23</pid>
   <uname>billy</uname>
   <name>Billy Chasen</name>
   <photo>http://static.cliqck.com/path/to/photo.jpg</photo>
   <text>a new sock because my old one ripped</text>
   <link></link>
  </item>
</cliqck>
  • found - The total number of items found (essentially the total number of items the user has entered)
  • pid - A unique identifier for this item. Can be used to delete the item.
  • uname - The username of the person who submitted the item.
  • name - The optional name of the user. May be blank.
  • photo - An optional photo supplied by the user. 100x100 pixels.
  • text - The descriptive text that the user added.
  • link - The optional link to the item, supplied by the user.
  • time - A unix timestamp for when the item was submitted.

Add Item

This call will add a new item to the user's list of items. It requires that you POST data to it.

URL: http://www.cliqck.com/xml/additem

Variables:

  • uname - The username of the user. You must send this as a POST variable.
  • pw - An md5 hash of the user's password. You must send this as a POST variable.
  • text - The descriptive text that the user entered about the item. You must send this as a POST variable.
  • link - The optional link to the item as entered by the user. You must send this as a POST variable.

Examples:

http://www.cliqck.com/xml/additem?apikey=abc123

Remember to make your apikey a GET variable like above.

Example XML return:

<cliqck>
  <return>success</return>
</cliqck>
  • return - If successful, will return "success". If failed, will return "failure".

Delete Item

This call will remove an item from the user's list of items. It requires that you POST data to it.

URL: http://www.cliqck.com/xml/deleteitem

Variables:

  • uname - The username of the user. You must send this as a POST variable.
  • pw - An md5 hash of the user's password. You must send this as a POST variable.
  • pid - The pid of the item that should be deleted. You must send this as a POST variable.

Examples:

http://www.cliqck.com/xml/deleteitem?apikey=abc123

Remember to make your apikey a GET variable like above.

Example XML return:

<cliqck>
  <return>success</return>
</cliqck>
  • return - If successful, will return "success". If failed, will return "failure".