Difference between revisions of "YTMND:API:Methods"

From YTMND
Jump to: navigation, search
(YTMND API Method List: Added a note about Omissions)
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== YTMND API Methods ==
+
== YTMND API Method List ==
  
==Site Methods==
+
=== Inheritance ===
{| width="50%" style="text-align:center; background-color:transparent; border: solid 1px #c30"
+
 
 +
Some methods inherit data from other methods. For instance, by calling "sponsors" on the site interface, you are implicitly going to get "sponsors_summary" as well. This is true for any methods that have both a _summary and a _by_day extended method.
 +
 
 +
=== Omissions ===
 +
 
 +
The API omits data when it doesn't have it or it isn't solid. For instance, some sites can have a moderation element with a work_safe attribute. If we are positive of a work_safe value, we will include the moderation element, otherwise we omit it. This means your application must actually verify if the result has the data you are looking for.
 +
 
 +
=Sites Interface=
 +
 
 +
== Methods==
 +
{| width="80%" style="text-align:center; background-color:transparent; border: solid 1px #c30"
 
|- style="background-color:#c30; color:#fff;"
 
|- style="background-color:#c30; color:#fff;"
 
! Method
 
! Method
 
! Limit per Request
 
! Limit per Request
 
! Description
 
! Description
! Example
+
|- style="background-color:#fbfbfb"
 +
| base
 +
| 100 sites
 +
| Creator, title, description, keywords, site text, display options, image origin, sound origin, awards, moderation
 +
|- style="background-color:#fbfbfb"
 +
| assets
 +
| 100 sites
 +
| Asset information for a site
 +
|- style="background-color:#fbfbfb"
 +
| assets_thumb
 +
| 100 sites
 +
| Site's thumbnail image information
 +
|- style="background-color:#fbfbfb"
 +
| citations
 +
| 100 sites
 +
| Citations for a site
 +
|- style="background-color:#fbfbfb"
 +
| comments
 +
| 1 site
 +
| Comments on a site
 +
|- style="background-color:#fbfbfb"
 +
| comments_summary
 +
| 25 sites
 +
| Information about site's comments
 +
|- style="background-color:#fbfbfb"
 +
| favorites
 +
| 25 sites
 +
| Favorites on a site
 +
|- style="background-color:#fbfbfb"
 +
| favorites_summary
 +
| 25 sites
 +
| Number of favorites on a site
 +
|- style="background-color:#fbfbfb"
 +
| modifications
 +
| 50 sites
 +
| Changes to a site's title, assets, and text
 +
|- style="background-color:#fbfbfb"
 +
| sponsors
 +
| 50 sites
 +
| Sponsorships on a site
 +
|- style="background-color:#fbfbfb"
 +
| modifications
 +
| 50 sites
 +
| Modifications to a site
 +
|- style="background-color:#fbfbfb"
 +
| sponsors_summary
 +
| 50 sites
 +
| Total dollar amount for sponsorships and paypal fees on a site
 +
|- style="background-color:#fbfbfb"
 +
| score
 +
| 50 sites
 +
| score, total votes, sum of votes, and score image
 +
|- style="background-color:#fbfbfb"
 +
| votes_by_day
 +
| 10 sites
 +
| Votes on a site in a given day
 +
|- style="background-color:#fbfbfb"
 +
| views_summary
 +
| 10 sites
 +
| Views on a site in a given day
 +
|- style="background-color:#fbfbfb"
 +
| views_by_day
 +
| 10 sites
 +
| Views today, yesterday, this week, this month, and all time on a site
 +
|}
 +
 
 +
== Method Groups ==
 +
{| width="80%" style="text-align:center; background-color:transparent; border: solid 1px #c30"
 +
|- style="background-color:#c30; color:#fff;"
 +
! Method
 +
! Limit per Request
 +
! Methods implemented
 
|- style="background-color:#fbfbfb"
 
|- style="background-color:#fbfbfb"
 
| basic
 
| basic
 
| 100 sites
 
| 100 sites
| Simple information
+
| base, assets_thumb, score, views_summary
| http://api.ytmnd.com/site/1/basic
+
 
|- style="background-color:#fbfbfb"
 
|- style="background-color:#fbfbfb"
 
| extended
 
| extended
 
| 50 sites
 
| 50 sites
| Sponsors, Favorites, and Assets
+
| base, assets, comments_summary, favorites_summary, sponsors_summary, score, views_summary
| http://api.ytmnd.com/site/1/extended
+
 
|- style="background-color:#fbfbfb"
 
|- style="background-color:#fbfbfb"
 
| full
 
| full
| 5
+
| 5 sites
 +
| base, assets, citations, comments_summary, favorites, sponsors, votes_by_day, views_by_day
 
|- style="background-color:#fbfbfb"
 
|- style="background-color:#fbfbfb"
| assets
+
|}
| 100
+
 
 +
 
 +
 
 +
= Users Interface =
 +
 
 +
== Methods==
 +
{| width="70%" style="text-align:center; background-color:transparent; border: solid 1px #c30"
 +
|- style="background-color:#c30; color:#fff;"
 +
! Method
 +
! Limit per Request
 +
! Description
 
|- style="background-color:#fbfbfb"
 
|- style="background-color:#fbfbfb"
| citations
+
| basic
| 100
+
| 5 users
 +
| user_id, user_name, signup_date
 
|- style="background-color:#fbfbfb"
 
|- style="background-color:#fbfbfb"
| sponsors
+
| popular_sites
| 50
+
| 100 users
 +
| User's top 5 rated sites
 
|- style="background-color:#fbfbfb"
 
|- style="background-color:#fbfbfb"
| favorites
+
| recent_sites
| 25
+
| 100 users
 +
| User's last 5 sites
 +
|- style="background-color:#fbfbfb"
 +
| all_sites
 +
| 100 users
 +
| All of a user's sites
 +
|- style="background-color:#fbfbfb"
 +
| recent_comments
 +
| 100 users
 +
| User's last 5 comments
 
|- style="background-color:#fbfbfb"
 
|- style="background-color:#fbfbfb"
 
| comments
 
| comments
| 1
+
| 1 user
 +
| User's last 25 comments
 
|- style="background-color:#fbfbfb"
 
|- style="background-color:#fbfbfb"
| modifications
+
| vote_spread
| 50
+
| 25 users
 +
| User's vote totals and average vote
 
|- style="background-color:#fbfbfb"
 
|- style="background-color:#fbfbfb"
| views_by_day
+
| votes
| 10
+
| 25 users
 +
| User's last 30 votes
 
|- style="background-color:#fbfbfb"
 
|- style="background-color:#fbfbfb"
| votes_by_day
+
| recent_favorites
| 10
+
| 25 users
 +
| User's last 5 favorites
 +
|- style="background-color:#fbfbfb"
 +
| favorites
 +
| 25 users
 +
| All of a user's favorites
 
|}
 
|}
  
==User Methods==
+
== Method Groups ==
...are in progress
+
{| width="70%" style="text-align:center; background-color:transparent; border: solid 1px #c30"
 +
|- style="background-color:#c30; color:#fff;"
 +
! Method
 +
! Limit per Request
 +
! Methods implemented
 +
|- style="background-color:#fbfbfb"
 +
| profile
 +
| 50 sites
 +
| popular_sites, recent_sites, recent_comments
 +
|- style="background-color:#fbfbfb"
 +
| full
 +
| 5 sites
 +
| all_sites, favorites, votes, comments
 +
|- style="background-color:#fbfbfb"
 +
|}

Latest revision as of 17:29, October 31, 2007

YTMND API Method List

Inheritance

Some methods inherit data from other methods. For instance, by calling "sponsors" on the site interface, you are implicitly going to get "sponsors_summary" as well. This is true for any methods that have both a _summary and a _by_day extended method.

Omissions

The API omits data when it doesn't have it or it isn't solid. For instance, some sites can have a moderation element with a work_safe attribute. If we are positive of a work_safe value, we will include the moderation element, otherwise we omit it. This means your application must actually verify if the result has the data you are looking for.

Sites Interface

Methods

Method Limit per Request Description
base 100 sites Creator, title, description, keywords, site text, display options, image origin, sound origin, awards, moderation
assets 100 sites Asset information for a site
assets_thumb 100 sites Site's thumbnail image information
citations 100 sites Citations for a site
comments 1 site Comments on a site
comments_summary 25 sites Information about site's comments
favorites 25 sites Favorites on a site
favorites_summary 25 sites Number of favorites on a site
modifications 50 sites Changes to a site's title, assets, and text
sponsors 50 sites Sponsorships on a site
modifications 50 sites Modifications to a site
sponsors_summary 50 sites Total dollar amount for sponsorships and paypal fees on a site
score 50 sites score, total votes, sum of votes, and score image
votes_by_day 10 sites Votes on a site in a given day
views_summary 10 sites Views on a site in a given day
views_by_day 10 sites Views today, yesterday, this week, this month, and all time on a site

Method Groups

Method Limit per Request Methods implemented
basic 100 sites base, assets_thumb, score, views_summary
extended 50 sites base, assets, comments_summary, favorites_summary, sponsors_summary, score, views_summary
full 5 sites base, assets, citations, comments_summary, favorites, sponsors, votes_by_day, views_by_day


Users Interface

Methods

Method Limit per Request Description
basic 5 users user_id, user_name, signup_date
popular_sites 100 users User's top 5 rated sites
recent_sites 100 users User's last 5 sites
all_sites 100 users All of a user's sites
recent_comments 100 users User's last 5 comments
comments 1 user User's last 25 comments
vote_spread 25 users User's vote totals and average vote
votes 25 users User's last 30 votes
recent_favorites 25 users User's last 5 favorites
favorites 25 users All of a user's favorites

Method Groups

Method Limit per Request Methods implemented
profile 50 sites popular_sites, recent_sites, recent_comments
full 5 sites all_sites, favorites, votes, comments