Favorites
Cheezburger Favorites API
Adding, Retrieving, and Removing Favorite Lols from your Cheezburger Account
Viewing Favorites By Username
| http://api.cheezburger.com/xml/user/{username}/favorite/lol | Returns the most recent lols most recently added to the specified username's account. Returns a maximum of 100 results. To get back more than 100 results, you'll need to use the /start/count end point below. |
| http://api.cheezburger.com/xml/user/{username}/favorite/lol/count | Get a total count of favorite lols for the specified username's account. |
| http://api.cheezburger.com/xml/user/{username}/favorite/lol/{start}/{count} | Get a specific range of favorite lols from the specified username's account. start: The index (1-based) of the Favorite lol to return count: How many Favorite Lols to return at once (up to 100) Favorite Lols are returned in reverse-chronological (i.e. newest-first) order. |
| http://api.cheezburger.com/xml/user/{username}/favorite/lol/random | Get a single favorite lol from the specified username's account, selected at random. |
Example Favorite Lol Response XML
<?xml version="1.0" encoding="utf-8"?>
<Lols>
<Favorites>
<Lol>
<LolId>http://api.cheezburger.com/xml/lol/1001</LolId>
<LolImageUrl>http://api.cheezburger.com/xml/images/lol.jpg</LolImageUrl>
<ThumbnailImageUrl>http://api.cheezburger.com/xml/images/th_lol.jpg</ThumbnailImageUrl>
<LolPageUrl>http://api.cheezburger.com/xml/View/123456</LolPageUrl>
<FullText>Full Text of What appears on Lol (not always available)</FullText>
<ClientId>http://api.cheezburger.com/xml/client/12345</ClientId>
<PictureId>http://api.cheezburger.com/xml/picture/2002</PictureId>
<PictureImageUrl>http://api.cheezburger.com/xml/images/blankpictures/blankpicture.jpg</PictureImageUrl>
<UserId>http://api.cheezburger.com/xml/user/exampleuser</UserId>
<Title>Title</Title>
<Description>Description (optional)</Description>
<TimeStamp>2010-08-25T13:26:35.9023071-07:00</TimeStamp>
</Lol>
<Lol>
<LolId>http://api.cheezburger.com/xml/lol/1001</LolId>
<LolImageUrl>http://api.cheezburger.com/xml/images/lol.jpg</LolImageUrl>
<ThumbnailImageUrl>http://api.cheezburger.com/xml/images/th_lol.jpg</ThumbnailImageUrl>
<LolPageUrl>http://api.cheezburger.com/xml/View/123456</LolPageUrl>
<FullText>Full Text of What appears on Lol (not always available)</FullText>
<ClientId>http://api.cheezburger.com/xml/client/12345</ClientId>
<PictureId>http://api.cheezburger.com/xml/picture/2002</PictureId>
<PictureImageUrl>http://api.cheezburger.com/xml/images/blankpictures/blankpicture.jpg</PictureImageUrl>
<UserId>http://api.cheezburger.com/xml/user/exampleuser</UserId>
<Title>Title</Title>
<Description>Description (optional)</Description>
<TimeStamp>2010-08-25T13:26:35.9023071-07:00</TimeStamp>
</Lol>
</Favorites>
</Lols>
Adding/Removing Favorite Lols from an Authenticated Account
Note, to use any of these end-points, you'll need to provide a valid Authentication Token in your request's HTTP Headers. See the Authentication API documentation for how to get an Authentication Token.
Adding a Favorite to a user's account
Execute an HTTP POST to the following url:
http://api.cheezburger.com/xml/my/favorite/lol
with this XML in the post body:
<?xml version="1.0" encoding="utf-8"?>
<FavoriteAdd>
<LolId>http://api.cheezburger.com/xml/lol/1001</LolId>
</FavoriteAdd>
Removing a Favorite from a user's account
Execute an HTTP DELETE to the following url:
http://api.cheezburger.com/xml/my/favorite/lol
with this XML in the post body:
<?xml version="1.0" encoding="utf-8"?>
<FavoriteRemove>
<LolId>http://api.cheezburger.com/xml/lol/1001</LolId>
</FavoriteRemove>
Favorite Lol URL shortcuts for Authenticated Users
If your HTTP request includes a valid authentication token in the header, you may use end point URLs starting with:
http://api.cheezburger.com/xml/my/favorite/lol
instead of:
http://api.cheezburger.com/xml/user/{username}/favorite/lol
0 Comments
New comments are not being accepted at this time.