/up/ API

Python quickstart:
>>> from urllib2 import Request, urlopen
>>> host = "http://212.117.167.207:5000/up/api/"
>>> req = Request(host, '{"search" : {"type" : "all", "term" : "findme" } }', {'content-type':'application/json'})
>>> result = loads(urlopen(req).read())


The request body should be a dict containing one root entry "search", which must contain the following key's:
"type" : type must have the string value of one of the following:
	"all" : search through all uploads
	"id" : search for a single upload matching the id specified in the term. (it can be an int or string integer)
	"image" : search through image uploads
	"playlist" : search through playlist uploads
	"flash" : search through flash uploads
	"archive" : search through archive uploads
	"text" : search through text uploads
	"code" : search through text uploads which are identified as code uploads
	"doc" : search through document uploads
	"media" : search through media uploads
	"video" : search through the subset of media uploads which contain video
	"audio" : search through the subset of media uploads which don't contain video.

"term" : term must be an integer, string, or unicode which is the term to search for.
	when searching multiple terms, seperate them with a space, such as "term1 term2", this will operate like "term1 AND term2"

It may also optionally contain another key called "options".
options must contain a dictionary that may contain the following keys:

"numresults" : (int/int-in-a-string) a number representing the maximum number of results to return
"offset" : (int/int-in-a-string) a number representing the start point of the results. It's actually implemented 
	like a normal list slice, so it's actual implementation is actually [offset:offset+numresults])
"order" : (string) A string value representing the order by which you want the results. Valid strings are:
	"newest" : newest first
	"oldest" : oldest first
	"mostdl" : most downloaded first
	"leastdl" : least downloaded first.