Skip to content
Browse files

add Google URL Shortener

add Google OAuth 1.0
  • Loading branch information...
1 parent 507c657 commit 264062ae71ea8aa4fc38e4477c35c25453eed3d5 @fperrad fperrad committed Jun 6, 2011
View
4 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 \
View
75 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"
+ }
+}
View
BIN services/googleoauth.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
41 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"
+ }
+}
View
BIN services/googleshortener.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
1 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"

0 comments on commit 264062a

Please sign in to comment.
Something went wrong with that request. Please try again.