From b941bc588aaeffdbe99dfa4438dcce1a241dc405 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Mon, 25 Oct 2010 11:44:42 +0200 Subject: github: add form-data, and more repo methods --- services/github/user.json | 142 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 99 insertions(+), 43 deletions(-) (limited to 'services/github/user.json') 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 ], -- cgit v1.2.3