Type/TYPE/snip REST Callback

From Sni.ps Documentation

Revision as of 23:17, 4 September 2008 by Admin (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search
   The functionality specified for the Type/TYPE/Snip Callback is documented but not yet implemented.


REST Callbacks

type/{type}/snip

Returns a list of all snips for a user. The type argument is ignored for this callback.

Optional Arguments

user

The user's id or ids which are used for filtering whose snips you would like returned. Use a comma separated list to specify more than one uid and prefix the list with an ! to instead find all snips not by that user(s).

Default: null

Example: user=8

Example: user=54,112

Example: user=!13

license

Narrows down the snips returned to only those with the specified licence. License should be referred to by the numeric id referred to be the license callback. Use a comma separated list to specify more than one license and prefix the list with an ! to instead find all snips not under that license(s).

Default: null

Example: license=1

Example: license=1,4

Example: license=!4

tag

One or more tags you would like to use to narrow down the list of snips. Use a comma separated list to specify more than one tag and prefix the list with an ! to instead find all snips that do not have that tag(s).

Default: null

Example: tag=cat

Example: tag=rock,banjo

Example: tag=!rickroll

attribution_path

The URL from which the snip originated. Can be simply the site domain.

Default: null

Example: attribution_path=flickr.com

min_date, max_date

The minimum and maximum for the date range for when the snips were created. Given in the format of a 32bit UNIX timestamp (the amount of seconds since Jan 1st, 1970).

Default: null

Example: min_date=1199163600 - Midnight, New Years Eve of 2008

tag_logic

The type of join used when more than one tag is specified.

Default: AND

Options: AND and OR

Example: tag_logic=OR

sort

The order in which the snips will be return.

Default: date

Options: date and popularity

Example: sort=popularity

limit

The maximum number of snips to return per page.

Default: 20

Maximum: 100

Example: limit=5

page

For result lists that have multiple pages worth of results, used to determine which page of results you would like returned.

Default: 1

Example: page=8