summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Perrad <francois.perrad@gadz.org>2011-06-06 02:47:01 +0200
committerFrancois Perrad <francois.perrad@gadz.org>2011-06-06 02:47:01 +0200
commit264062ae71ea8aa4fc38e4477c35c25453eed3d5 (patch)
treefb4fd7be775a3f60040cde9289b24645cbbe2b6e
parentadd Google Translate (diff)
downloadapi-description-264062ae71ea8aa4fc38e4477c35c25453eed3d5.tar.gz
add Google URL Shortener
add Google OAuth 1.0
-rw-r--r--services/Makefile4
-rw-r--r--services/googleoauth.json75
-rw-r--r--services/googleoauth.pngbin0 -> 17653 bytes
-rw-r--r--services/googleshortener.json41
-rw-r--r--services/googleshortener.pngbin0 -> 8197 bytes
-rw-r--r--services/googletranslate.json1
6 files changed, 121 insertions, 0 deletions
diff --git a/services/Makefile b/services/Makefile
index cf2be59..2504406 100644
--- a/services/Makefile
+++ b/services/Makefile
@@ -7,6 +7,8 @@ check: spore_validation.rx
@$(VALIDATOR) backtweet.json
@$(VALIDATOR) backtype.json
@$(VALIDATOR) github.json
+ @$(VALIDATOR) googleoauth.json
+ @$(VALIDATOR) googleshortener.json
@$(VALIDATOR) googletranslate.json
@$(VALIDATOR) ihackernews.json
@$(VALIDATOR) ohloh.json
@@ -22,6 +24,8 @@ png: \
backtweet.png \
backtype.png \
github.png \
+ googleoauth.png \
+ googleshortener.png \
googletranslate.png \
ihackernews.png \
ohloh.png \
diff --git a/services/googleoauth.json b/services/googleoauth.json
new file mode 100644
index 0000000..e57dd56
--- /dev/null
+++ b/services/googleoauth.json
@@ -0,0 +1,75 @@
+{
+ "base_url" : "https://www.google.com/accounts",
+ "name" : "Google OAuth 1.0",
+ "methods" : {
+ "get_request_token" : {
+ "path" : "/OAuthGetRequestToken",
+ "method" : "GET",
+ "headers" : {
+ "authorization" : "OAuth oauth_consumer_key=\":oauth_consumer_key\", oauth_signature_method=\":oauth_signature_method\", oauth_signature=\":oauth_signature\", oauth_timestamp=\":oauth_timestamp\", oauth_nonce=\":oauth_nonce\", oauth_version=\":oauth_version\", oauth_callback=\":oauth_callback\""
+ },
+ "required_params" : [
+ "scope"
+ ],
+ "optional_params" : [
+ "xoauth_displayname"
+ ],
+ "expected_status" : [ 200, 400 ],
+ "authentication" : true
+ },
+ "post_request_token" : {
+ "path" : "/OAuthGetRequestToken",
+ "method" : "POST",
+ "headers" : {
+ "authorization" : "OAuth oauth_consumer_key=\":oauth_consumer_key\", oauth_signature_method=\":oauth_signature_method\", oauth_signature=\":oauth_signature\", oauth_timestamp=\":oauth_timestamp\", oauth_nonce=\":oauth_nonce\", oauth_version=\":oauth_version\", oauth_callback=\":oauth_callback\""
+ },
+ "form-data" : {
+ "scope" : ":scope",
+ "xoauth_displayname" : ":xoauth_displayname"
+ },
+ "required_params" : [
+ "scope"
+ ],
+ "optional_params" : [
+ "xoauth_displayname"
+ ],
+ "expected_status" : [ 200, 400 ],
+ "authentication" : true
+ },
+ "authorize_token" : {
+ "path" : "/OAuthAuthorizeToken",
+ "method" : "GET",
+ "required_params" : [
+ "oauth_token"
+ ],
+ "optional_params" : [
+ "hd",
+ "hl",
+ "btmpl"
+ ],
+ "expected_status" : [ 302 ]
+ },
+ "get_access_token" : {
+ "path" : "/OAuthGetAccessToken",
+ "method" : "GET",
+ "headers" : {
+ "authorization" : "OAuth oauth_consumer_key=\":oauth_consumer_key\", oauth_token=\":oauth_token\", oauth_verifier=\":oauth_verifier\", oauth_signature_method=\":oauth_signature_method\", oauth_signature=\":oauth_signature\", oauth_timestamp=\":oauth_timestamp\", oauth_nonce=\":oauth_nonce\", oauth_version=\":oauth_version\""
+ },
+ "expected_status" : [ 200, 400 ],
+ "authentication" : true
+ },
+ "post_access_token" : {
+ "path" : "/OAuthGetAccessToken",
+ "method" : "POST",
+ "headers" : {
+ "authorization" : "OAuth oauth_consumer_key=\":oauth_consumer_key\", oauth_token=\":oauth_token\", oauth_verifier=\":oauth_verifier\", oauth_signature_method=\":oauth_signature_method\", oauth_signature=\":oauth_signature\", oauth_timestamp=\":oauth_timestamp\", oauth_nonce=\":oauth_nonce\", oauth_version=\":oauth_version\""
+ },
+ "expected_status" : [ 200, 400 ],
+ "authentication" : true
+ }
+ },
+ "authority" : "http://github.com/SPORE",
+ "meta" : {
+ "documentation" : "http://code.google.com/apis/accounts/docs/OAuth_ref.html"
+ }
+}
diff --git a/services/googleoauth.png b/services/googleoauth.png
new file mode 100644
index 0000000..7057039
--- /dev/null
+++ b/services/googleoauth.png
Binary files differ
diff --git a/services/googleshortener.json b/services/googleshortener.json
new file mode 100644
index 0000000..6cb586a
--- /dev/null
+++ b/services/googleshortener.json
@@ -0,0 +1,41 @@
+{
+ "name" : "Google URL Shortener",
+ "version" : "0.1",
+ "base_url" : "https://www.googleapis.com/urlshortener/v1/url",
+ "methods" : {
+ "insert" : {
+ "path" : "",
+ "method" : "POST",
+ "required_payload" : true,
+ "optional_params" : [
+ "key"
+ ]
+ },
+ "get" : {
+ "path" : "",
+ "method" : "GET",
+ "required_params" : [
+ "shortUrl"
+ ],
+ "optional_params" : [
+ "key",
+ "projection"
+ ]
+ },
+ "list" : {
+ "path" : "/history",
+ "method" : "GET",
+ "optional_params" : [
+ "key",
+ "projection",
+ "start-token"
+ ],
+ "authentication" : true
+ }
+ },
+ "expected_status": [ "200" ],
+ "authority" : "http://github.com/SPORE",
+ "meta" : {
+ "documentation" : "http://code.google.com/apis/urlshortener/v1/getting_started.html"
+ }
+}
diff --git a/services/googleshortener.png b/services/googleshortener.png
new file mode 100644
index 0000000..ef9dc62
--- /dev/null
+++ b/services/googleshortener.png
Binary files differ
diff --git a/services/googletranslate.json b/services/googletranslate.json
index 53682df..68d9cdc 100644
--- a/services/googletranslate.json
+++ b/services/googletranslate.json
@@ -30,6 +30,7 @@
]
}
},
+ "expected_status": [ "200" ],
"authority" : "http://github.com/SPORE",
"meta" : {
"documentation" : "https://code.google.com/apis/language/translate/v2/getting_started.html"