diff options
author | franck cuny <franck@lumberjaph.net> | 2010-10-14 13:30:56 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-10-14 13:30:56 +0200 |
commit | 3c05849a282bac0ef6b085266534916acffcfc6d (patch) | |
tree | 38948b6c63c9dbb3c9d10bf75a0ee0a49d882079 | |
parent | add perl script to validate a specification (diff) | |
download | api-description-3c05849a282bac0ef6b085266534916acffcfc6d.tar.gz |
update all description to reflect recent changes in specifications
-rw-r--r-- | apps/couchdb.json | 96 | ||||
-rw-r--r-- | apps/presque.json | 140 | ||||
-rw-r--r-- | services/backtweet.json | 48 | ||||
-rw-r--r-- | services/backtype.json | 90 | ||||
-rw-r--r-- | services/github.json | 229 | ||||
-rw-r--r-- | services/ihackernews.json | 56 | ||||
-rw-r--r-- | services/twitter.json | 190 |
7 files changed, 497 insertions, 352 deletions
diff --git a/apps/couchdb.json b/apps/couchdb.json index d1ca4a5..118f516 100644 --- a/apps/couchdb.json +++ b/apps/couchdb.json @@ -1,68 +1,80 @@ { - "version" : "0.1", + "version" : "0.2", "methods" : { "create_document_without_id" : { - "required" : [ - "database" - ], + "params" : { + "required" : [ + "database" + ] + }, "path" : "/:database", "method" : "POST" }, "get_all_documents" : { - "params" : [ - "descending", - "startkey", - "endkey", - "limit", - "include_docs" - ], - "required" : [ - "database" - ], + "params" : { + "required" : [ + "database" + ], + "optional" : [ + "descending", + "startkey", + "endkey", + "limit", + "include_docs" + ] + }, "path" : "/:database/_all_docs", "method" : "GET" }, "create_document_with_id" : { - "required" : [ - "database", - "doc_id" - ], + "params" : { + "required" : [ + "database", + "doc_id" + ] + }, "path" : "/:database/:doc_id", "method" : "POST" }, "get_document" : { - "params" : [ - "rev", - "revs" - ], - "required" : [ - "database", - "doc_id" - ], + "params" : { + "required" : [ + "database", + "doc_id" + ], + "optional" : [ + "rev", + "revs" + ] + }, "path" : "/:database/:doc_id", "method" : "GET" }, "get_all_documents_by_seq" : { - "params" : [ - "startkey", - "endkey", - "limit", - "include_docs" - ], - "required" : [ - "database" - ], + "params" : { + "required" : [ + "database" + ], + "optional" : [ + "startkey", + "endkey", + "limit", + "include_docs" + ] + }, "path" : "/:database/_all_docs_by_seq", "method" : "GET" }, "delete_document" : { - "params" : [ - "rev" - ], - "required" : [ - "database", - "doc_id" - ], + "params" : { + "required" : [ + "database", + "doc_id" + ], + "optional" : [ + "rev" + ] + }, "path" : "/:database/:doc_id", "method" : "DELETE" } diff --git a/apps/presque.json b/apps/presque.json index 3287cd0..4e82cf6 100644 --- a/apps/presque.json +++ b/apps/presque.json @@ -1,13 +1,12 @@ { - "format" : [ - "json" - ], - "version" : "0.1", + "version" : "0.2", "methods" : { "fetch_job" : { - "required" : [ - "queue_name" - ], + "params" : { + "required" : [ + "queue_name" + ] + }, "expected" : [ "200" ], @@ -15,41 +14,51 @@ "method" : "GET" }, "queue_size" : { - "required" : [ - "queue_name" - ], + "params" : { + "required" : [ + "queue_name" + ] + }, "path" : "/status/:queue_name", "method" : "GET" }, "reset_queue" : { - "required" : [ - "queue_name" - ], + "params" : { + "required" : [ + "queue_name" + ] + }, "path" : "/q/:queue_name", "method" : "DELETE" }, "worker_stats" : { - "params" : [ - "worker_id" - ], + "params" : { + "optional:" : [ + "worker_id" + ] + }, "path" : "/w/", "method" : "GET" }, "unregister_worker" : { - "required" : [ - "queue_name" - ], + "params" : { + "required" : [ + "queue_name" + ] + }, "path" : "/w/:queue_name", "method" : "DELETE" }, "create_job" : { - "params" : [ - "delayed", - "uniq" - ], - "required" : [ - "queue_name" - ], + "params" : { + "required" : [ + "queue_name" + ], + "optional" : [ + "delayed", + "uniq" + ] + }, "path" : "/q/:queue_name", "method" : "POST" }, @@ -58,40 +67,50 @@ "method" : "GET" }, "failed_job" : { - "required" : [ - "queue_name" - ], + "params" : { + "required" : [ + "queue_name" + ] + }, "path" : "/q/:queue_name", "method" : "PUT" }, "register_worker" : { - "required" : [ - "queue_name" - ], + "params" : { + "required" : [ + "queue_name" + ] + }, "path" : "/w/:queue_name", "method" : "POST" }, "queue_stats" : { - "required" : [ - "queue_name" - ], + "params" : { + "optional" : [ + "queue_name" + ] + }, "path" : "/w/", "method" : "GET" }, "change_queue_status" : { - "required" : [ - "queue_name" - ], + "params" : { + "required" : [ + "queue_name" + ] + }, "path" : "/control/:queue_name", "method" : "POST" }, "fetch_jobs" : { - "params" : [ - "batch_size" - ], - "required" : [ - "queue_name" - ], + "params" : { + "required" : [ + "queue_name" + ], + "optional" : [ + "batch_size" + ] + }, "expected" : [ "200" ], @@ -99,30 +118,39 @@ "method" : "GET" }, "queue_info" : { - "required" : [ - "queue_name" - ], + "params" : { + "required" : [ + "queue_name" + ] + }, "path" : "/j/:queue_name", "method" : "GET" }, "create_jobs" : { - "params" : [ - "delayed" - ], - "required" : [ - "queue_name" - ], + "params" : { + "required" : [ + "queue_name" + ], + "optional" : [ + "delayed" + ] + }, "path" : "/q/:queue_name", "method" : "POST" }, "queue_status" : { - "required" : [ - "queue_name" - ], + "params" : { + "required" : [ + "queue_name" + ] + }, "path" : "/control/:queue_name", "method" : "GET" } }, + "api_format" : [ + "json" + ], "name" : "Presque", "author" : [ "franck cuny <franck@lumberjaph.net>" diff --git a/services/backtweet.json b/services/backtweet.json index 4948268..6c8b237 100644 --- a/services/backtweet.json +++ b/services/backtweet.json @@ -1,17 +1,19 @@ { "api_base_url" : "http://api.backtype.com", - "version" : "0.1", + "version" : "0.2", "methods" : { "tweets_by_url" : { - "params" : [ - "itemsperpage", - "start", - "end" - ], - "required" : [ - "q", - "key" - ], + "params" : { + "optinal" : [ + "itemsperpage", + "start", + "end" + ], + "required" : [ + "q", + "key" + ] + }, "expected" : [ "200" ], @@ -19,13 +21,15 @@ "method" : "GET" }, "stats_by_url" : { - "params" : [ - "batch" - ], - "required" : [ - "q", - "key" - ], + "params" : { + "required" : [ + "q", + "key" + ], + "optional" : [ + "batch" + ] + }, "expected" : [ "200" ], @@ -33,10 +37,12 @@ "method" : "GET" }, "good_tweets_by_url" : { - "required" : [ - "q", - "key" - ], + "params" : { + "required" : [ + "q", + "key" + ] + }, "expected" : [ "200" ], diff --git a/services/backtype.json b/services/backtype.json index ec0de34..ccbeb8f 100644 --- a/services/backtype.json +++ b/services/backtype.json @@ -1,17 +1,19 @@ { "api_base_url" : "http://api.backtype.com/", - "version" : "0.1", + "version" : "0.2", "methods" : { "comments_connect" : { - "params" : [ - "sources", - "sort", - "key" - ], - "required" : [ - "format", - "url" - ], + "params" : { + "required" : [ + "format", + "url" + ], + "optional" : [ + "sources", + "sort", + "key" + ] + }, "expected" : [ "200" ], @@ -19,11 +21,13 @@ "method" : "GET" }, "comments_stats_by_page" : { - "required" : [ - "url", - "format", - "key" - ], + "params" : { + "required" : [ + "url", + "format", + "key" + ] + }, "expected" : [ "200" ], @@ -31,11 +35,13 @@ "method" : "GET" }, "comments_connect_stats" : { - "required" : [ - "format", - "url", - "key" - ], + "params" : { + "required" : [ + "format", + "url", + "key" + ] + }, "expected" : [ "200" ], @@ -43,15 +49,17 @@ "method" : "GET" }, "comments_search" : { - "params" : [ - "start", - "end" - ], - "required" : [ - "format", - "q", - "key" - ], + "params" : { + "required" : [ + "format", + "q", + "key" + ], + "optional" : [ + "start", + "end" + ] + }, "expected" : [ "200" ], @@ -59,11 +67,13 @@ "method" : "GET" }, "comments_by_author_from_url" : { - "required" : [ - "format", - "key", - "url" - ], + "params" : { + "required" : [ + "format", + "key", + "url" + ] + }, "expected" : [ "200" ], @@ -71,11 +81,13 @@ "method" : "GET" }, "comments_by_page" : { - "required" : [ - "url", - "format", - "key" - ], + "params" : { + "required" : [ + "url", + "format", + "key" + ] + }, "expected" : [ "200" ], diff --git a/services/github.json b/services/github.json index 642ef5c..2e5b161 100644 --- a/services/github.json +++ b/services/github.json @@ -1,179 +1,220 @@ { "api_base_url" : "http://github.com/api/v2/", - "version" : "0.1", + "version" : "0.2", "methods" : { "follow" : { - "required" : [ - "user", - "format" - ], + "params" : { + "required" : [ + "user", + "format" + ] + }, "path" : "/:format/user/follow/:user", "method" : "POST", - "authentication" : "1" + "authentication" : true }, "user_search" : { - "required" : [ - "format", - "search" - ], + "params" : { + "required" : [ + "format", + "search" + ] + }, "path" : "/:format/user/search/:search", "method" : "GET" }, "unfollow" : { - "required" : [ - "user", - "format" - ], + "params" : { + "required" : [ + "user", + "format" + ] + }, "path" : "/:format/user/unfollow/:user", "method" : "POST", - "authentication" : "1" + "authentication" : true }, "unwatch_repo" : { - "required" : [ - "format", - "user", - "repo" - ], + "params" : { + "required" : [ + "format", + "user", + "repo" + ] + }, "path" : "/:format/repos/unwatch/:user/:repo", "method" : "GET", - "authentication" : "1" + "authentication" : true }, "user_information" : { - "required" : [ - "username", - "format" - ], + "params" : { + "required" : [ + "username", + "format" + ] + }, "path" : "/:format/user/show/:username", "method" : "GET" }, "list_public_keys" : { - "required" : [ - "format" - ], + "params" : { + "required" : [ + "format" + ] + }, "path" : "/:format/user/keys", "method" : "GET", - "authentication" : "1" + "authentication" : true }, "repos_info" : { - "required" : [ - "format", - "user", - "repo" - ], + "params" : { + "required" : [ + "format", + "user", + "repo" + ] + }, "path" : "/:format/repos/:user/:repo", "method" : "GET" }, "add_public_key" : { - "required" : [ - "format" - ], + "params" : { + "required" : [ + "format" + ] + }, "path" : "/:format/user/key/add", "method" : "POST", - "authentication" : "1" + "authentication" : true }, "fork_repos" : { - "required" : [ - "format", - "user", - "repo" - ], + "params" : { + "required" : [ + "format", + "user", + "repo" + ] + }, "path" : "/:format/repos/fork/:user/:repo", "method" : "GET", - "authentication" : "1" + "authentication" : true }, "my_information" : { - "required" : [ - "username", - "format" - ], + "params" : { + "required" : [ + "username", + "format" + ] + }, "path" : "/:format/user/show/:username", "method" : "GET", - "authentication" : "1" + "authentication" : true }, "list_all_repos" : { - "required" : [ - "format", - "user" - ], + "params" : { + "required" : [ + "format", + "user", + "repo" + ] + }, "path" : "/:format/repos/show/:user", "method" : "GET" }, "repos_search" : { - "required" : [ - "format", - "q" - ], + "params" : { + "required" : [ + "format", + "q" + ] + }, "path" : "/:format/repos/search/:q", "method" : "GET" }, "update_profile" : { - "required" : [ - "username", - "format" - ], + "params" : { + "required" : [ + "username", + "format" + ] + }, "path" : "/:format/user/show/:username", "method" : "POST", - "authentication" : "1" + "authentication" : true }, "watch_repo" : { - "required" : [ - "format", - "user", - "repo" - ], + "params" : { + "required" : [ + "format", + "user", + "repo" + ] + }, "path" : "/:format/repos/watch/:user/:repo", "method" : "GET", - "authentication" : "1" + "authentication" : true }, "create_repo" : { - "required" : [ - "format" - ], + "params" : { + "required" : [ + "format" + ] + }, "path" : "/:format/repos/create", "method" : "POST", - "authentication" : "1" + "authentication" : true }, "user_following" : { - "required" : [ - "user", - "format" - ], + "params" : { + "required" : [ + "user", + "format" + ] + }, "path" : "/:format/user/show/:user/following", "method" : "GET" }, "set_repo_info" : { - "required" : [ - "format", - "user", - "repo" - ], + "params" : { + "required" : [ + "format", + "user", + "repo" + ] + }, "path" : "/:format/repos/show/:user/:repo", "method" : "POST", - "authentication" : "1" + "authentication" : true }, "watched_repos" : { - "required" : [ - "format", - "user" - ], + "params" : { + "required" : [ + "format", + "user" + ] + }, "path" : "/:format/user/watched/:user", "method" : "GET" }, "user_followers" : { - "required" : [ - "user", - "format" - ], + "params" : { + "required" : [ + "user", + "format" + ] + }, "path" : "/:format/user/show/:user/followers", "method" : "GET" }, "del_public_key" : { - "required" : [ - "format" - ], + "params" : { + "required" : [ + "format" + ] + }, "path" : "/:format/user/key/remove", "method" : "POST", - "authentication" : "1" + "authentication" : true } }, "name" : "GitHub", diff --git a/services/ihackernews.json b/services/ihackernews.json index dcfaf4e..a63353b 100644 --- a/services/ihackernews.json +++ b/services/ihackernews.json @@ -1,11 +1,13 @@ { "api_base_url" : "api.ihackernews.com", - "version" : "0.01", + "version" : "0.02", "methods" : { "askhn_posts" : { - "params" : [ - "nextid" - ], + "params" : { + "optional" : [ + "nextid" + ] + }, "expected" : [ "200" ], @@ -21,9 +23,11 @@ "method" : "POST" }, "new_posts" : { - "params" : [ - "nextid" - ], + "params" : { + "optional" : [ + "nextid" + ] + }, "expected" : [ "200" ], @@ -35,9 +39,11 @@ "method" : "POST" }, "user_profile" : { - "required" : [ - "userid" - ], + "params" : { + "required" : [ + "userid" + ] + }, "expected" : [ "200" ], @@ -45,9 +51,11 @@ "method" : "GET" }, "retrieve_page" : { - "params" : [ - "nextid" - ], + "params" : { + "optinal" : [ + "nextid" + ] + }, "expected" : [ "200" ], @@ -55,12 +63,14 @@ "method" : "GET" }, "posts_from_user" : { - "params" : [ - "nextid" - ], - "required" : [ - "username" - ], + "params" : { + "required" : [ + "username" + ], + "optional" : [ + "nextid" + ] + }, "expected" : [ "200" ], @@ -68,9 +78,11 @@ "method" : "GET" }, "comments_for_post" : { - "required" : [ - "id" - ], + "params" : { + "required" : [ + "id" + ] + }, "expected" : [ "200" ], diff --git a/services/twitter.json b/services/twitter.json index a9acff2..cc5cfd8 100644 --- a/services/twitter.json +++ b/services/twitter.json @@ -1,115 +1,149 @@ { "api_base_url" : "http://api.twitter.com/1", - "version" : "0.1", + "version" : "0.2", "methods" : { "retweets_of_me" : { - "params" : [ - "since_id", - "max_id", - "count", - "page", - "trim_user", - "include_entities" - ], + "params" : { + "required" : [ + "format" + ], + "optional" : [ + "since_id", + "max_id", + "count", + "page", + "trim_user", + "include_entities" + ] + }, "path" : "/statuses/retweets_of_me.:format", "method" : "GET", - "authentication" : "1" + "authentication" : true }, "friends_timeline" : { - "params" : [ - "since_id", - "max_id", - "count", - "page", - "trim_user", - "include_rts", - "include_entities" - ], + "params" : { + "required" : [ + "format" + ], + "optional" : [ + "since_id", + "max_id", + "count", + "page", + "trim_user", + "include_rts", + "include_entities" + ] + }, "path" : "/statuses/friends_timeline.:format", "method" : "GET", - "authentication" : "1" + "authentication" : true }, "user_timeline" : { - "params" : [ - "user_id", - "screen_name", - "since_id", - "max_id", - "count", - "page", - "trim_user", - "include_rts", - "include_entities" - ], + "params" : { + "required" : [ + "format" + ], + "optional" : [ + "user_id", + "screen_name", + "since_id", + "max_id", + "count", + "page", + "trim_user", + "include_rts", + "include_entities" + ] + }, "path" : "/statuses/user_timeline.:format", "method" : "GET" }, "public_timeline" : { - "params" : [ - "trim_user", - "include_entities" - ], - "required" : [ - "format" - ], + "params" : { + "required" : [ + "format" + ], + "optional" : [ + "trim_user", + "include_entities" + ] + }, "path" : "/statuses/public_timeline.:format", "method" : "GET" }, "mentions" : { - "params" : [ - "since_id", - "max_id", - "count", - "page", - "trim_user", - "include_rts", - "include_entities" - ], + "params" : { + "required" : [ + "format" + ], + "optional" : [ + "since_id", + "max_id", + "count", + "page", + "trim_user", + "include_rts", + "include_entities" + ] + }, "path" : "/statuses/mentions.:format", "method" : "GET", - "authentication" : "1" + "authentication" : true }, "home_timeline" : { - "params" : [ - "since_id", - "max_id", - "count", - "page", - "trim_user", - "include_entities" - ], - "required" : [ - "format" - ], + "params" : { + "params" : [ + "since_id", + "max_id", + "count", + "page", + "trim_user", + "include_entities" + ], + "required" : [ + "format" + ] + }, "path" : "/statuses/home_timeline.:format", "method" : "GET", - "authentication" : "1" + "authentication" : true }, "retweeted_by_me" : { - "params" : [ - "since_id", - "max_id", - "count", - "page", - "trim_user", - "include_entities" - ], + "params" : { + "required" : [ + "format" + ], + "optional" : [ + "since_id", + "max_id", + "count", + "page", + "trim_user", + "include_entities" + ] + }, "path" : "/statuses/retweeted_by_me.:format", "method" : "GET", - "authentication" : "1" + "authentication" : true }, "retweeted_to_me" : { - "params" : [ - "since_id", - "max_id", - "count", - "page", - "trim_user", - "include_entities" - ], + "params" : { + "required" : [ + "format" + ], + "optional" : [ + "since_id", + "max_id", + "count", + "page", + "trim_user", + "include_entities" + ] + }, "path" : "/statuses/retweeted_to_me.:format", "method" : "GET", - "authentication" : "1" + "authentication" : true } }, "api_format" : [ |