Twinstang API

Welcome to the documentation for the Twinstang api.

Getting Started

The api is like most apis. Currently it only supports basic auth but plans for oauth are in the works. Usage is simple. Use /api/v1/whatevermethod you want. Everything is returned as json.

Methods


help/test

Tests the api is live.

URL

http://twinstang.com/api/v1/help/test

Formats

json, js

HTTP Method

GET

Authentication

none

Usage Notes
Example queries
Curl example

help/test_basic_auth

Tests the api is live and your basic auth is working.

URL

http://twinstang.com/api/v1/help/test_basic_auth

Formats

json, js

HTTP Method

GET

Authentication

basic auth

Usage Notes
Example queries
Curl example

users/:login

Get user information about a user by querying by login.

URL

http://twinstang.com/api/v1/users/:login

Formats

json, js

HTTP Method

GET

Authentication

none

Usage Notes
Example queries
Curl example

users/:login/total_flights

Get the total flights count a user has entered by querying by login.

URL

http://twinstang.com/api/v1/users/:login/total_flights

Formats

json, js

HTTP Method

GET

Authentication

none

Usage Notes
Example queries
Curl example

users/:login/flights

Get the recent 20 flights from a user

URL

http://twinstang.com/api/v1/users/:login/flights

Formats

json, js

HTTP Method

GET

Authentication

none

Usage Notes
Example queries
Curl example

flights

Get the recent flights from the current user's flight stream

URL

http://twinstang.com/api/v1/flights

Formats

json, js

HTTP Method

GET

Authentication

http auth

Usage Notes
Example queries
Curl example

flights POST

create a flight for the current user

URL

http://twinstang.com/api/v1/flights

Formats

json, js

HTTP Method

POST

Authentication

http auth

Usage Notes
Example queries
Curl example

users/:login or users/update_settings PUT

Sets and updates values that users are able to set under their settings page.

URL

http://twinstang.com/api/v1/users/:login or http://twinstang.com/api/v1/users/update_settings

Formats

json, js

HTTP Method

PUT

Authentication

http auth

Usage Notes
Example queries
Curl example