Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

Api Guide

mockra edited this page Jun 15, 2012 · 1 revision

Tangela API Guide

Authorization for the Tangela API is handled through OAuth. Currently the project, note, and resource models are available.

Create your Application

To get started using the Tangela API, you'll need to register a user account. You can do this here.

Once you've registered, you can create your application here.

OAuth Application

After you've registered your application, you'll get the application_id and secret_key you need.

Application Keys

Setting up OAuth

gem install oauth2

require 'oauth2'

# Initialize your client
client = OAuth2::Client.new(your_application_id, your_application_secret, site: 'http://tangela.info')

# Get the authorization code
code = client.auth_code.authorize_url(redirect_uri: your_redirect_uri)

# Get an access token
token = client.auth_code.get_token(code, redirect_uri: your_redirect_uri)

You can then access the API information with the following commands:

token.get('/api/v1/projects.json').parsed

API Routes

/api/v1/projects.json Returns all of the user's projects

/api/v1/projects/1.json Returns a specific project

Clone this wiki locally