YTMND:API:Interfaces

From YTMND
Revision as of 19:45, October 21, 2007 by BTape (Talk | contribs)

Jump to: navigation, search

Sites

Basic

http://api.ytmnd.com/sites/tomarnoldjungle/basic

Extended

http://api.ytmnd.com/sites/tomarnoldjungle/extended

Full

http://api.ytmnd.com/sites/tomarnoldjungle/full

Base

http://api.ytmnd.com/sites/tomarnoldjungle/base

Assets

http://api.ytmnd.com/sites/tomarnoldjungle/assets

Assets Thumb

http://api.ytmnd.com/sites/tomarnoldjungle/assets_thumb

Citations

http://api.ytmnd.com/sites/tomarnoldjungle/citations

Comments

http://api.ytmnd.com/sites/tomarnoldjungle/comments

Comments Summary

http://api.ytmnd.com/sites/tomarnoldjungle/comments_summary

Favorites

http://api.ytmnd.com/sites/tomarnoldjungle/favorites

Favorites Summary

http://api.ytmnd.com/sites/tomarnoldjungle/favorites_summary

Modifications

http://api.ytmnd.com/sites/tomarnoldjungle/modifications

Sponsors

http://api.ytmnd.com/sites/tomarnoldjungle/sponsors

Sponsors Summary

http://api.ytmnd.com/sites/tomarnoldjungle/sponsors_summary

Score

http://api.ytmnd.com/sites/tomarnoldjungle/score

Votes by Day

http://api.ytmnd.com/sites/tomarnoldjungle/votes_by_day

Views Summary

http://api.ytmnd.com/sites/tomarnoldjungle/views_summary

Views by Day

http://api.ytmnd.com/sites/tomarnoldjungle/views_by_day

Users

Example request

http://api.ytmnd.com/user/max

Example responses

XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<ytmnd_response timestamp="1192340109" request_type="user_lookup" extended_request="basic" returned_results="1">
  <users>
    <user user_id="1" signup_date="1081312566" user_name="max" />
  </users>
</ytmnd_response>

JSON

{
 "timestamp":1192340298,
 "request_type":"user_lookup",
 "extended_request":"basic",
 "returned_results":1,
 "users":
 {
  "1":
  {
   "signup_date":"1081312566",
   "user_name":"max",
   "user_id":"1"
  }
 }
}

PHP

a:5:
{
 s:9:"timestamp";
 i:1192340492;
 s:12:"request_type";
 s:11:"user_lookup";
 s:16:"extended_request";
 s:5:"basic";
 s:16:"returned_results";
 i:1;
 s:5:"users";
 a:1:
 {
  i:1;
  a:3:
  {
   s:11:"signup_date";
   s:10:"1081312566";
   s:9:"user_name";
   s:3:"max";
   s:7:"user_id";
   s:1:"1";
  }
 }
}

Endpoints

GET /user/{user name}

  • Named user.

GET /user/{user name}/all_sites

  • All of named user's sites.

GET /user/{user name}/recent_sites

  • Named user's 5 most recent sites.

GET /user/{user name}/recent_comments

  • Named user's 5 most recent comments.

For more methods, see here.

Related