- User Goals API repo: https://github.com/3scale/3scale-workshop
- Heroku One Click Deploy 3scale API Gateway repo: https://github.com/3scale/oneclick-api-gateway-heroku
- Admin dashboard: https://{YOUR_SUBDOMAIN}-{EVENT_NAME}-admin.3scale.net - e.g https://3scale-apistrat-admin.3scale.net
- Developer Portal: https://{YOUR_SUBDOMAIN}-{EVENT_NAME}.3scale.net - e.g https://3scale-nordicapis.3scale.net
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// save the original open | |
var originalOpen = XMLHttpRequest.prototype.open; | |
function onLoad(event) { | |
var jsonResponse = JSON.parse(this.response); | |
if('access_token' in jsonResponse){ | |
populate_access_tokens(jsonResponse.access_token) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basePath": "http://nginx-oauth.herokuapp.com", | |
"apiVersion": "v1", | |
"apis": [ | |
{ | |
"path": "/oauth/token", | |
"operations": [ | |
{ | |
"httpMethod": "POST", | |
"summary": "Returns the Access Token to call the API", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe width="975" height="750" seamless=true src="https://developers.google.com/oauthplayground/#step1&scopes=write&useDefaultOauthCred=unchecked&oauthEndpointSelect=Custom&oauthAuthEndpointValue=https%3A//address-book-app-webhooks.herokuapp.com/oauth/new&oauthTokenEndpointValue=https%3A//address-book-app-webhooks.herokuapp.com/oauth/token.json&includeCredentials=unchecked&accessTokenType=query&autoRefreshToken=unchecked&accessType=offline&forceAprovalPrompt=checked&response_type=token&oauthClientId={{ current_user.account.applications.first.application_id }}"></iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe width="975" height="750" seamless=true src="https://developers.google.com/oauthplayground/#step1&scopes=write&useDefaultOauthCred=unchecked&oauthEndpointSelect=Custom&oauthAuthEndpointValue=https%3A//address-book-app-webhooks.herokuapp.com/oauth/new&oauthTokenEndpointValue=https%3A//address-book-app-webhooks.herokuapp.com/oauth/token.json&includeCredentials=unchecked&accessTokenType=query&autoRefreshToken=unchecked&accessType=offline&forceAprovalPrompt=checked&response_type=code&oauthClientId={{ current_user.account.applications.first.application_id }}&oauthClientSecret={{ current_user.account.applications.first.keys.first }}"></iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basePath": "http://sentiment-api.herokuapp.com", | |
"apiVersion": "v1", | |
"apis": [ | |
{ | |
"path": "/v1/words/{word}.json", | |
"operations": [ | |
{ | |
"httpMethod": "GET", | |
"summary": "Returns the sentiment value of a given word", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.action_dispatch.default_headers['X-Frame-Options'] = "ALLOW-FROM https://developers.google.com/oauthplayground" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(function(){ | |
ThreeScale.APIDocs.init(['oauth','sentiment']); | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function M.connect_redis(red) | |
redisurl = os.getenv("REDISTOGO_URL") | |
redisurl_connect = string.split(redisurl, ":")[3] | |
redisurl_user = string.split(redisurl_connect, "@")[1] | |
redisurl_host = string.split(redisurl_connect, "@")[2] | |
redisurl_port = tonumber(string.split(redisurl, ":")[4]) | |
local ok, err = red:connect(redisurl_host, redisurl_port) | |
if not ok then | |
ngx.say("failed to connect: ", err) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Favicon --> | |
<link rel="shortcut icon" href="/images/icon.ico" type="image/x-icon" /> |
OlderNewer