diff options
author | Francois Perrad <francois.perrad@gadz.org> | 2010-10-25 11:44:42 +0200 |
---|---|---|
committer | Francois Perrad <francois.perrad@gadz.org> | 2010-10-25 11:44:42 +0200 |
commit | b941bc588aaeffdbe99dfa4438dcce1a241dc405 (patch) | |
tree | dc64235f366b359a30757fa47bd58dcd5b59a65e | |
parent | add expected_status at top level (diff) | |
download | api-description-b941bc588aaeffdbe99dfa4438dcce1a241dc405.tar.gz |
github: add form-data, and more repo methods
-rw-r--r-- | services/github.json | 390 | ||||
-rw-r--r-- | services/github/repository.json | 235 | ||||
-rw-r--r-- | services/github/user.json | 142 |
3 files changed, 633 insertions, 134 deletions
diff --git a/services/github.json b/services/github.json index 4d74219..755240e 100644 --- a/services/github.json +++ b/services/github.json @@ -2,178 +2,428 @@ "base_url" : "http://github.com/api/v2/", "version" : "0.2", "methods" : { - "follow" : { + "user_search" : { + "path" : "/:format/user/search/:search", + "method" : "GET", + "required_params" : [ + "format", + "search" + ] + }, + "user_information" : { + "path" : "/:format/user/show/:username", + "method" : "GET", + "required_params" : [ + "format", + "username" + ] + }, + "my_information" : { + "path" : "/:format/user/show", + "method" : "GET", "required_params" : [ - "user", "format" ], - "path" : "/:format/user/follow/:user", + "authentication" : true + }, + "update_profile" : { + "path" : "/:format/user/show/:username", "method" : "POST", + "form-data" : { + "values[name]" : ":name", + "values[email]" : ":email", + "values[blog]" : ":blog", + "values[company]" : ":company", + "values[location]" : ":location" + }, + "required_params" : [ + "format", + "username" + ], + "optional_params" : [ + "name", + "email", + "blog", + "company", + "location" + ], "authentication" : true }, - "user_search" : { + "user_following" : { + "path" : "/:format/user/show/:user/following", + "method" : "GET", "required_params" : [ "format", - "search" + "user" + ] + }, + "user_followers" : { + "path" : "/:format/user/show/:user/followers", + "method" : "GET", + "required_params" : [ + "format", + "user" + ] + }, + "follow" : { + "path" : "/:format/user/follow/:user", + "method" : "POST", + "required_params" : [ + "format", + "user" ], - "path" : "/:format/user/search/:search", - "method" : "GET" + "authentication" : true }, "unfollow" : { + "path" : "/:format/user/unfollow/:user", + "method" : "POST", + "required_params" : [ + "format", + "user" + ], + "authentication" : true + }, + "watched_repos" : { + "path" : "/:format/repos/watched/:user", + "method" : "GET", + "required_params" : [ + "format", + "user" + ] + }, + "list_public_keys" : { + "path" : "/:format/user/keys", + "method" : "GET", "required_params" : [ - "user", "format" ], - "path" : "/:format/user/unfollow/:user", + "authentication" : true + }, + "add_public_key" : { + "path" : "/:format/user/key/add", "method" : "POST", + "form-data" : { + "title" : ":title", + "key" : ":key" + }, + "required_params" : [ + "format", + "title", + "key" + ], "authentication" : true }, - "unwatch_repo" : { + "del_public_key" : { + "path" : "/:format/user/key/remove", + "method" : "POST", + "form-data" : { + "id" : ":id" + }, "required_params" : [ "format", - "user", - "repo" + "id" ], - "path" : "/:format/repos/unwatch/:user/:repo", - "method" : "GET", "authentication" : true }, - "user_information" : { + "list_emails" : { + "path" : "/:format/user/emails", + "method" : "GET", "required_params" : [ - "username", "format" ], - "path" : "/:format/user/show/:username", - "method" : "GET" + "authentication" : true }, - "list_public_keys" : { + "add_email" : { + "path" : "/:format/user/email/add", + "method" : "POST", + "form-data" : { + "email" : ":email" + }, "required_params" : [ - "format" + "format", + "email" ], - "path" : "/:format/user/keys", - "method" : "GET", "authentication" : true }, + "del_email" : { + "path" : "/:format/user/email/remove", + "method" : "POST", + "form-data" : { + "email" : ":email" + }, + "required_params" : [ + "format", + "email" + ], + "authentication" : true + }, + + "repos_search" : { + "path" : "/:format/repos/search/:q", + "method" : "GET", + "required_params" : [ + "format", + "q" + ], + "optional_params" : [ + "start_page", + "language" + ] + }, "repos_info" : { + "path" : "/:format/repos/:user/:repo", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] + }, + "set_repo_info" : { + "path" : "/:format/repos/show/:user/:repo", + "method" : "POST", + "form-data" : { + "values[description]" : ":description", + "values[homepage]" : ":homepage", + "values[has_wiki]" : ":has_wiki", + "values[has_issues]" : ":has_issues", + "values[has_download]" : ":has_download" + }, "required_params" : [ "format", "user", "repo" ], - "path" : "/:format/repos/:user/:repo", - "method" : "GET" + "optional_params" : [ + "description", + "homepage", + "has_wiki", + "has_issues", + "has_download" + ], + "authentication" : true }, - "add_public_key" : { + "list_all_repos" : { + "path" : "/:format/repos/show/:user", + "method" : "GET", "required_params" : [ - "format" + "format", + "user" + ] + }, + "watch_repo" : { + "path" : "/:format/repos/watch/:user/:repo", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" ], - "path" : "/:format/user/key/add", - "method" : "POST", "authentication" : true }, - "fork_repos" : { + "unwatch_repo" : { + "path" : "/:format/repos/unwatch/:user/:repo", + "method" : "GET", "required_params" : [ "format", "user", "repo" ], + "authentication" : true + }, + "fork_repos" : { "path" : "/:format/repos/fork/:user/:repo", "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ], "authentication" : true }, - "my_information" : { + "create_repo" : { + "path" : "/:format/repos/create", + "method" : "POST", + "form-data" : { + "name" : ":name", + "description" : ":description", + "homepage" : ":homepage", + "public" : ":public" + }, "required_params" : [ - "format" + "format", + "name" + ], + "optional_params" : [ + "description", + "homepage", + "public" ], - "path" : "/:format/user/show", - "method" : "GET", "authentication" : true }, - "list_all_repos" : { + "del_repo" : { + "path" : "/:format/repos/delete/:user/:repo", + "method" : "POST", "required_params" : [ "format", "user", "repo" ], - "path" : "/:format/repos/show/:user", - "method" : "GET" + "authentication" : true }, - "repos_search" : { + "set_private" : { + "path" : "/:format/repos/set/private/:user/:repo", + "method" : "POST", "required_params" : [ "format", - "q" + "user", + "repo" ], - "path" : "/:format/repos/search/:q", - "method" : "GET" + "authentication" : true }, - "update_profile" : { + "set_public" : { + "path" : "/:format/repos/set/public/:user/:repo", + "method" : "POST", "required_params" : [ - "username", - "format" + "format", + "user", + "repo" ], - "path" : "/:format/user/show/:username", - "method" : "POST", "authentication" : true }, - "watch_repo" : { + "list_repo_keys" : { + "path" : "/:format/repos/keys/:user/:repo", + "method" : "GET", "required_params" : [ "format", "user", "repo" ], - "path" : "/:format/repos/watch/:user/:repo", - "method" : "GET", "authentication" : true }, - "create_repo" : { + "add_repo_key" : { + "path" : "/:format/repos/key/:user/:repo/add", + "method" : "POST", + "form-data" : { + "title" : ":title", + "key" : ":key" + }, "required_params" : [ - "format" + "format", + "user", + "repo", + "title", + "key" ], - "path" : "/:format/repos/create", - "method" : "POST", "authentication" : true }, - "user_following" : { + "del_repo_key" : { + "path" : "/:format/repos/key/:user/:repo/remove", + "method" : "POST", + "form-data" : { + "id" : ":id" + }, "required_params" : [ + "format", "user", - "format" + "repo", + "id" ], - "path" : "/:format/user/show/:user/following", - "method" : "GET" + "authentication" : true }, - "set_repo_info" : { + "list_collaborators" : { + "path" : "/:format/repos/show/:user/:repo/collaborators", + "method" : "GET", "required_params" : [ "format", "user", "repo" ], - "path" : "/:format/repos/show/:user/:repo", - "method" : "POST", "authentication" : true }, - "watched_repos" : { + "add_collaborator" : { + "path" : "/:format/repos/collaborators/:user/:repo/add/:collaborator", + "method" : "POST", "required_params" : [ "format", - "user" + "user", + "repo", + "collaborator" ], - "path" : "/:format/repos/watched/:user", - "method" : "GET" + "authentication" : true }, - "user_followers" : { + "del_collaborator" : { + "path" : "/:format/repos/collaborators/:user/:repo/remove/:collaborator", + "method" : "POST", "required_params" : [ + "format", "user", - "format" + "repo", + "collaborator" ], - "path" : "/:format/user/show/:user/followers", - "method" : "GET" + "authentication" : true }, - "del_public_key" : { + "list_pushable" : { + "path" : "/:format/repos/pushable", + "method" : "GET", "required_params" : [ "format" ], - "path" : "/:format/user/key/remove", - "method" : "POST", "authentication" : true + }, + "list_contributors" : { + "path" : "/:format/repos/show/:user/:repo/contributors", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] + }, + "repo_watchers" : { + "path" : "/:format/repos/show/:user/:repo/watchers", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] + }, + "repo_network" : { + "path" : "/:format/repos/show/:user/:repo/network", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] + }, + "repo_languages" : { + "path" : "/:format/repos/show/:user/:repo/languages", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] + }, + "repo_tags" : { + "path" : "/:format/repos/show/:user/:repo/tags", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] + }, + "repo_branches" : { + "path" : "/:format/repos/show/:user/:repo/branches", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] } }, "expected_status" : [ 200 ], diff --git a/services/github/repository.json b/services/github/repository.json index f86709e..b5b20e3 100644 --- a/services/github/repository.json +++ b/services/github/repository.json @@ -2,79 +2,272 @@ "base_url" : "http://github.com/api/v2/", "version" : "0.2", "methods" : { - "unwatch_repo" : { + "repos_search" : { + "path" : "/:format/repos/search/:q", + "method" : "GET", + "required_params" : [ + "format", + "q" + ], + "optional_params" : [ + "start_page", + "language" + ] + }, + "repos_info" : { + "path" : "/:format/repos/:user/:repo", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] + }, + "set_repo_info" : { + "path" : "/:format/repos/show/:user/:repo", + "method" : "POST", + "form-data" : { + "values[description]" : ":description", + "values[homepage]" : ":homepage", + "values[has_wiki]" : ":has_wiki", + "values[has_issues]" : ":has_issues", + "values[has_download]" : ":has_download" + }, "required_params" : [ "format", "user", "repo" ], - "path" : "/:format/repos/unwatch/:user/:repo", - "method" : "GET", + "optional_params" : [ + "description", + "homepage", + "has_wiki", + "has_issues", + "has_download" + ], "authentication" : true }, - "repos_info" : { + "list_all_repos" : { + "path" : "/:format/repos/show/:user", + "method" : "GET", + "required_params" : [ + "format", + "user" + ] + }, + "watch_repo" : { + "path" : "/:format/repos/watch/:user/:repo", + "method" : "GET", "required_params" : [ "format", "user", "repo" ], - "path" : "/:format/repos/:user/:repo", - "method" : "GET" + "authentication" : true }, - "fork_repos" : { + "unwatch_repo" : { + "path" : "/:format/repos/unwatch/:user/:repo", + "method" : "GET", "required_params" : [ "format", "user", "repo" ], + "authentication" : true + }, + "fork_repos" : { "path" : "/:format/repos/fork/:user/:repo", "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ], "authentication" : true }, - "list_all_repos" : { + "create_repo" : { + "path" : "/:format/repos/create", + "method" : "POST", + "form-data" : { + "name" : ":name", + "description" : ":description", + "homepage" : ":homepage", + "public" : ":public" + }, + "required_params" : [ + "format", + "name" + ], + "optional_params" : [ + "description", + "homepage", + "public" + ], + "authentication" : true + }, + "del_repo" : { + "path" : "/:format/repos/delete/:user/:repo", + "method" : "POST", "required_params" : [ "format", "user", "repo" ], - "path" : "/:format/repos/show/:user", - "method" : "GET" + "authentication" : true }, - "repos_search" : { + "set_private" : { + "path" : "/:format/repos/set/private/:user/:repo", + "method" : "POST", "required_params" : [ "format", - "q" + "user", + "repo" ], - "path" : "/:format/repos/search/:q", - "method" : "GET" + "authentication" : true }, - "watch_repo" : { + "set_public" : { + "path" : "/:format/repos/set/public/:user/:repo", + "method" : "POST", "required_params" : [ "format", "user", "repo" ], - "path" : "/:format/repos/watch/:user/:repo", + "authentication" : true + }, + "list_repo_keys" : { + "path" : "/:format/repos/keys/:user/:repo", "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ], "authentication" : true }, - "create_repo" : { + "add_repo_key" : { + "path" : "/:format/repos/key/:user/:repo/add", + "method" : "POST", + "form-data" : { + "title" : ":title", + "key" : ":key" + }, "required_params" : [ - "format" + "format", + "user", + "repo", + "title", + "key" ], - "path" : "/:format/repos/create", + "authentication" : true + }, + "del_repo_key" : { + "path" : "/:format/repos/key/:user/:repo/remove", "method" : "POST", + "form-data" : { + "id" : ":id" + }, + "required_params" : [ + "format", + "user", + "repo", + "id" + ], "authentication" : true }, - "set_repo_info" : { + "list_collaborators" : { + "path" : "/:format/repos/show/:user/:repo/collaborators", + "method" : "GET", "required_params" : [ "format", "user", "repo" ], - "path" : "/:format/repos/show/:user/:repo", + "authentication" : true + }, + "add_collaborator" : { + "path" : "/:format/repos/collaborators/:user/:repo/add/:collaborator", "method" : "POST", + "required_params" : [ + "format", + "user", + "repo", + "collaborator" + ], + "authentication" : true + }, + "del_collaborator" : { + "path" : "/:format/repos/collaborators/:user/:repo/remove/:collaborator", + "method" : "POST", + "required_params" : [ + "format", + "user", + "repo", + "collaborator" + ], + "authentication" : true + }, + "list_pushable" : { + "path" : "/:format/repos/pushable", + "method" : "GET", + "required_params" : [ + "format" + ], "authentication" : true + }, + "list_contributors" : { + "path" : "/:format/repos/show/:user/:repo/contributors", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] + }, + "repo_watchers" : { + "path" : "/:format/repos/show/:user/:repo/watchers", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] + }, + "repo_network" : { + "path" : "/:format/repos/show/:user/:repo/network", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] + }, + "repo_languages" : { + "path" : "/:format/repos/show/:user/:repo/languages", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] + }, + "repo_tags" : { + "path" : "/:format/repos/show/:user/:repo/tags", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] + }, + "repo_branches" : { + "path" : "/:format/repos/show/:user/:repo/branches", + "method" : "GET", + "required_params" : [ + "format", + "user", + "repo" + ] } }, "expected_status" : [ 200 ], diff --git a/services/github/user.json b/services/github/user.json index d9c9aff..3f5a8dc 100644 --- a/services/github/user.json +++ b/services/github/user.json @@ -3,103 +3,159 @@ "version" : "0.2", "methods" : { "user_search" : { + "path" : "/:format/user/search/:search", + "method" : "GET", "required_params" : [ "format", "search" - ], - "path" : "/:format/user/search/:search", - "method" : "GET" + ] }, "user_information" : { - "required_params" : [ - "username", - "format" - ], "path" : "/:format/user/show/:username", - "method" : "GET" + "method" : "GET", + "required_params" : [ + "format", + "username" + ] }, "my_information" : { + "path" : "/:format/user/show", + "method" : "GET", "required_params" : [ "format" ], - "path" : "/:format/user/show", - "method" : "GET", "authentication" : true }, "update_profile" : { - "required_params" : [ - "username", - "format" - ], "path" : "/:format/user/show/:username", "method" : "POST", + "form-data" : { + "values[name]" : ":name", + "values[email]" : ":email", + "values[blog]" : ":blog", + "values[company]" : ":company", + "values[location]" : ":location" + }, + "required_params" : [ + "format", + "username" + ], + "optional_params" : [ + "name", + "email", + "blog", + "company", + "location" + ], "authentication" : true }, - "follow" : { + "user_following" : { + "path" : "/:format/user/show/:user/following", + "method" : "GET", "required_params" : [ - "user", - "format" - ], + "format", + "user" + ] + }, + "user_followers" : { + "path" : "/:format/user/show/:user/followers", + "method" : "GET", + "required_params" : [ + "format", + "user" + ] + }, + "follow" : { "path" : "/:format/user/follow/:user", "method" : "POST", + "required_params" : [ + "format", + "user" + ], "authentication" : true }, "unfollow" : { - "required_params" : [ - "user", - "format" - ], "path" : "/:format/user/unfollow/:user", "method" : "POST", + "required_params" : [ + "format", + "user" + ], "authentication" : true }, + "watched_repos" : { + "path" : "/:format/repos/watched/:user", + "method" : "GET", + "required_params" : [ + "format", + "user" + ] + }, "list_public_keys" : { + "path" : "/:format/user/keys", + "method" : "GET", "required_params" : [ "format" ], - "path" : "/:format/user/keys", - "method" : "GET", "authentication" : true }, "add_public_key" : { - "required_params" : [ - "format" - ], "path" : "/:format/user/key/add", "method" : "POST", + "form-data" : { + "title" : ":title", + "key" : ":key" + }, + "required_params" : [ + "format", + "title", + "key" + ], "authentication" : true }, "del_public_key" : { - "required_params" : [ - "format" - ], "path" : "/:format/user/key/remove", "method" : "POST", + "form-data" : { + "id" : ":id" + }, + "required_params" : [ + "format", + "id" + ], "authentication" : true }, - "user_following" : { + "list_emails" : { + "path" : "/:format/user/emails", + "method" : "GET", "required_params" : [ - "user", "format" ], - "path" : "/:format/user/show/:user/following", - "method" : "GET" + "authentication" : true }, - "watched_repos" : { + "add_email" : { + "path" : "/:format/user/email/add", + "method" : "POST", + "form-data" : { + "email" : ":email" + }, "required_params" : [ "format", - "user" + "email" ], - "path" : "/:format/repos/watched/:user", - "method" : "GET" + "authentication" : true }, - "user_followers" : { + "del_email" : { + "path" : "/:format/user/email/remove", + "method" : "POST", + "form-data" : { + "email" : ":email" + }, "required_params" : [ - "user", - "format" + "format", + "email" ], - "path" : "/:format/user/show/:user/followers", - "method" : "GET" + "authentication" : true } }, "expected_status" : [ 200 ], |