Created
February 16, 2012 15:09
-
-
Save imjasonh/1845502 to your computer and use it in GitHub Desktop.
Discovery document for Foursquare 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
{ | |
"kind": "discovery#restDescription", | |
"id": "foursquare:v2", | |
"name": "foursquare", | |
"version": "v2", | |
"title": "Foursquare API", | |
"description": "Is awesome.", | |
"icons": { | |
"x16": "https://playfoursquare.s3.amazonaws.com/press/logo/icon-16x16.png" | |
}, | |
"documentationLink": "https://developer.foursquare.com/overview/", | |
"labels": [ | |
"third-party" | |
], | |
"protocol": "rest", | |
"baseUrl": "https://api.foursquare.com/v2/", | |
"auth": { | |
"oauth2": { | |
"scopes": { | |
"unused": { | |
"description": "Foursquare API does not have scopes." | |
} | |
} | |
} | |
}, | |
"parameters": { | |
"oauth_token": { | |
"type": "string", | |
"description": "OAuth 2.0 token for the current user", | |
"location": "query", | |
"required": true | |
}, | |
"v": { | |
"type": "string", | |
"description": "Indicates that the client is up to date as of the specified date.", | |
"location": "query", | |
"default": "20120216" | |
} | |
}, | |
"schemas": { | |
"UserResponse": { | |
"id": "UserResponse", | |
"type": "object", | |
"properties": { | |
"meta": { | |
"type": "object", | |
"properties": { | |
"code": { | |
"type": "integer", | |
"description": "HTTP Status code for this request" | |
} | |
} | |
}, | |
"notifications": { | |
"type": "array", | |
"items": { | |
"$ref": "Notification" | |
} | |
}, | |
"response": { | |
"type": "object", | |
"$ref": "User" | |
} | |
} | |
}, | |
"CheckinsRecentResponse": { | |
"id": "CheckinsRecentResponse", | |
"type": "object", | |
"properties": { | |
"meta": { | |
"type": "object", | |
"properties": { | |
"code": { | |
"type": "integer", | |
"description": "HTTP Status code for this request" | |
} | |
} | |
}, | |
"notifications": { | |
"type": "array", | |
"items": { | |
"$ref": "Notification" | |
} | |
}, | |
"response": { | |
"type": "type", | |
"items": { | |
"type": "object", | |
"properties": { | |
"recent": { | |
"type": "array", | |
"items": { | |
"$ref": "Checkin" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"Notification": { | |
"id": "Notification", | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"item": { | |
"type": "object", | |
"properties": { | |
"unreadCount": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"User": { | |
"id": "User", | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string", | |
"description": "A unique identifier for this user." | |
}, | |
"firstName": { | |
"type": "string", | |
"description": "A user's first name." | |
}, | |
"lastName": { | |
"type": "string", | |
"description": "A user's last name." | |
}, | |
"homeCity": { | |
"type": "string", | |
"description": "User's home city" | |
}, | |
"canonicalUrl": { | |
"type": "string", | |
"description": "Canonical URL for this user" | |
}, | |
"photo": { | |
"type": "string", | |
"description": "URL of a profile picture for this user." | |
}, | |
"gender": { | |
"type": "string" | |
}, | |
"relationship": { | |
"type": "string", | |
"description": "The relationship of the acting user (me) to this user (them)." | |
}, | |
"pings": { | |
"type": "boolean", | |
"description": "Indicates whether checkins from this user will trigger a ping (notifications to mobile devices)." | |
}, | |
"contact": { | |
"type": "object", | |
"$ref": "UserContact" | |
}, | |
"badges": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "integer" | |
} | |
} | |
}, | |
"mayorships": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "integer" | |
}, | |
"items": { | |
"type": "array", | |
"items": { | |
"$ref": "Mayorship" | |
} | |
} | |
} | |
}, | |
"checkins": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "integer" | |
}, | |
"items": { | |
"type": "array", | |
"items": { | |
"$ref": "Checkin" | |
} | |
} | |
} | |
}, | |
"friends": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "integer" | |
}, | |
"groups": { | |
"type": "array", | |
"items": { | |
"$ref": "FriendGroup" | |
} | |
} | |
} | |
}, | |
"following": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "integer" | |
} | |
} | |
}, | |
"requests": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "integer" | |
} | |
} | |
}, | |
"tips": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "integer" | |
} | |
} | |
}, | |
"todos": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "integer" | |
} | |
} | |
}, | |
"photos": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "integer" | |
} | |
} | |
}, | |
"scores": { | |
"type": "object", | |
"properties": { | |
"recent": { | |
"type": "integer" | |
}, | |
"max": { | |
"type": "integer" | |
}, | |
"checkinsCount": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"UserContact": { | |
"id": "UserContact", | |
"type": "object", | |
"properties": { | |
"phone": { | |
"type": "string" | |
}, | |
"email": { | |
"type": "string" | |
}, | |
"twitter": { | |
"type": "string" | |
}, | |
"facebook": { | |
"type": "string" | |
} | |
} | |
}, | |
"Mayorship": { | |
"id": "Mayorship", | |
"type": "object" | |
}, | |
"FriendGroup": { | |
"id": "FriendGroup", | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"count": { | |
"type": "integer" | |
}, | |
"items": { | |
"type": "array", | |
"items": { | |
"$ref": "User" | |
} | |
} | |
} | |
}, | |
"Checkin": { | |
"id": "Checkin", | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"createdAt": { | |
"type": "integer" | |
}, | |
"type": { | |
"type": "string" | |
}, | |
"timeZone": { | |
"type": "string" | |
}, | |
"venue": { | |
"type": "object", | |
"$ref": "Venue" | |
}, | |
"photos": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "integer" | |
}, | |
"items": { | |
"type": "array", | |
"items": { | |
"$ref": "Photo" | |
} | |
} | |
} | |
}, | |
"comments": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "integer" | |
}, | |
"items": { | |
"type": "array", | |
"items": { | |
"$ref": "Comment" | |
} | |
} | |
} | |
}, | |
"source": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"url": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"Venue": { | |
"id": "Venue", | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"location": { | |
"type": "object", | |
"$ref": "VenueLocation" | |
}, | |
"categories": { | |
"type": "array", | |
"items": { | |
"$ref": "Category" | |
} | |
}, | |
"verified": { | |
"type": "boolean" | |
}, | |
"stats": { | |
"type": "object", | |
"properties": { | |
"checkinsCount": { | |
"type": "integer" | |
}, | |
"usersCount": { | |
"type": "integer" | |
}, | |
"tipCount": { | |
"type": "integer" | |
} | |
} | |
}, | |
"url": { | |
"type": "string" | |
} | |
} | |
}, | |
"Category": { | |
"id": "Category", | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"pluralName": { | |
"type": "string" | |
}, | |
"shortName": { | |
"type": "string" | |
}, | |
"primary": { | |
"type": "boolean" | |
}, | |
"icon": { | |
"type": "object", | |
"properties": { | |
"prefix": { | |
"type": "string" | |
}, | |
"sizes": { | |
"type": "array", | |
"items": { | |
"type": "integer" | |
}, | |
"name": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"VenueLocation": { | |
"id": "VenueLocation", | |
"type": "object", | |
"properties": { | |
"address": { | |
}, | |
"crossStreet": { | |
"type": "string" | |
}, | |
"lat": { | |
"type": "double" | |
}, | |
"lng": { | |
"type": "double" | |
}, | |
"postalCode": { | |
"type": "string" | |
}, | |
"city": { | |
"type": "string" | |
}, | |
"state": { | |
"type": "string" | |
}, | |
"country": { | |
"type": "string" | |
} | |
} | |
}, | |
"Photo": { | |
"id": "Photo", | |
"type": "object" | |
}, | |
"Comment": { | |
"id": "Comment", | |
"type": "object" | |
} | |
}, | |
"resources": { | |
"users": { | |
"methods": { | |
"get": { | |
"id": "users.get", | |
"path": "users/{userId}", | |
"httpMethod": "GET", | |
"description": "Returns profile information for a given user, including selected badges and mayorships.", | |
"parameters": { | |
"userId": { | |
"type": "string", | |
"description": "User's ID, or 'self' to show the authenticated user.", | |
"default": "self", | |
"required": true, | |
"location": "path" | |
} | |
}, | |
"parameterOrder": [ | |
"userId" | |
], | |
"response": { | |
"$ref": "UserResponse" | |
}, | |
"scopes": [ | |
"unused" | |
] | |
} | |
} | |
}, | |
"checkins": { | |
"methods": { | |
"recent": { | |
"id": "checkins.recent", | |
"path": "checkins/recent", | |
"httpMethod": "GET", | |
"description": "Returns recent checkins by friends of the user", | |
"parameters": { | |
"ll": { | |
"type": "string", | |
"description": "Lat/long pair used to derive distance", | |
"required": false, | |
"location": "query" | |
} | |
}, | |
"response": { | |
"$ref": "CheckinsRecentResponse" | |
}, | |
"scopes": [ | |
"unused" | |
] | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment