aboutsummaryrefslogtreecommitdiffstats
path: root/www/swagger/spec-files
diff options
context:
space:
mode:
Diffstat (limited to 'www/swagger/spec-files')
-rw-r--r--www/swagger/spec-files/basic-auth.yaml28
-rw-r--r--www/swagger/spec-files/default.yaml277
-rw-r--r--www/swagger/spec-files/echo.yaml43
-rw-r--r--www/swagger/spec-files/guide.yaml49
-rw-r--r--www/swagger/spec-files/heroku-pets.yaml82
-rw-r--r--www/swagger/spec-files/instagram.yaml1064
-rw-r--r--www/swagger/spec-files/minimal.yaml11
-rw-r--r--www/swagger/spec-files/petstore_full.yaml576
-rw-r--r--www/swagger/spec-files/petstore_simple.yaml157
-rw-r--r--www/swagger/spec-files/security.yaml171
-rw-r--r--www/swagger/spec-files/twitter.yaml3083
11 files changed, 5541 insertions, 0 deletions
diff --git a/www/swagger/spec-files/basic-auth.yaml b/www/swagger/spec-files/basic-auth.yaml
new file mode 100644
index 0000000..e6b24a6
--- /dev/null
+++ b/www/swagger/spec-files/basic-auth.yaml
@@ -0,0 +1,28 @@
+---
+swagger: '2.0'
+info:
+ version: "1.0.0"
+ title: Basic Auth Example
+ description: |
+ An example for how to use Basic Auth with Swagger.
+ Server code is available [here](https://github.com/mohsen1/basic-auth-server). It's running on Heroku.
+
+ **User Name and Password**
+ * User Name: `user`
+ * Password: `pass`
+host: basic-auth-server.herokuapp.com
+schemes:
+ - http
+ - https
+securityDefinitions:
+ basicAuth:
+ type: basic
+ description: HTTP Basic Authentication. Works over `HTTP` and `HTTPS`
+paths:
+ /:
+ get:
+ security:
+ - basicAuth: []
+ responses:
+ 200:
+ description: Will send `Authenticated` if authentication is succesful, otherwise it will send `Unauthorized`
diff --git a/www/swagger/spec-files/default.yaml b/www/swagger/spec-files/default.yaml
new file mode 100644
index 0000000..3a0e61f
--- /dev/null
+++ b/www/swagger/spec-files/default.yaml
@@ -0,0 +1,277 @@
+# this is an example of the Uber API
+# as a demonstration of an API spec in YAML
+swagger: '2.0'
+info:
+ title: Uber API
+ description: Move your app forward with the Uber API
+ version: "1.0.0"
+# the domain of the service
+host: api.uber.com
+# array of all schemes that your API supports
+schemes:
+ - https
+# will be prefixed to all paths
+basePath: /v1
+produces:
+ - application/json
+paths:
+ /products:
+ get:
+ summary: Product Types
+ description: |
+ The Products endpoint returns information about the *Uber* products
+ offered at a given location. The response includes the display name
+ and other details about each product, and lists the products in the
+ proper display order.
+ parameters:
+ - name: latitude
+ in: query
+ description: Latitude component of location.
+ required: true
+ type: number
+ format: double
+ - name: longitude
+ in: query
+ description: Longitude component of location.
+ required: true
+ type: number
+ format: double
+ tags:
+ - Products
+ responses:
+ 200:
+ description: An array of products
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Product'
+ default:
+ description: Unexpected error
+ schema:
+ $ref: '#/definitions/Error'
+ /estimates/price:
+ get:
+ summary: Price Estimates
+ description: |
+ The Price Estimates endpoint returns an estimated price range
+ for each product offered at a given location. The price estimate is
+ provided as a formatted string with the full price range and the localized
+ currency symbol.<br><br>The response also includes low and high estimates,
+ and the [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code for
+ situations requiring currency conversion. When surge is active for a particular
+ product, its surge_multiplier will be greater than 1, but the price estimate
+ already factors in this multiplier.
+ parameters:
+ - name: start_latitude
+ in: query
+ description: Latitude component of start location.
+ required: true
+ type: number
+ format: double
+ - name: start_longitude
+ in: query
+ description: Longitude component of start location.
+ required: true
+ type: number
+ format: double
+ - name: end_latitude
+ in: query
+ description: Latitude component of end location.
+ required: true
+ type: number
+ format: double
+ - name: end_longitude
+ in: query
+ description: Longitude component of end location.
+ required: true
+ type: number
+ format: double
+ tags:
+ - Estimates
+ responses:
+ 200:
+ description: An array of price estimates by product
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/PriceEstimate'
+ default:
+ description: Unexpected error
+ schema:
+ $ref: '#/definitions/Error'
+ /estimates/time:
+ get:
+ summary: Time Estimates
+ description: The Time Estimates endpoint returns ETAs for all products offered at a given location, with the responses expressed as integers in seconds. We recommend that this endpoint be called every minute to provide the most accurate, up-to-date ETAs.
+ parameters:
+ - name: start_latitude
+ in: query
+ description: Latitude component of start location.
+ required: true
+ type: number
+ format: double
+ - name: start_longitude
+ in: query
+ description: Longitude component of start location.
+ required: true
+ type: number
+ format: double
+ - name: customer_uuid
+ in: query
+ type: string
+ format: uuid
+ description: Unique customer identifier to be used for experience customization.
+ - name: product_id
+ in: query
+ type: string
+ description: Unique identifier representing a specific product for a given latitude & longitude.
+ tags:
+ - Estimates
+ responses:
+ 200:
+ description: An array of products
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Product'
+ default:
+ description: Unexpected error
+ schema:
+ $ref: '#/definitions/Error'
+ /me:
+ get:
+ summary: User Profile
+ description: The User Profile endpoint returns information about the Uber user that has authorized with the application.
+ tags:
+ - User
+ responses:
+ 200:
+ description: Profile information for a user
+ schema:
+ $ref: '#/definitions/Profile'
+ default:
+ description: Unexpected error
+ schema:
+ $ref: '#/definitions/Error'
+ /history:
+ get:
+ summary: User Activity
+ description: The User Activity endpoint returns data about a user's lifetime activity with Uber. The response will include pickup locations and times, dropoff locations and times, the distance of past requests, and information about which products were requested.<br><br>The history array in the response will have a maximum length based on the limit parameter. The response value count may exceed limit, therefore subsequent API requests may be necessary.
+ parameters:
+ - name: offset
+ in: query
+ type: integer
+ format: int32
+ description: Offset the list of returned results by this amount. Default is zero.
+ - name: limit
+ in: query
+ type: integer
+ format: int32
+ description: Number of items to retrieve. Default is 5, maximum is 100.
+ tags:
+ - User
+ responses:
+ 200:
+ description: History information for the given user
+ schema:
+ $ref: '#/definitions/Activities'
+ default:
+ description: Unexpected error
+ schema:
+ $ref: '#/definitions/Error'
+definitions:
+ Product:
+ type: object
+ properties:
+ product_id:
+ type: string
+ description: Unique identifier representing a specific product for a given latitude & longitude. For example, uberX in San Francisco will have a different product_id than uberX in Los Angeles.
+ description:
+ type: string
+ description: Description of product.
+ display_name:
+ type: string
+ description: Display name of product.
+ capacity:
+ type: string
+ description: Capacity of product. For example, 4 people.
+ image:
+ type: string
+ description: Image URL representing the product.
+ PriceEstimate:
+ type: object
+ properties:
+ product_id:
+ type: string
+ description: Unique identifier representing a specific product for a given latitude & longitude. For example, uberX in San Francisco will have a different product_id than uberX in Los Angeles
+ currency_code:
+ type: string
+ description: "[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code."
+ display_name:
+ type: string
+ description: Display name of product.
+ estimate:
+ type: string
+ description: Formatted string of estimate in local currency of the start location. Estimate could be a range, a single number (flat rate) or "Metered" for TAXI.
+ low_estimate:
+ type: number
+ description: Lower bound of the estimated price.
+ high_estimate:
+ type: number
+ description: Upper bound of the estimated price.
+ surge_multiplier:
+ type: number
+ description: Expected surge multiplier. Surge is active if surge_multiplier is greater than 1. Price estimate already factors in the surge multiplier.
+ Profile:
+ type: object
+ properties:
+ first_name:
+ type: string
+ description: First name of the Uber user.
+ last_name:
+ type: string
+ description: Last name of the Uber user.
+ email:
+ type: string
+ description: Email address of the Uber user
+ picture:
+ type: string
+ description: Image URL of the Uber user.
+ promo_code:
+ type: string
+ description: Promo code of the Uber user.
+ Activity:
+ type: object
+ properties:
+ uuid:
+ type: string
+ description: Unique identifier for the activity
+ Activities:
+ type: object
+ properties:
+ offset:
+ type: integer
+ format: int32
+ description: Position in pagination.
+ limit:
+ type: integer
+ format: int32
+ description: Number of items to retrieve (100 max).
+ count:
+ type: integer
+ format: int32
+ description: Total number of items available.
+ history:
+ type: array
+ items:
+ $ref: '#/definitions/Activity'
+ Error:
+ type: object
+ properties:
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string
+ fields:
+ type: string
diff --git a/www/swagger/spec-files/echo.yaml b/www/swagger/spec-files/echo.yaml
new file mode 100644
index 0000000..258b14a
--- /dev/null
+++ b/www/swagger/spec-files/echo.yaml
@@ -0,0 +1,43 @@
+---
+swagger: '2.0'
+info:
+ version: 1.0.0
+ title: Echo
+ description: |
+ #### Echos back every URL, method, parameter and header
+ Feel free to make a path or an operation and use **Try Operation** to test it. The echo server will
+ render back everything.
+schemes:
+ - http
+host: mazimi-prod.apigee.net
+basePath: /echo
+paths:
+ /:
+ get:
+ responses:
+ 200:
+ description: Echo GET
+ post:
+ responses:
+ 200:
+ description: Echo POST
+ parameters:
+ - name: name
+ in: formData
+ description: name
+ type: string
+ - name: year
+ in: formData
+ description: year
+ type: string
+ /test-path/{id}:
+ parameters:
+ - name: id
+ in: path
+ description: ID
+ type: string
+ required: true
+ get:
+ responses:
+ 200:
+ description: Echo test-path
diff --git a/www/swagger/spec-files/guide.yaml b/www/swagger/spec-files/guide.yaml
new file mode 100644
index 0000000..14df862
--- /dev/null
+++ b/www/swagger/spec-files/guide.yaml
@@ -0,0 +1,49 @@
+# Example YAML to get you started quickly.
+# Be aware that YAML has indentation based scoping.
+# Code completion support is available so start typing for available options.
+swagger: '2.0'
+
+# This is your document metadata
+info:
+ version: "0.0.0"
+ title: <enter your title>
+
+# Describe your paths here
+paths:
+ # This is a path endpoint. Change it.
+ /persons:
+ # This is a HTTP operation
+ get:
+ # Describe this verb here. Note: you can use markdown
+ description: |
+ Gets `Person` objects.
+ Optional query param of **size** determines
+ size of returned array
+ # This is array of GET operation parameters:
+ parameters:
+ # An example parameter that is in query and is required
+ -
+ name: size
+ in: query
+ description: Size of array
+ required: true
+ type: number
+ format: double
+ # Expected responses for this operation:
+ responses:
+ # Response code
+ 200:
+ description: Successful response
+ # A schema describing your response object.
+ # Use JSON Schema format
+ schema:
+ title: ArrayOfPersons
+ type: array
+ items:
+ title: Person
+ type: object
+ properties:
+ name:
+ type: string
+ single:
+ type: boolean \ No newline at end of file
diff --git a/www/swagger/spec-files/heroku-pets.yaml b/www/swagger/spec-files/heroku-pets.yaml
new file mode 100644
index 0000000..ea93a93
--- /dev/null
+++ b/www/swagger/spec-files/heroku-pets.yaml
@@ -0,0 +1,82 @@
+swagger: '2.0'
+info:
+ version: 1.0.0
+ title: PetStore on Heroku
+ description: |
+ **This example has a working backend hosted in Heroku**
+
+ You can try all HTTP operation described in this Swagger spec.
+host: petstore-api.herokuapp.com
+basePath: /pet
+schemes:
+ - http
+ - https
+consumes:
+ - application/json
+ - text/xml
+produces:
+ - application/json
+ - text/html
+paths:
+ /:
+ get:
+ parameters:
+ - name: limit
+ in: query
+ description: number of pets to return
+ type: integer
+ default: 11
+ minimum: 11
+ maximum: 10000
+ responses:
+ 200:
+ description: List all pets
+ schema:
+ title: Pets
+ type: array
+ items:
+ $ref: '#/definitions/Pet'
+ post:
+ parameters:
+ - name: pet
+ in: body
+ description: The pet JSON you want to post
+ schema:
+ $ref: '#/definitions/Pet'
+ required: true
+ responses:
+ 200:
+ description: Make a new pet
+ put:
+ parameters:
+ - name: pet
+ in: body
+ description: The pet JSON you want to post
+ schema:
+ $ref: '#/definitions/Pet'
+ required: true
+ responses:
+ 200:
+ description: Updates the pet
+ /{petId}:
+ get:
+ parameters:
+ - name: petId
+ in: path
+ type: string
+ description: ID of the pet
+ required: true
+ responses:
+ 200:
+ description: Sends the pet with pet Id
+
+definitions:
+ Pet:
+ type: object
+ properties:
+ name:
+ type: string
+ birthday:
+ type: integer
+ format: int32
+
diff --git a/www/swagger/spec-files/instagram.yaml b/www/swagger/spec-files/instagram.yaml
new file mode 100644
index 0000000..1538b7f
--- /dev/null
+++ b/www/swagger/spec-files/instagram.yaml
@@ -0,0 +1,1064 @@
+---
+swagger: '2.0'
+
+################################################################################
+# API Information #
+################################################################################
+info:
+ version: v1
+ title: Instagram API
+ description: |
+ The first version of the Instagram API is an exciting step forward towards
+ making it easier for users to have open access to their data. We created it
+ so that you can surface the amazing content Instagram users share every
+ second, in fun and innovative ways.
+
+ Build something great!
+
+ Once you've
+ [registered your client](http://instagram.com/developer/register/) it's easy
+ to start requesting data from Instagram.
+
+ All endpoints are only accessible via https and are located at
+ `api.instagram.com`. For instance: you can grab the most popular photos at
+ the moment by accessing the following URL with your client ID
+ (replace CLIENT-ID with your own):
+ ```
+ https://api.instagram.com/v1/media/popular?client_id=CLIENT-ID
+ ```
+ You're best off using an access_token for the authenticated user for each
+ endpoint, though many endpoints don't require it.
+ In some cases an access_token will give you more access to information, and
+ in all cases, it means that you are operating under a per-access_token limit
+ vs. the same limit for your single client_id.
+
+
+ ## Limits
+ Be nice. If you're sending too many requests too quickly, we'll send back a
+ `503` error code (server unavailable).
+ You are limited to 5000 requests per hour per `access_token` or `client_id`
+ overall. Practically, this means you should (when possible) authenticate
+ users so that limits are well outside the reach of a given user.
+
+ ## Deleting Objects
+ We do our best to have all our URLs be
+ [RESTful](http://en.wikipedia.org/wiki/Representational_state_transfer).
+ Every endpoint (URL) may support one of four different http verbs. GET
+ requests fetch information about an object, POST requests create objects,
+ PUT requests update objects, and finally DELETE requests will delete
+ objects.
+
+ Since many old browsers don't support PUT or DELETE, we've made it easy to
+ fake PUTs and DELETEs. All you have to do is do a POST with _method=PUT or
+ _method=DELETE as a parameter and we will treat it as if you used PUT or
+ DELETE respectively.
+
+ ## Structure
+
+ ### The Envelope
+ Every response is contained by an envelope. That is, each response has a
+ predictable set of keys with which you can expect to interact:
+ ```json
+ {
+ "meta": {
+ "code": 200
+ },
+ "data": {
+ ...
+ },
+ "pagination": {
+ "next_url": "...",
+ "next_max_id": "13872296"
+ }
+ }
+ ```
+
+ #### META
+ The meta key is used to communicate extra information about the response to
+ the developer. If all goes well, you'll only ever see a code key with value
+ 200. However, sometimes things go wrong, and in that case you might see a
+ response like:
+ ```json
+ {
+ "meta": {
+ "error_type": "OAuthException",
+ "code": 400,
+ "error_message": "..."
+ }
+ }
+ ```
+
+ #### DATA
+ The data key is the meat of the response. It may be a list or dictionary,
+ but either way this is where you'll find the data you requested.
+ #### PAGINATION
+ Sometimes you just can't get enough. For this reason, we've provided a
+ convenient way to access more data in any request for sequential data.
+ Simply call the url in the next_url parameter and we'll respond with the
+ next set of data.
+ ```json
+ {
+ ...
+ "pagination": {
+ "next_url": "https://api.instagram.com/v1/tags/puppy/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&max_id=13872296",
+ "next_max_id": "13872296"
+ }
+ }
+ ```
+ On views where pagination is present, we also support the "count" parameter.
+ Simply set this to the number of items you'd like to receive. Note that the
+ default values should be fine for most applications - but if you decide to
+ increase this number there is a maximum value defined on each endpoint.
+
+ ### JSONP
+ If you're writing an AJAX application, and you'd like to wrap our response
+ with a callback, all you have to do is specify a callback parameter with
+ any API call:
+ ```
+ https://api.instagram.com/v1/tags/coffee/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&callback=callbackFunction
+ ```
+ Would respond with:
+ ```js
+ callbackFunction({
+ ...
+ });
+ ```
+ termsOfService: http://instagram.com/about/legal/terms/api
+
+################################################################################
+# Host, Base Path, Schemes and Content Types #
+################################################################################
+host: api.instagram.com
+basePath: /v1
+schemes:
+ - https
+produces:
+ - application/json
+consumes:
+ - application/json
+
+################################################################################
+# Tags #
+################################################################################
+tags:
+ - name: Users
+ - name: Relationships
+ description: |
+ Relationships are expressed using the following terms:
+
+ **outgoing_status**: Your relationship to the user. Can be "follows",
+ "requested", "none".
+ **incoming_status**: A user's relationship to you. Can be "followed_by",
+ "requested_by", "blocked_by_you", "none".
+ - name: Media
+ description: |
+ At this time, uploading via the API is not possible. We made a conscious
+ choice not to add this for the following reasons:
+
+ * Instagram is about your life on the go – we hope to encourage photos
+ from within the app.
+ * We want to fight spam & low quality photos. Once we allow uploading
+ from other sources, it's harder to control what comes into the Instagram
+ ecosystem. All this being said, we're working on ways to ensure users
+ have a consistent and high-quality experience on our platform.
+ - name: Commnts
+ - name: Likes
+ - name: Tags
+ - name: Location
+ - name: Subscribtions
+
+################################################################################
+# Security #
+################################################################################
+securityDefinitions:
+ oauth:
+ type: oauth2
+ flow: implicit
+ authorizationUrl: https://instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=token
+ scopes:
+ basic: |
+ to read any and all data related to a user (e.g. following/followed-by
+ lists, photos, etc.) (granted by default)
+ comments: to create or delete comments on a user’s behalf
+ relationships: to follow and unfollow users on a user’s behalf
+ likes: to like and unlike items on a user’s behalf
+ key:
+ type: apiKey
+ in: query
+ name: access_token
+security:
+ - oauth:
+ - basic
+ - comments
+ - relationships
+ - likes
+ - key: []
+
+################################################################################
+# Parameters #
+################################################################################
+parameters:
+ user-id:
+ name: user-id
+ in: path
+ description: The user identifier number
+ type: number
+ required: true
+ tag-name:
+ name: tag-name
+ in: path
+ description: Tag name
+ type: string
+ required: true
+
+################################################################################
+# Paths #
+################################################################################
+paths:
+ /users/{user-id}:
+ parameters:
+ - $ref: '#/parameters/user-id'
+ get:
+ security:
+ - key: []
+ - oauth:
+ - basic
+ tags:
+ - Users
+ description: Get basic information about a user.
+ responses:
+ 200:
+ description: The user object
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/definitions/User'
+
+ /users/self/feed:
+ get:
+ tags:
+ - Users
+ description: See the authenticated user's feed.
+ parameters:
+ - name: count
+ in: query
+ description: Count of media to return.
+ type: integer
+ - name: max_id
+ in: query
+ description: Return media earlier than this max_id.s
+ type: integer
+ - name: min_id
+ in: query
+ description: Return media later than this min_id.
+
+ type: integer
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/Media'
+
+ /users/{user-id}/media/recent:
+ parameters:
+ - $ref: '#/parameters/user-id'
+ get:
+ tags:
+ - Users
+ responses:
+ 200:
+ description: |
+ Get the most recent media published by a user. To get the most recent
+ media published by the owner of the access token, you can use `self`
+ instead of the `user-id`.
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/Media'
+ parameters:
+ - name: count
+ in: query
+ description: Count of media to return.
+ type: integer
+ - name: max_timestamp
+ in: query
+ description: Return media before this UNIX timestamp.
+ type: integer
+ - name: min_timestamp
+ in: query
+ description: Return media after this UNIX timestamp.
+ type: integer
+ - name: min_id
+ in: query
+ description: Return media later than this min_id.
+ type: string
+ - name: max_id
+ in: query
+ description: Return media earlier than this max_id.
+ type: string
+
+ /users/self/media/liked:
+ get:
+ tags:
+ - Users
+ description: |
+ See the list of media liked by the authenticated user.
+ Private media is returned as long as the authenticated user
+ has permissionto view that media. Liked media lists are only
+ available for the currently authenticated user.
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/Media'
+ parameters:
+ - name: count
+ in: query
+ description: Count of media to return.
+ type: integer
+ - name: max_like_id
+ in: query
+ description: Return media liked before this id.
+ type: integer
+
+ /users/search:
+ get:
+ tags:
+ - Users
+ description: Search for a user by name.
+ parameters:
+ - name: q
+ in: query
+ description: A query string
+ type: string
+ required: true
+ - name: count
+ in: query
+ description: Number of users to return.
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/MiniProfile'
+
+ /users/{user-id}/follows:
+ parameters:
+ - $ref: '#/parameters/user-id'
+ get:
+ tags:
+ - Relationships
+ description: Get the list of users this user follows.
+ responses:
+ 200:
+ description: OK
+ schema:
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/MiniProfile'
+
+ /users/{user-id}/followed-by:
+ parameters:
+ - $ref: '#/parameters/user-id'
+ get:
+ tags:
+ - Relationships
+ description: Get the list of users this user is followed by.
+ responses:
+ 200:
+ description: OK
+ schema:
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/MiniProfile'
+
+ /users/self/requested-by:
+ get:
+ tags:
+ - Relationships
+ description: |
+ List the users who have requested this user's permission to follow.
+ responses:
+ 200:
+ description: OK
+ schema:
+ properties:
+ meta:
+ properties:
+ code:
+ type: integer
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/MiniProfile'
+
+ /users/{user-id}/relationship:
+ parameters:
+ - $ref: '#/parameters/user-id'
+ post:
+ tags:
+ - Relationships
+ description: |
+ Modify the relationship between the current user and thetarget user.
+ security:
+ - oauth:
+ - relationships
+ parameters:
+ - name: action
+ in: body
+ description: One of follow/unfollow/block/unblock/approve/ignore.
+ schema:
+ type: string
+ enum:
+ - follow
+ - unfollow
+ - block
+ - unblock
+ - approve
+
+ responses:
+ 200:
+ description: OK
+ schema:
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/MiniProfile'
+
+ /media/{media-id}:
+ parameters:
+ - name: media-id
+ in: path
+ description: The media ID
+ type: integer
+ required: true
+ get:
+ tags:
+ - Media
+ description: |
+ Get information about a media object.
+ The returned type key will allow you to differentiate between `image`
+ and `video` media.
+
+ Note: if you authenticate with an OAuth Token, you will receive the
+ `user_has_liked` key which quickly tells you whether the current user
+ has liked this media item.
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Media'
+
+ /media1/{shortcode}: #FIXME: correct path is /media/{shortcode}
+ parameters:
+ - name: shortcode
+ in: path
+ description: The media shortcode
+ type: string
+ required: true
+ get:
+ tags:
+ - Media
+ description: |
+ This endpoint returns the same response as **GET** `/media/media-id`.
+
+ A media object's shortcode can be found in its shortlink URL.
+ An example shortlink is `http://instagram.com/p/D/`
+ Its corresponding shortcode is D.
+
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Media'
+
+ /media/search:
+ get:
+ tags:
+ - Media
+ description: |
+ Search for media in a given area. The default time span is set to 5
+ days. The time span must not exceed 7 days. Defaults time stamps cover
+ the last 5 days. Can return mix of image and video types.
+
+ parameters:
+ - name: LAT
+ description: |
+ Latitude of the center search coordinate. If used, lng is required.
+ type: number
+ in: query
+ - name: MIN_TIMESTAMP
+ description: |
+ A unix timestamp. All media returned will be taken later than
+ this timestamp.
+ type: integer
+ in: query
+ - name: LNG
+ description: |
+ Longitude of the center search coordinate. If used, lat is required.
+ type: number
+ in: query
+ - name: MAX_TIMESTAMP
+ description: |
+ A unix timestamp. All media returned will be taken earlier than this
+ timestamp.
+ type: integer
+ in: query
+ - name: DISTANCE
+ description: Default is 1km (distance=1000), max distance is 5km.
+ type: integer
+ maximum: 5000
+ default: 1000
+ in: query
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: object
+ description: List of all media with added `distance` property
+ properties:
+ data:
+ type: array
+ items:
+ allOf:
+ - $ref: '#/definitions/Media'
+ -
+ properties:
+ distance:
+ type: number
+
+ /media/popular:
+ get:
+ tags:
+ - Media
+ description: |
+ Get a list of what media is most popular at the moment.
+ Can return mix of image and video types.
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/Media'
+
+ /media/{media-id}/comments:
+ parameters:
+ - name: media-id
+ in: path
+ description: Media ID
+ type: integer
+ required: true
+ get:
+ tags:
+ - Comments
+ description: |
+ Get a list of recent comments on a media object.
+ responses:
+ 200:
+ description: OK
+ schema:
+ properties:
+ meta:
+ properties:
+ code:
+ type: number
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/Comment'
+ post:
+ tags:
+ - Comments
+ - Media
+ description: |
+ Create a comment on a media object with the following rules:
+
+ * The total length of the comment cannot exceed 300 characters.
+ * The comment cannot contain more than 4 hashtags.
+ * The comment cannot contain more than 1 URL.
+ * The comment cannot consist of all capital letters.
+ security:
+ - oauth:
+ - comments
+ parameters:
+ - name: TEXT
+ description: |
+ Text to post as a comment on the media object as specified in
+ media-id.
+ in: body
+ schema:
+ type: number
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: object
+ properties:
+ meta:
+ properties:
+ code:
+ type: number
+ data:
+ type: object
+ delete:
+ tags:
+ - Comments
+ description: |
+ Remove a comment either on the authenticated user's media object or
+ authored by the authenticated user.
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: object
+ properties:
+ meta:
+ properties:
+ code:
+ type: number
+ data:
+ type: object
+
+ /media/{media-id}/likes:
+ parameters:
+ - name: media-id
+ in: path
+ description: Media ID
+ type: integer
+ required: true
+ get:
+ tags:
+ - Likes
+ - Media
+ description: |
+ Get a list of users who have liked this media.
+ responses:
+ 200:
+ description: OK
+ schema:
+ properties:
+ meta:
+ properties:
+ code:
+ type: number
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/Like'
+ post:
+ tags:
+ - Likes
+ description: Set a like on this media by the currently authenticated user.
+ security:
+ - oauth:
+ - comments
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: object
+ properties:
+ meta:
+ properties:
+ code:
+ type: number
+ data:
+ type: object
+ delete:
+ tags:
+ - Likes
+ description: |
+ Remove a like on this media by the currently authenticated user.
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: object
+ properties:
+ meta:
+ properties:
+ code:
+ type: number
+ data:
+ type: object
+
+ /tags/{tag-name}:
+ parameters:
+ - $ref: '#/parameters/tag-name'
+ get:
+ tags:
+ - Tags
+ description: Get information about a tag object.
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Tag'
+
+ /tags/{tag-name}/media/recent:
+ parameters:
+ - $ref: '#/parameters/tag-name'
+ get:
+ tags:
+ - Tags
+ description: |
+ Get a list of recently tagged media. Use the `max_tag_id` and
+ `min_tag_id` parameters in the pagination response to paginate through
+ these objects.
+ responses:
+ 200:
+ description: OK
+ schema:
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/Tag'
+
+ /tags/search:
+ get:
+ tags:
+ - Tags
+ parameters:
+ - name: q
+ description: |
+ A valid tag name without a leading #. (eg. snowy, nofilter)
+ in: query
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: object
+ properties:
+ meta:
+ properties:
+ code:
+ type: integer
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/Tag'
+
+ /locations/{location-id}:
+ parameters:
+ - name: location-id
+ description: Location ID
+ in: path
+ type: integer
+ required: true
+ get:
+ tags:
+ - Location
+ description: Get information about a location.
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: object
+ properties:
+ data:
+ $ref: '#/definitions/Location'
+
+ /locations/{location-id}/media/recent:
+ parameters:
+ - name: location-id
+ description: Location ID
+ in: path
+ type: integer
+ required: true
+ get:
+ tags:
+ - Location
+ - Media
+ description: Get a list of recent media objects from a given location.
+ parameters:
+ - name: max_timestamp
+ in: query
+ description: Return media before this UNIX timestamp.
+ type: integer
+ - name: min_timestamp
+ in: query
+ description: Return media after this UNIX timestamp.
+ type: integer
+ - name: min_id
+ in: query
+ description: Return media later than this min_id.
+ type: string
+ - name: max_id
+ in: query
+ description: Return media earlier than this max_id.
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/Media'
+
+ /locations/search:
+ get:
+ tags:
+ - Location
+ description: Search for a location by geographic coordinate.
+ parameters:
+ - name: distance
+ in: query
+ description: Default is 1000m (distance=1000), max distance is 5000.
+ type: integer
+
+ - name: facebook_places_id
+ in: query
+ description: |
+ Returns a location mapped off of a Facebook places id. If used, a
+ Foursquare id and lat, lng are not required.
+ type: integer
+
+ - name: foursquare_id
+ in: query
+ description: |
+ returns a location mapped off of a foursquare v1 api location id.
+ If used, you are not required to use lat and lng. Note that this
+ method is deprecated; you should use the new foursquare IDs with V2
+ of their API.
+ type: integer
+
+ - name: lat
+ in: query
+ description: |
+ atitude of the center search coordinate. If used, lng is required.
+ type: number
+
+ - name: lng
+ in: query
+ description: |
+ ongitude of the center search coordinate. If used, lat is required.
+ type: number
+
+ - name: foursquare_v2_id
+ in: query
+ description: |
+ Returns a location mapped off of a foursquare v2 api location id. If
+ used, you are not required to use lat and lng.
+ type: integer
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: object
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/Location'
+
+ /geographies/{geo-id}/media/recent:
+ parameters:
+ - name: geo-id
+ in: path
+ description: Geolocation ID
+ type: integer
+ required: true
+ get:
+ description: |
+ Get recent media from a geography subscription that you created.
+ **Note**: You can only access Geographies that were explicitly created
+ by your OAuth client. Check the Geography Subscriptions section of the
+ [real-time updates page](https://instagram.com/developer/realtime/).
+ When you create a subscription to some geography
+ that you define, you will be returned a unique geo-id that can be used
+ in this query. To backfill photos from the location covered by this
+ geography, use the [media search endpoint
+ ](https://instagram.com/developer/endpoints/media/).
+ parameters:
+ - name: count
+ in: query
+ description: Max number of media to return.
+ type: integer
+ - name: min_id
+ in: query
+ description: Return media before this `min_id`.
+ type: integer
+ responses:
+ 200:
+ description: OK
+
+################################################################################
+# Definitions #
+################################################################################
+definitions:
+ User:
+ type: object
+ properties:
+ id:
+ type: integer
+ username:
+ type: string
+ full_name:
+ type: string
+ profile_picture:
+ type: string
+ bio:
+ type: string
+ website:
+ type: string
+ counts:
+ type: object
+ properties:
+ media:
+ type: integer
+ follows:
+ type: integer
+ follwed_by:
+ type: integer
+ Media:
+ type: object
+ properties:
+ created_time:
+ description: Epoc time (ms)
+ type: integer
+ type:
+ type: string
+ filter:
+ type: string
+ tags:
+ type: array
+ items:
+ $ref: '#/definitions/Tag'
+ id:
+ type: integer
+ user:
+ $ref: '#/definitions/MiniProfile'
+ users_in_photo:
+ type: array
+ items:
+ $ref: '#/definitions/MiniProfile'
+ location:
+ $ref: '#/definitions/Location'
+ comments::
+ type: object
+ properties:
+ count:
+ type: integer
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/Comment'
+ likes:
+ type: object
+ properties:
+ count:
+ type: integer
+ data:
+ type: array
+ items:
+ $ref: '#/definitions/MiniProfile'
+ images:
+ properties:
+ low_resolution:
+ $ref: '#/definitions/Image'
+ thumbnail:
+ $ref: '#/definitions/Image'
+ standard_resolution:
+ $ref: '#/definitions/Image'
+ videos:
+ properties:
+ low_resolution:
+ $ref: '#/definitions/Image'
+ standard_resolution:
+ $ref: '#/definitions/Image'
+ Location:
+ type: object
+ properties:
+ id:
+ type: string
+ name:
+ type: string
+ latitude:
+ type: number
+ longitude:
+ type: number
+ Comment:
+ type: object
+ properties:
+ id:
+ type: string
+ created_time:
+ type: string
+ text:
+ type: string
+ from:
+ $ref: '#/definitions/MiniProfile'
+ Like:
+ type: object
+ properties:
+ user_name:
+ type: string
+ first_name:
+ type: string
+ last_name:
+ type: string
+ type:
+ type: string
+ id:
+ type: string
+ Tag:
+ type: object
+ properties:
+ media_count:
+ type: integer
+ name:
+ type: string
+ Image:
+ type: object
+ properties:
+ width:
+ type: integer
+ height:
+ type: integer
+ url:
+ type: string
+ MiniProfile:
+ type: object
+ description: A shorter version of User for likes array
+ properties:
+ user_name:
+ type: string
+ full_name:
+ type: string
+ id:
+ type: integer
+ profile_picture:
+ type: string
diff --git a/www/swagger/spec-files/minimal.yaml b/www/swagger/spec-files/minimal.yaml
new file mode 100644
index 0000000..17dc4c4
--- /dev/null
+++ b/www/swagger/spec-files/minimal.yaml
@@ -0,0 +1,11 @@
+---
+swagger: '2.0'
+info:
+ version: 0.0.0
+ title: Simple API
+paths:
+ /:
+ get:
+ responses:
+ 200:
+ description: OK
diff --git a/www/swagger/spec-files/petstore_full.yaml b/www/swagger/spec-files/petstore_full.yaml
new file mode 100644
index 0000000..58ec7f7
--- /dev/null
+++ b/www/swagger/spec-files/petstore_full.yaml
@@ -0,0 +1,576 @@
+swagger: "2.0"
+info:
+ description: |
+ This is a sample server Petstore server.
+
+ [Learn about Swagger](http://swagger.io) or join the IRC channel `#swagger` on irc.freenode.net.
+
+ For this sample, you can use the api key `special-key` to test the authorization filters
+ version: "1.0.0"
+ title: Swagger Petstore
+ termsOfService: http://helloreverb.com/terms/
+ contact:
+ name: apiteam@swagger.io
+ license:
+ name: Apache 2.0
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+host: petstore.swagger.io
+basePath: /v2
+schemes:
+ - http
+paths:
+ /pets:
+ post:
+ tags:
+ - pet
+ summary: Add a new pet to the store
+ description: ""
+ operationId: addPet
+ consumes:
+ - application/json
+ - application/xml
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: body
+ name: body
+ description: Pet object that needs to be added to the store
+ required: false
+ schema:
+ $ref: "#/definitions/Pet"
+ responses:
+ "405":
+ description: Invalid input
+ security:
+ - petstore_auth:
+ - write_pets
+ - read_pets
+ put:
+ tags:
+ - pet
+ summary: Update an existing pet
+ description: ""
+ operationId: updatePet
+ consumes:
+ - application/json
+ - application/xml
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: body
+ name: body
+ description: Pet object that needs to be added to the store
+ required: false
+ schema:
+ $ref: "#/definitions/Pet"
+ responses:
+ "405":
+ description: Validation exception
+ "404":
+ description: Pet not found
+ "400":
+ description: Invalid ID supplied
+ security:
+ - petstore_auth:
+ - write_pets
+ - read_pets
+ /pets/findByStatus:
+ get:
+ tags:
+ - pet
+ summary: Finds Pets by status
+ description: Multiple status values can be provided with comma seperated strings
+ operationId: findPetsByStatus
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: query
+ name: status
+ description: Status values that need to be considered for filter
+ required: false
+ type: array
+ items:
+ type: string
+ collectionFormat: multi
+ responses:
+ "200":
+ description: successful operation
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/Pet"
+ "400":
+ description: Invalid status value
+ security:
+ - petstore_auth:
+ - write_pets
+ - read_pets
+ /pets/findByTags:
+ get:
+ tags:
+ - pet
+ summary: Finds Pets by tags
+ description: Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
+ operationId: findPetsByTags
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: query
+ name: tags
+ description: Tags to filter by
+ required: false
+ type: array
+ items:
+ type: string
+ collectionFormat: multi
+ responses:
+ "200":
+ description: successful operation
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/Pet"
+ "400":
+ description: Invalid tag value
+ security:
+ - petstore_auth:
+ - write_pets
+ - read_pets
+ /pets/{petId}:
+ get:
+ tags:
+ - pet
+ summary: Find pet by ID
+ description: Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
+ operationId: getPetById
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: path
+ name: petId
+ description: ID of pet that needs to be fetched
+ required: true
+ type: integer
+ format: int64
+ responses:
+ "404":
+ description: Pet not found
+ "200":
+ description: successful operation
+ schema:
+ $ref: "#/definitions/Pet"
+ "400":
+ description: Invalid ID supplied
+ security:
+ - api_key: []
+ - petstore_auth:
+ - write_pets
+ - read_pets
+ post:
+ tags:
+ - pet
+ summary: Updates a pet in the store with form data
+ description: ""
+ operationId: updatePetWithForm
+ consumes:
+ - application/x-www-form-urlencoded
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: path
+ name: petId
+ description: ID of pet that needs to be updated
+ required: true
+ type: string
+ - in: formData
+ name: name
+ description: Updated name of the pet
+ required: true
+ type: string
+ - in: formData
+ name: status
+ description: Updated status of the pet
+ required: true
+ type: string
+ responses:
+ "405":
+ description: Invalid input
+ security:
+ - petstore_auth:
+ - write_pets
+ - read_pets
+ delete:
+ tags:
+ - pet
+ summary: Deletes a pet
+ description: ""
+ operationId: deletePet
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: header
+ name: api_key
+ description: ""
+ required: true
+ type: string
+ - in: path
+ name: petId
+ description: Pet id to delete
+ required: true
+ type: integer
+ format: int64
+ responses:
+ "400":
+ description: Invalid pet value
+ security:
+ - petstore_auth:
+ - write_pets
+ - read_pets
+ /stores/order:
+ post:
+ tags:
+ - store
+ summary: Place an order for a pet
+ description: ""
+ operationId: placeOrder
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: body
+ name: body
+ description: order placed for purchasing the pet
+ required: false
+ schema:
+ $ref: "#/definitions/Order"
+ responses:
+ "200":
+ description: successful operation
+ schema:
+ $ref: "#/definitions/Order"
+ "400":
+ description: Invalid Order
+ /stores/order/{orderId}:
+ get:
+ tags:
+ - store
+ summary: Find purchase order by ID
+ description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ operationId: getOrderById
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: path
+ name: orderId
+ description: ID of pet that needs to be fetched
+ required: true
+ type: string
+ responses:
+ "404":
+ description: Order not found
+ "200":
+ description: successful operation
+ schema:
+ $ref: "#/definitions/Order"
+ "400":
+ description: Invalid ID supplied
+ delete:
+ tags:
+ - store
+ summary: Delete purchase order by ID
+ description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ operationId: deleteOrder
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: path
+ name: orderId
+ description: ID of the order that needs to be deleted
+ required: true
+ type: string
+ responses:
+ "404":
+ description: Order not found
+ "400":
+ description: Invalid ID supplied
+ /users:
+ post:
+ tags:
+ - user
+ summary: Create user
+ description: This can only be done by the logged in user.
+ operationId: createUser
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: body
+ name: body
+ description: Created user object
+ required: false
+ schema:
+ $ref: "#/definitions/User"
+ responses:
+ default:
+ description: successful operation
+ /users/createWithArray:
+ post:
+ tags:
+ - user
+ summary: Creates list of users with given input array
+ description: ""
+ operationId: createUsersWithArrayInput
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: body
+ name: body
+ description: List of user object
+ required: false
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/User"
+ responses:
+ default:
+ description: successful operation
+ /users/createWithList:
+ post:
+ tags:
+ - user
+ summary: Creates list of users with given input array
+ description: ""
+ operationId: createUsersWithListInput
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: body
+ name: body
+ description: List of user object
+ required: false
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/User"
+ responses:
+ default:
+ description: successful operation
+ /users/login:
+ get:
+ tags:
+ - user
+ summary: Logs user into the system
+ description: ""
+ operationId: loginUser
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: query
+ name: username
+ description: The user name for login
+ required: false
+ type: string
+ - in: query
+ name: password
+ description: The password for login in clear text
+ required: false
+ type: string
+ responses:
+ "200":
+ description: successful operation
+ schema:
+ type: string
+ "400":
+ description: Invalid username/password supplied
+ /users/logout:
+ get:
+ tags:
+ - user
+ summary: Logs out current logged in user session
+ description: ""
+ operationId: logoutUser
+ produces:
+ - application/json
+ - application/xml
+ responses:
+ default:
+ description: successful operation
+ /users/{username}:
+ get:
+ tags:
+ - user
+ summary: Get user by user name
+ description: ""
+ operationId: getUserByName
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: path
+ name: username
+ description: The name that needs to be fetched. Use user1 for testing.
+ required: true
+ type: string
+ responses:
+ "404":
+ description: User not found
+ "200":
+ description: successful operation
+ schema:
+ $ref: "#/definitions/User"
+ "400":
+ description: Invalid username supplied
+ put:
+ tags:
+ - user
+ summary: Updated user
+ description: This can only be done by the logged in user.
+ operationId: updateUser
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: path
+ name: username
+ description: name that need to be deleted
+ required: true
+ type: string
+ - in: body
+ name: body
+ description: Updated user object
+ required: false
+ schema:
+ $ref: "#/definitions/User"
+ responses:
+ "404":
+ description: User not found
+ "400":
+ description: Invalid user supplied
+ delete:
+ tags:
+ - user
+ summary: Delete user
+ description: This can only be done by the logged in user.
+ operationId: deleteUser
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: path
+ name: username
+ description: The name that needs to be deleted
+ required: true
+ type: string
+ responses:
+ "404":
+ description: User not found
+ "400":
+ description: Invalid username supplied
+securityDefinitions:
+ api_key:
+ type: apiKey
+ name: api_key
+ in: header
+ petstore_auth:
+ type: oauth2
+ authorizationUrl: http://petstore.swagger.io/api/oauth/dialog
+ flow: implicit
+ scopes:
+ write_pets: modify pets in your account
+ read_pets: read your pets
+definitions:
+ User:
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int64
+ username:
+ type: string
+ firstName:
+ type: string
+ lastName:
+ type: string
+ email:
+ type: string
+ password:
+ type: string
+ phone:
+ type: string
+ userStatus:
+ type: integer
+ format: int32
+ description: User Status
+ Category:
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int64
+ name:
+ type: string
+ Pet:
+ type: object
+ required:
+ - name
+ - photoUrls
+ properties:
+ id:
+ type: integer
+ format: int64
+ category:
+ $ref: "#/definitions/Category"
+ name:
+ type: string
+ example: doggie
+ photoUrls:
+ type: array
+ items:
+ type: string
+ tags:
+ type: array
+ items:
+ $ref: "#/definitions/Tag"
+ status:
+ type: string
+ description: pet status in the store
+ Tag:
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int64
+ name:
+ type: string
+ Order:
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int64
+ petId:
+ type: integer
+ format: int64
+ quantity:
+ type: integer
+ format: int32
+ shipDate:
+ type: string
+ format: date-time
+ status:
+ type: string
+ description: Order Status
+ complete:
+ type: boolean
diff --git a/www/swagger/spec-files/petstore_simple.yaml b/www/swagger/spec-files/petstore_simple.yaml
new file mode 100644
index 0000000..b955fe0
--- /dev/null
+++ b/www/swagger/spec-files/petstore_simple.yaml
@@ -0,0 +1,157 @@
+swagger: '2.0'
+info:
+ version: '1.0.0'
+ title: Swagger Petstore (Simple)
+ description: A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification
+ termsOfService: http://helloreverb.com/terms/
+ contact:
+ name: Swagger API team
+ email: foo@example.com
+ url: http://swagger.io
+ license:
+ name: MIT
+ url: http://opensource.org/licenses/MIT
+host: petstore.swagger.io
+basePath: /api
+schemes:
+ - http
+consumes:
+ - application/json
+produces:
+ - application/json
+paths:
+ /pets:
+ get:
+ description: Returns all pets from the system that the user has access to
+ operationId: findPets
+ produces:
+ - application/json
+ - application/xml
+ - text/xml
+ - text/html
+ parameters:
+ - name: tags
+ in: query
+ description: tags to filter by
+ required: false
+ type: array
+ items:
+ type: string
+ collectionFormat: csv
+ - name: limit
+ in: query
+ description: maximum number of results to return
+ required: false
+ type: integer
+ format: int32
+ responses:
+ '200':
+ description: pet response
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/pet'
+ default:
+ description: unexpected error
+ schema:
+ $ref: '#/definitions/errorModel'
+ post:
+ description: Creates a new pet in the store. Duplicates are allowed
+ operationId: addPet
+ produces:
+ - application/json
+ parameters:
+ - name: pet
+ in: body
+ description: Pet to add to the store
+ required: true
+ schema:
+ $ref: '#/definitions/newPet'
+ responses:
+ '200':
+ description: pet response
+ schema:
+ $ref: '#/definitions/pet'
+ default:
+ description: unexpected error
+ schema:
+ $ref: '#/definitions/errorModel'
+ /pets/{id}:
+ get:
+ description: Returns a user based on a single ID, if the user does not have access to the pet
+ operationId: findPetById
+ produces:
+ - application/json
+ - application/xml
+ - text/xml
+ - text/html
+ parameters:
+ - name: id
+ in: path
+ description: ID of pet to fetch
+ required: true
+ type: integer
+ format: int64
+ responses:
+ '200':
+ description: pet response
+ schema:
+ $ref: '#/definitions/pet'
+ default:
+ description: unexpected error
+ schema:
+ $ref: '#/definitions/errorModel'
+ delete:
+ description: deletes a single pet based on the ID supplied
+ operationId: deletePet
+ parameters:
+ - name: id
+ in: path
+ description: ID of pet to delete
+ required: true
+ type: integer
+ format: int64
+ responses:
+ '204':
+ description: pet deleted
+ default:
+ description: unexpected error
+ schema:
+ $ref: '#/definitions/errorModel'
+definitions:
+ pet:
+ type: object
+ required:
+ - id
+ - name
+ properties:
+ id:
+ type: integer
+ format: int64
+ name:
+ type: string
+ tag:
+ type: string
+ newPet:
+ type: object
+ required:
+ - name
+ properties:
+ id:
+ type: integer
+ format: int64
+ name:
+ type: string
+ tag:
+ type: string
+ errorModel:
+ type: object
+ required:
+ - code
+ - message
+ properties:
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string
diff --git a/www/swagger/spec-files/security.yaml b/www/swagger/spec-files/security.yaml
new file mode 100644
index 0000000..d1b2ff1
--- /dev/null
+++ b/www/swagger/spec-files/security.yaml
@@ -0,0 +1,171 @@
+swagger: '2.0'
+info:
+ version: 1.0.9-abcd
+ title: Swagger Sample API
+ description: A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification
+ termsOfService: http://helloreverb.com/terms/
+ contact:
+ name: swagger api team
+ url: http://swagger.io
+ license:
+ name: Creative Commons 4.0 International
+ url: http://creativecommons.org/licenses/by/4.0/
+basePath: /v1
+schemes:
+ - http
+ - https
+consumes:
+ - application/json
+produces:
+ - application/json
+ - application/xml
+security:
+ - githubAccessCode:
+ - user
+ - user:email
+ - user:follow
+ - public_repo
+ - repo
+ - repo_deployment
+ - repo:status
+ - delete_repo
+ - notifications
+ - gist
+ - read:repo_hook
+ - write:repo_hook
+ - admin:repo_hook
+ - read:org
+ - write:org
+ - admin:org
+ - read:public_key
+ - write:public_key
+ - admin:public_key
+ - petstoreImplicit:
+ - user
+ - user:email
+ - user:follow
+ - public_repo
+ - repo
+ - repo_deployment
+ - repo:status
+ - delete_repo
+ - notifications
+ - gist
+ - read:repo_hook
+ - write:repo_hook
+ - admin:repo_hook
+ - read:org
+ - write:org
+ - admin:org
+ - read:public_key
+ - write:public_key
+ - admin:public_key
+ - internalApiKey: []
+paths:
+ /pets/{id}:
+ get:
+ parameters:
+ - name: id
+ in: path
+ description: ID of pet to use
+ required: true
+ type: array
+ items:
+ type: string
+ collectionFormat: csv
+ description: Returns pets based on ID
+ summary: Find pets by ID
+ operationId: getPetsById
+ security:
+ - githubAccessCode:
+ - user
+ - internalApiKey: []
+ produces:
+ - application/json
+ - text/html
+ responses:
+ "200":
+ description: pet response
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Pet'
+ default:
+ description: error payload
+ schema:
+ $ref: '#/definitions/ErrorModel'
+securityDefinitions:
+ githubAccessCode:
+ type: oauth2
+ scopes:
+ user: Grants read/write access to profile info only. Note that this scope includes user:email and user:follow.
+ user:email: Grants read access to a user’s email addresses.
+ user:follow: Grants access to follow or unfollow other users.
+ public_repo: Grants read/write access to code, commit statuses, and deployment statuses for public repositories and organizations.
+ repo: Grants read/write access to code, commit statuses, and deployment statuses for public and private repositories and organizations.
+ repo_deployment: Grants access to deployment statuses for public and private repositories. This scope is only necessary to grant other users or services access to deployment statuses, without granting access to the code.
+ repo:status: Grants read/write access to public and private repository commit statuses. This scope is only necessary to grant other users or services access to private repository commit statuses without granting access to the code.
+ delete_repo: Grants access to delete adminable repositories.
+ notifications: Grants read access to a user’s notifications. repo also provides this access.
+ gist: Grants write access to gists.
+ read:repo_hook: Grants read and ping access to hooks in public or private repositories.
+ write:repo_hook: Grants read, write, and ping access to hooks in public or private repositories.
+ admin:repo_hook: Grants read, write, ping, and delete access to hooks in public or private repositories.
+ read:org: Read-only access to organization, teams, and membership.
+ write:org: Publicize and unpublicize organization membership.
+ admin:org: Fully manage organization, teams, and memberships.
+ read:public_key: List and view details for public keys.
+ write:public_key: Create, list, and view details for public keys.
+ admin:public_key: Fully manage public keys.
+ flow: accessCode
+ authorizationUrl: https://github.com/login/oauth/authorize
+ tokenUrl: https://github.com/login/oauth/access_token
+ petstoreImplicit:
+ type: oauth2
+ scopes:
+ user: Grants read/write access to profile info only. Note that this scope includes user:email and user:follow.
+ user:email: Grants read access to a user’s email addresses.
+ user:follow: Grants access to follow or unfollow other users.
+ public_repo: Grants read/write access to code, commit statuses, and deployment statuses for public repositories and organizations.
+ repo: Grants read/write access to code, commit statuses, and deployment statuses for public and private repositories and organizations.
+ repo_deployment: Grants access to deployment statuses for public and private repositories. This scope is only necessary to grant other users or services access to deployment statuses, without granting access to the code.
+ repo:status: Grants read/write access to public and private repository commit statuses. This scope is only necessary to grant other users or services access to private repository commit statuses without granting access to the code.
+ delete_repo: Grants access to delete adminable repositories.
+ notifications: Grants read access to a user’s notifications. repo also provides this access.
+ gist: Grants write access to gists.
+ read:repo_hook: Grants read and ping access to hooks in public or private repositories.
+ write:repo_hook: Grants read, write, and ping access to hooks in public or private repositories.
+ admin:repo_hook: Grants read, write, ping, and delete access to hooks in public or private repositories.
+ read:org: Read-only access to organization, teams, and membership.
+ write:org: Publicize and unpublicize organization membership.
+ admin:org: Fully manage organization, teams, and memberships.
+ read:public_key: List and view details for public keys.
+ write:public_key: Create, list, and view details for public keys.
+ admin:public_key: Fully manage public keys.
+ flow: implicit
+ authorizationUrl: http://petstore.swagger.io/oauth/dialog
+ internalApiKey:
+ type: apiKey
+ in: header
+ name: api_key
+definitions:
+ Pet:
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ type: string
+ tag:
+ type: string
+ ErrorModel:
+ type: object
+ required:
+ - code
+ - message
+ properties:
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string
diff --git a/www/swagger/spec-files/twitter.yaml b/www/swagger/spec-files/twitter.yaml
new file mode 100644
index 0000000..dbd012e
--- /dev/null
+++ b/www/swagger/spec-files/twitter.yaml
@@ -0,0 +1,3083 @@
+swagger: "2.0"
+
+################################################################################
+# API Information #
+################################################################################
+info:
+ version: "1.1"
+ title: Twitter REST API
+# during dev, should point to your local machine
+host: api.twitter.com
+# basePath prefixes all resource paths
+basePath: /1.1
+#
+schemes:
+ # tip: remove http to make production-grade
+ - http
+ - https
+# format of bodies a client can send (Content-Type)
+consumes:
+ - application/json
+# format of the responses to the client (Accepts)
+produces:
+ - application/json
+
+################################################################################
+# Security #
+################################################################################
+securityDefinitions:
+ oauth:
+ type: oauth2
+ flow: implicit
+ authorizationUrl: https://twitter.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=token
+ scopes:
+ basic: |
+ to read any and all data related to twitter
+security:
+ - oauth:
+ - basic
+
+################################################################################
+# Paths #
+################################################################################
+paths:
+ /statuses/mentions_timeline:
+ get:
+ description: Returns the 20 most recent mentions for the authenticating user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: count
+ in: query
+ description: Specifies the number of tweets to try and retrieve
+ required: false
+ type: string
+ - name: since_id
+ in: query
+ description: Returns result with an ID greater than the specified ID
+ required: false
+ type: string
+ - name: max_id
+ in: query
+ description: Returns results with an ID less than or equal to the specified ID
+ required: false
+ type: string
+ - name: trim_user
+ in: query
+ description: When set to either true, t or 1, each tweet returned in a timeline will include a user object
+ required: false
+ type: string
+ - name: contributor_details
+ in: query
+ description: This parameter enhances the contributors element of the status response
+ required: false
+ type: string
+ - name: include_entities
+ in: query
+ description: The entities node will be disincluded when set to false
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Tweets'
+
+ /statuses/user_timeline:
+ get:
+ description: Returns a collection of the most recent Tweets posted by the User
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: count
+ in: query
+ description: Specifies the number of tweets to try and retrieve
+ required: false
+ type: string
+ - name: since_id
+ in: query
+ description: Returns result with an ID greater than the specified ID
+ required: false
+ type: string
+ - name: max_id
+ in: query
+ description: Returns results with an ID less than or equal to the specified ID
+ required: false
+ type: string
+ - name: trim_user
+ in: query
+ description: When set to either true, t or 1, each tweet returned in a timeline will include a user object
+ required: false
+ type: string
+ - name: exclude_replies
+ in: query
+ description: This paramters will prevent from appearing in the returned timeline
+ required: false
+ type: boolean
+ - name: contributor_details
+ in: query
+ description: This paramters enhances the contributors element of the status response to include the screen_name of the contributor
+ required: false
+ type: boolean
+ - name: include_rts
+ in: query
+ description: When set to false, the timeline will strip any native retweet
+ required: false
+ type: boolean
+ responses:
+ "200":
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Tweets'
+
+ /statuses/home_timeline:
+ get:
+ description: Returns a collection of the most recent Tweets
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: since_id
+ in: query
+ description: Returns result with an ID greater than the specified ID
+ required: false
+ type: string
+ - name: max_id
+ in: query
+ description: Returns results with an ID less than or equal to the specified ID
+ required: false
+ type: string
+ - name: trim_user
+ in: query
+ description: When set to either true, t or 1, each tweet returned in a timeline will include a user object
+ required: false
+ type: string
+ - name: exclude_replies
+ in: query
+ description: This paramters will prevent from appearing in the returned timeline
+ required: false
+ type: boolean
+ - name: contributor_details
+ in: query
+ description: This paramters enhances the contributors element of the status response to include the screen_name of the contributor
+ required: false
+ type: boolean
+ responses:
+ "200":
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Tweets'
+
+ /statuses/retweets/{id}:
+ get:
+ description: Retruns a collection of the 100 most recent retweets of the tweet specified by the id
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: id
+ in: path
+ description: The numerical ID of the desired status
+ required: true
+ type: string
+ - name: count
+ in: query
+ description: Specifies the number of tweets to try and retrieve
+ required: false
+ type: string
+ - name: trim_user
+ in: query
+ description: When set to either true, t or 1, each tweet returned in a timeline will include a user object
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Tweets'
+
+ /statuses/show/{id}:
+ get:
+ description: Retruns a single Tweet
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: id
+ in: path
+ description: The numerical ID of the desired status
+ required: true
+ type: string
+ - name: trim_user
+ in: query
+ description: When set to either true, t or 1, each tweet returned in a timeline will include a user object
+ required: false
+ type: string
+ - name: include_my_retweet
+ in: query
+ description: When set to either true, t or 1, any Tweets returned that have been retweeted by the authenticating
+ required: true
+ type: string
+ - name: include_entities
+ type: string
+ in: query
+ description: The entities node will be disincluded when set to false
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Tweets'
+
+ /statuses/destroy/{id}:
+ post:
+ description: Destroys the status specified by the required ID parameter
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: id
+ in: path
+ description: The numerical ID of the desired status
+ required: true
+ type: string
+ - name: trim_user
+ in: query
+ description: When set to either true, t or 1, each tweet returned in a timeline will include a user object
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Tweets'
+
+ /statuses/update:
+ post:
+ description: Updates the authenticating user's status
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: status
+ in: query
+ description: The text of your status update
+ required: true
+ type: string
+ - name: in_reply_to_status_id
+ in: query
+ description: The ID of an existing status
+ required: false
+ type: string
+ - name: lat
+ in: query
+ description: The latitude of the location
+ required: false
+ type: string
+ - name: long
+ in: query
+ description: The longitude of the location
+ required: false
+ type: string
+ - name: place_id
+ in: query
+ description: A place in the world
+ required: false
+ type: string
+ - name: display_coordinates
+ in: query
+ description: Whether or not to put a pin on the exact coordinates a tweet
+ required: false
+ type: string
+ - name: trim_user
+ in: query
+ description: When set to either true, t or 1, each tweet returned in a timeline will include a user object
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Tweets'
+ "403":
+ description: Error
+
+ /statuses/retweets/{id}:
+ post:
+ description: Retweens a tweet
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: id
+ in: path
+ description: The numerical ID of the desired status
+ required: true
+ type: string
+ - name: trim_user
+ in: query
+ description: When set to either true, t or 1, each tweet returned in a timeline will include a user object
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Tweets'
+
+ /statuses/oembed:
+ get:
+ description: Returns information allowing the creation of an embedded representation
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: id
+ in: query
+ description: The tweet/status id to return embed code for
+ required: true
+ type: string
+ - name: url
+ in: query
+ description: The encoded URL of the Tweet status to be embedded
+ required: true
+ type: string
+ - name: maxwidth
+ in: query
+ description: The maximum width in pixels that the embed should be rendered at
+ required: false
+ type: string
+ - name: hide_media
+ in: query
+ description: Specifies whether the embedded tweet should automatically show the original message in the case that the embedded Tweet is a reply
+ required: false
+ type: string
+ - name: hide_thread
+ in: query
+ description: Specifies whether the embedded Tweet html should include a 'script' element pointing to widgets.js
+ required: false
+ type: string
+ - name: align
+ in: query
+ description: Specifies whether the embedded Tweet should be left aligned
+ required: false
+ type: string
+ - name: related
+ in: query
+ description: A value for the TWT related parameters
+ required: false
+ type: string
+ - name: lang
+ in: query
+ description: Languages code for the rendered embed
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Tweets'
+
+ /lists/list:
+ get:
+ description: Return all lists the authenticating or specified user subscribes to, including their own.
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: screen_name
+ in: query
+ description: The screen name of the user for whom to return results for
+ required: true
+ type: string
+ - name: user_id
+ in: query
+ description: The ID of the user for whom to return results for
+ required: true
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Lists'
+
+ /lists/statuses:
+ get:
+ description: Returns a timeline of tweets authored by memebers of the specified list
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list by its slug instead of its numerical id
+ required: true
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: The screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The user ID of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: since_id
+ in: query
+ description: Returns results with an ID greater than the sepcified ID
+ required: false
+ type: string
+ - name: max_id
+ in: query
+ description: Returns results with an ID less than or equal to the specified ID
+ required: false
+ type: string
+ - name: count
+ in: query
+ description: Specifies the number of results to retrieve per page
+ required: false
+ type: string
+ - name: include_entities
+ in: query
+ description: Entities are ON by default
+ required: false
+ type: string
+ - name: include_rts
+ in: query
+ description: When set to either true, t or 1, the list timeline will contain native retweets in addition to the standard stream of tweets
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Tweets'
+
+ /lists/members/destroy:
+ get:
+ description: Returns the list of memebers destroy
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list by its slug instrad of its numerical id
+ required: true
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: The screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: user_id
+ in: query
+ description: The id of the user for whom to remove from the list
+ required: false
+ type: string
+ - name: screen_name
+ in: query
+ description: The screen name of the user for whom to remove from the list
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The is of the user who wons the list being requested by a slug
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+
+ /lists/memberships:
+ get:
+ description: Returns the lists of the specified user has been added to
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: user_id
+ in: query
+ description: The id of the user for whom to return results for
+ required: false
+ type: string
+ - name: screen_name
+ in: query
+ description: The screen name of the user for whom to return results for
+ required: false
+ type: string
+ - name: cursor
+ in: query
+ description: Breaks the results into pages
+ required: false
+ type: string
+ - name: filter_to_owned_lists
+ in: query
+ description: When set to true, t or 1, will return just lists the authenticating user owns
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Cursor_lists'
+
+ /lists/subscribers:
+ get:
+ description: Returns the subscribers of the specified list
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list by its slug insted of its numerical id
+ required: true
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: the screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The user ID of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: cursor
+ in: query
+ description: Breaks the results into pages
+ required: false
+ type: string
+ - name: include_entities
+ in: query
+ description: Wehn set to either true, t or 1
+ required: false
+ type: string
+ - name: skip_status
+ in: query
+ description: When set to either true, t or 1
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Cursor_lists'
+
+ /lists/subscribers/create:
+ post:
+ description: Subscribes the authenticated user to the specified list
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list being requested by a slug
+ required: true
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: the screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The user ID of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Lists'
+
+ /lists/subscribers/show:
+ get:
+ description: Check if the specified user is a subscriber of the specified list
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list being requested by a slug
+ required: true
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: The screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: user_id
+ in: query
+ description: The id of the user for whom to remove from the list
+ required: false
+ type: string
+ - name: screen_name
+ in: query
+ description: The screen name of the user for whom to remove from the list
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The is of the user who wons the list being requested by a slug
+ required: false
+ type: string
+ - name: include_entities
+ in: query
+ description: Wehn set to either true, t or 1
+ required: false
+ type: string
+ - name: skip_status
+ in: query
+ description: When set to either true, t or 1
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Users'
+
+ /lists/subscribers/destroy:
+ get:
+ description: Returns list of subscribers destroy
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list being requested by a slug
+ required: true
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: the screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The user ID of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+
+ /lists/members/create_all:
+ get:
+ description: Returns lists of members create_all
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list being requested by a slug
+ required: true
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: the screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The user ID of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: user_id
+ in: query
+ description: The id of the user for whom to remove from the list
+ required: false
+ type: string
+ - name: screen_name
+ in: query
+ description: The screen name of the user for whom to remove from the list
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+
+ /list/members/show:
+ get:
+ description: Check if the specified user is a member of the specified list
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list being requested by a slug
+ required: true
+ type: string
+ - name: user_id
+ in: query
+ description: The id of the user for whom to remove from the list
+ required: false
+ type: string
+ - name: screen_name
+ in: query
+ description: The screen name of the user for whom to remove from the list
+ required: false
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: The screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The user ID of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: include_entities
+ in: query
+ description: Wehn set to either true, t or 1
+ required: false
+ type: string
+ - name: skip_status
+ in: query
+ description: When set to either true, t or 1
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Users'
+
+ /list/members:
+ get:
+ description: Returns the members of the specified list
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list being requested by a slug
+ required: true
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: The screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The user ID of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: include_entities
+ in: query
+ description: Wehn set to either true, t or 1
+ required: false
+ type: string
+ - name: skip_status
+ in: query
+ description: When set to either true, t or 1
+ required: false
+ type: string
+ - name: cursor
+ in: query
+ description: Breaks the results into pages
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Users'
+
+ /list/members/create:
+ post:
+ description: Returns list of members create
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list being requested by a slug
+ required: true
+ type: string
+ - name: screen_name
+ in: query
+ description: The screen name of the user for whom to remove from the list
+ required: false
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: The screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The user ID of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+
+ /lists/destroy:
+ post:
+ description: Returns list of destroy
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list being requested by a slug
+ required: true
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: The screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The user ID of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Lists'
+
+ /lists/update:
+ post:
+ description: Returns lists of updates
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list being requested by a slug
+ required: true
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: The screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The user ID of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: name
+ in: query
+ description: The name for the list
+ required: false
+ type: string
+ - name: mode
+ in: query
+ description: Whether your list is public or private
+ required: false
+ type: string
+ - name: description
+ in: query
+ description: The description to give the list
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+
+ /lists/create:
+ post:
+ description: Returns list of create
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: name
+ in: query
+ description: The name for the list
+ required: false
+ type: string
+ - name: mode
+ in: query
+ description: Whether your list is public or private
+ required: false
+ type: string
+ - name: description
+ in: query
+ description: The description to give the list
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Lists'
+
+ /lists/show:
+ get:
+ description: Returns list of show
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list being requested by a slug
+ required: true
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: The screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The user ID of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Lists'
+
+ /lists/subscriptions:
+ get:
+ description: Returns list of subscriptions
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: screen_name
+ in: query
+ description: The screen name of the user
+ required: false
+ type: string
+ - name: user_id
+ in: query
+ description: The id of the user for whom to return results for
+ required: false
+ type: string
+ - name: count
+ in: query
+ description: The amount of results to return per page
+ required: false
+ type: string
+ - name: cursor
+ in: query
+ description: Breaks the results into pages
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Cursor_lists'
+
+ /list/members/destroy_all:
+ get:
+ description: Returns lists of destroy all
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: list_id
+ in: query
+ description: The numerical id of the list
+ required: true
+ type: string
+ - name: slug
+ in: query
+ description: You can identify a list being requested by a slug
+ required: true
+ type: string
+ - name: user_id
+ in: query
+ description: The id of the user for whom to remove from the list
+ required: false
+ type: string
+ - name: screen_name
+ in: query
+ description: The screen name of the user for whom to remove from the list
+ required: false
+ type: string
+ - name: owner_screen_name
+ in: query
+ description: The screen name of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ - name: owner_id
+ in: query
+ description: The user ID of the user who owns the list being requested by a slug
+ required: false
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Cursor_lists'
+
+ /direct_messages/sent:
+ get:
+ description: return 20 most recent direct messages sent
+ parameters:
+ - name: since_id
+ in: query
+ required: false
+ type: string
+ - name: max_id
+ in: query
+ required: false
+ type: string
+ - name: count
+ in: query
+ required: false
+ type: string
+ - name: page
+ in: query
+ required: false
+ type: string
+ - name: include_entities
+ in: query
+ required: false
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Messages'
+
+ /direct_messages/show:
+ get:
+ description: returns a single direct message specified by an id
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: id
+ in: query
+ description: ID of direct message
+ type: string
+ required: true
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Messages'
+
+ /search/tweets:
+ get:
+ description: returns collection of relevant Tweets matching query
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: q
+ in: query
+ description: URL-encoded search query of 500 characters max
+ type: string
+ required: true
+ - name: geocode
+ in: query
+ description: returns tweets by users located within given radius
+ type: string
+ required: false
+ - name: lang
+ in: query
+ description: restricts tweets to a given language
+ type: string
+ required: false
+ - name: locale
+ in: query
+ description: language of query you are sending
+ type: string
+ required: false
+ - name: result_type
+ in: query
+ description: specifies type of search results you prefer
+ type: string
+ required: false
+ - name: count
+ in: query
+ description: number of tweets to return
+ type: string
+ - name: until
+ in: query
+ description: returns tweets created before given date
+ type: string
+ - name: since_id
+ in: query
+ description: return results with ID greater than specified
+ type: string
+ - name: max_id
+ in: query
+ description: returns results with an ID less than/equal to specified ID
+ type: string
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ - name: callback
+ in: query
+ description: response will use the callback with given name
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Tweets'
+
+ /saved_searches/list:
+ get:
+ description: Returns the authenticated user's saved search queries
+ security:
+ - oauth:
+ - basic
+ responses:
+ "200":
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Query'
+ /saved_searches/show/{id}:
+ get:
+ description: Retrieve the information for the saved search represented by the given id
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: id
+ in: path
+ description: The id of the saved search
+ required: true
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Query'
+ /saved_searches/create:
+ post:
+ description: Create a new saved search for the authenticated user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: query
+ in: query
+ description: The query of the search the user would like to save
+ required: true
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Query'
+ /saved_searches/destroy/{id}:
+ post:
+ description: Destroy a saved search for the authenticating user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: id
+ in: path
+ description: The id of the saved search
+ required: true
+ type: string
+ responses:
+ "200":
+ description: Success
+ schema:
+ $ref: '#/definitions/Query'
+
+ /direct_messages:
+ get:
+ description: return 20 most recent direct messages sent to user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: since_id
+ in: query
+ description: return results with ID greater than specified
+ type: string
+ - name: max_id
+ in: query
+ description: returns results with an ID less than/equal to specified ID
+ type: string
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ - name: skip_status
+ in: query
+ description: whether or not to include status
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Messages'
+
+ /direct_messages/destroy:
+ post:
+ description: destroys direct messages specified in required ID
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: id
+ in: query
+ description: ID of direct message to delete
+ type: string
+ required: true
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Messages'
+
+ /direct_messages/new:
+ post:
+ description: sends a new direct message to specified user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: user_id
+ in: query
+ description: description
+ type: string
+ required: true
+ - name: screen_name
+ in: query
+ description: screen name of user receiving message
+ type: string
+ - name: text
+ in: query
+ description: text of your direct message
+ type: string
+ required: true
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Messages'
+
+ /friends/ids:
+ get:
+ description: returns a cursored collection of user IDs followed by user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: user_id
+ in: query
+ description: ID of user for whom to return results for
+ type: string
+ - name: screen_name
+ in: query
+ description: screen name of user for whom to return results for
+ type: string
+ - name: cursor
+ in: query
+ description: causes list of connections to be broken in pages
+ type: string
+ - name: stringify_ids
+ in: query
+ description: IDs converted to strings
+ type: string
+ - name: count
+ in: query
+ description: number of IDs to attempt retrieval of
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Cursor_ids'
+
+ /followers/ids:
+ get:
+ description: returns a cursored collection of user IDs following the user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: user_id
+ in: query
+ description: ID of user for whom to return results for
+ type: string
+ - name: screen_name
+ in: query
+ description: screen name of user for whom to return results for
+ type: string
+ - name: cursor
+ in: query
+ description: causes list of connections to be broken in pages
+ type: string
+ - name: stringify_ids
+ in: query
+ description: IDs converted to strings
+ type: string
+ - name: count
+ in: query
+ description: number of IDs to attempt retrieval of
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Cursor_ids'
+
+ /friendships/incoming:
+ get:
+ description: returns collection of IDs of users with pending follow request
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: cursor
+ in: query
+ description: causes list of connections to be broken in pages
+ type: string
+ - name: stringify_ids
+ in: query
+ description: IDs converted to strings
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Cursor_ids'
+
+ /friendships/outgoing:
+ get:
+ description: returns collection of IDs of users with pending follow request from the user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: cursor
+ in: query
+ description: causes list of connections to be broken in pages
+ type: string
+ - name: stringify_ids
+ in: query
+ description: IDs converted to strings
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Cursor_ids'
+
+ /friendships/create:
+ post:
+ description: allows users to follow user sepcified by ID
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: screen_name
+ in: query
+ description: screen name of user for whom to befriend
+ type: string
+ - name: user_id
+ in: query
+ description: ID of user for whom to befriend
+ type: string
+ - name: follow
+ in: query
+ description: enable notifications for target user
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Users'
+
+ /friendships/destroy:
+ post:
+ description: allows user to unfollow user psecified by ID
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: screen_name
+ in: query
+ description: screen name of user for whom to befriend
+ type: string
+ required: true
+ - name: user_id
+ in: query
+ description: ID of user for whom to befriend
+ type: string
+ required: true
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Users'
+
+ /friendships/update:
+ post:
+ description: Allows one to enable or disable settings for specified user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: screen_name
+ in: query
+ description: screen name of user for whom to befriend
+ type: string
+ required: true
+ - name: user_id
+ in: query
+ description: ID of user for whom to befriend
+ type: string
+ required: true
+ - name: device
+ in: query
+ description: enable/disable device notifications for user
+ type: string
+ required: true
+ - name: retweets
+ in: query
+ description: enable/disable retweets from target user
+ type: string
+ required: true
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Friendship'
+
+ /friendships/show:
+ get:
+ description: returns detailed info about relationship between two users
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: source_id
+ in: query
+ description: user id of subject user
+ type: string
+ - name: source_screen_name
+ in: query
+ description: screen_name of subject user
+ type: string
+ - name: target_id
+ in: query
+ description: user id of target user
+ type: string
+ required: true
+ - name: target_screen_name
+ in: query
+ description: screen name of target user
+ type: string
+ required: true
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Friendship'
+
+ /account/settings:
+ get:
+ summary: returns settings for user
+ description: returns settings for user
+ security:
+ - oauth:
+ - basic
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Settings'
+ post:
+ summary: updates user's settings
+ description: updates user's settings
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: trend_location_woeid
+ in: query
+ description: the Yahoo! Where On Earth ID to user as defaul tend location
+ type: string
+ - name: sleep_time_enabled
+ in: query
+ description: enables/disables sleep time, silencing notifications
+ type: string
+ - name: start_sleep_time
+ in: query
+ description: the hour that sleep time should begin if enabled
+ type: string
+ - name: end_sleep_time
+ in: query
+ description: the hour that sleep time should end if enabled
+ type: string
+ - name: time_zone
+ in: query
+ description: timezone dates and times should be displayed in
+ type: string
+ - name: lang
+ in: query
+ description: language which Twitter should render in for the user
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Settings'
+
+ /account/update_delivery_device:
+ post:
+ summary: sets which device Twitter delivers updates to for user
+ description: sets which device Twitter delivers updates to for user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: device
+ in: query
+ description: must be one of sms, none
+ type: string
+ required: true
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Settings'
+
+ /account/update_profile:
+ post:
+ summary: sets values that users ar eable to set under Account tab
+ description: sets values that users ar eable to set under Account tab
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: name
+ in: query
+ description: full name of profile
+ type: string
+ - name: url
+ in: query
+ description: url associated with profile
+ type: string
+ - name: location
+ in: query
+ description: city or country describing where user of account is.
+ type: string
+ - name: description
+ in: query
+ description: a description of user owning account
+ type: string
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ - name: skip_status
+ in: query
+ description: whether or not to include statuses in response
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Settings'
+
+ /account/update_profile_background_image:
+ post:
+ summary: updates user's profile background image
+ description: updates user's profile background image
+ security:
+ - oauth:
+ - basic
+ consumes:
+ - multipart/form-data
+ parameters:
+ - name: tile
+ in: query
+ description: whether or not to tile background image
+ type: string
+ - name: use
+ in: query
+ description: display background image or not
+ type: string
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ - name: skip_status
+ in: query
+ description: whether or not to include status in returned user objects
+ type: string
+ - name: file
+ in: formData
+ description: image to replace background image of profile
+ required: true
+ type: file
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Settings'
+
+ /account/update_profile_colors:
+ post:
+ summary: sets one or more hex values that controls color scheme
+ description: sets one or more hex values that controls color scheme
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: profile_background_color
+ in: query
+ description: profile background color
+ type: string
+ - name: profile_link_color
+ in: query
+ description: profile link color
+ type: string
+ - name: profile_sidebar_border_color
+ in: query
+ description: profile sidebar's border color
+ type: string
+ - name: profile_sidebar_fill_color
+ in: query
+ description: profile's sidebar background color
+ type: string
+ - name: profile_text_color
+ in: query
+ description: profile text color
+ type: string
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ - name: skip_status
+ in: query
+ description: whether or not to include statuses
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Settings'
+
+ /account/update_profile_image:
+ post:
+ summary: updates user's profile image
+ description: updates user's profile image
+ security:
+ - oauth:
+ - basic
+ consumes:
+ - multipart/form-data
+ parameters:
+ - name: skip_status
+ in: query
+ description: whether or not to include statuses
+ type: string
+ - name: image
+ in: formData
+ description: image to be set as profile image
+ type: file
+ required: true
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Settings'
+
+ /blocks/list:
+ get:
+ summary: disallows retweets and device notifications from a user
+ description: disallows retweets and device notifications from a user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ - name: skip_status
+ in: query
+ description: whether or not to include statuses in response
+ type: string
+ - name: cursor
+ in: query
+ description: breaks block of user to be broken up into pages
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Cursor_users'
+
+ /blocks/ids:
+ get:
+ summary: returns array of numeric user ids of blocked users
+ description: returns array of numeric user ids of blocked users
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: stringify_ids
+ in: query
+ description: returns array of numeric IDs as string IDs
+ type: string
+ - name: cursor
+ in: query
+ description: breaks up block of user IDs into pages
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Cursor_users'
+
+ /blocks/create:
+ post:
+ summary: blocks the specified user
+ description: blocks the specified user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: screen_name
+ in: query
+ description: screen name of user to be blocked
+ type: string
+ required: true
+ - name: user_id
+ in: query
+ description: ID of user to be blocked
+ type: string
+ required: true
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ - name: skip_status
+ in: query
+ description: whether or not to skip statuses
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Users'
+
+ /blocks/destroy:
+ post:
+ summary: un-blocks the specified user
+ description: un-blocks the specified user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: screen_name
+ in: query
+ description: screen name of user to be un-blocked
+ type: string
+ required: true
+ - name: user_id
+ in: query
+ description: ID of user to be un-blocked
+ type: string
+ required: true
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ - name: skip_status
+ in: query
+ description: whether or not to skip statuses
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Users'
+
+ /users/lookup:
+ get:
+ summary: returns fully-hydrated user objects up to 100
+ description: returns fully-hydrated user objects up to 100
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: screen_name
+ in: query
+ description: screen name of user to lookup
+ type: string
+ - name: user_id
+ in: query
+ description: ID of user to lookup
+ type: string
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Users'
+
+ /users/show:
+ get:
+ summary: returns a variety of info about specified user
+ description: returns a variety of info about specified user
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: screen_name
+ in: query
+ description: screen name of user to be shown
+ type: string
+ required: true
+ - name: user_id
+ in: query
+ description: ID of user to be shown
+ type: string
+ required: true
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ $ref: '#/definitions/Users'
+
+ /users/search:
+ get:
+ summary: simple relevance-based user search
+ description: simple relevance-based user search
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: q
+ in: query
+ description: the search query to run against people search
+ type: string
+ required: true
+ - name: page
+ in: query
+ description: specifies the page of results to receive
+ type: string
+ - name: count
+ in: query
+ description: number of people to return per page
+ type: string
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Users'
+
+ /users/contributees:
+ get:
+ summary: collection of users specified user can contribute to
+ description: collection of users specified user can contribute to
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: screen_name
+ in: query
+ description: screen name of user that is contributed to
+ type: string
+ required: true
+ - name: user_id
+ in: query
+ description: ID of user to that is contributed to
+ type: string
+ required: true
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ - name: skip_status
+ in: query
+ description: whether or not to skip statuses
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Users'
+
+ /users/contributors:
+ get:
+ summary: collection of users that can contribute to specified account
+ description: collection of users that can contribute to specified account
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: screen_name
+ in: query
+ description: screen name of user contributing
+ type: string
+ required: true
+ - name: user_id
+ in: query
+ description: ID of user contributing
+ type: string
+ required: true
+ - name: include_entities
+ in: query
+ description: whether or not to include entities
+ type: string
+ - name: skip_status
+ in: query
+ description: whether or not to skip statuses
+ type: string
+ responses:
+ 200:
+ description: OK
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Users'
+
+ /geo/id/{place_id}:
+ get:
+ description: Returns all the information about a know place
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: place_id
+ in: path
+ description: A place in the world
+ required: true
+ type: string
+ responses:
+ 200:
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Places'
+
+ /geo/reverse_geoncode:
+ get:
+ description: Given a latitude and a longitude, searches for up to 20 places that can be used as a place_id when updatting a status
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: lat
+ in: query
+ description: The latitude to search around
+ required: true
+ type: string
+ - name: long
+ in: query
+ description: The longtitude to search around
+ required: true
+ type: string
+ - name: accuracy
+ in: query
+ description: A hint on region in which to search
+ required: false
+ type: string
+ - name: granularity
+ in: query
+ description: This is the minimal granularity of place types to return
+ required: false
+ type: string
+ - name: max_results
+ in: query
+ description: A hint as to the number of results to return
+ required: false
+ type: string
+ - name: callback
+ in: query
+ description: If supplied, the responses will use the JSON format with a callback of the given name
+ required: false
+ type: string
+ responses:
+ 200:
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Places'
+
+ /geo/search:
+ get:
+ description: Search for places that can be attached to a statuses/updates
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: lat
+ in: query
+ description: The latitude to search around
+ required: true
+ type: string
+ - name: long
+ in: query
+ description: The longtitude to search around
+ required: true
+ type: string
+ - name: query
+ in: query
+ description: Free-form text to match against while executing a geo-based query
+ required: true
+ type: string
+ - name: ip
+ in: query
+ description: An Ip address
+ required: true
+ type: string
+ - name: accuracy
+ in: query
+ description: A hint on region in which to search
+ required: false
+ type: string
+ - name: granularity
+ in: query
+ description: This is the minimal granularity of place types to return
+ required: false
+ type: string
+ - name: contained_within
+ in: query
+ description: This is the place_id which you would like to restrict the search results to
+ required: false
+ type: string
+ - name: attribute:street_address
+ in: query
+ description: This parameter searches for places which have this givven street address
+ required: false
+ type: string
+ - name: callback
+ in: query
+ description: If supplied, the responses will use the JSON format with a callback of the given name
+ required: false
+ type: string
+ responses:
+ 200:
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Places'
+
+ /geo/similar_places:
+ get:
+ description: Locates places near the given coordinates which are similar in name
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: lat
+ in: query
+ description: The latitude to search around
+ required: true
+ type: string
+ - name: long
+ in: query
+ description: The longtitude to search around
+ required: true
+ type: string
+ - name: name
+ in: query
+ description: The name a place is known as
+ required: true
+ type: string
+ - name: contained_within
+ in: query
+ description: This is the place_id which you would like to restrict the search results to
+ required: false
+ type: string
+ - name: attribute:street_address
+ in: query
+ description: This parameter searches for places which have this givven street address
+ required: false
+ type: string
+ - name: callback
+ in: query
+ description: If supplied, the responses will use the JSON format with a callback of the given name
+ required: false
+ type: string
+ responses:
+ 200:
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Places'
+
+ /geo/places:
+ get:
+ description: Create a new place object at the given latitude and logitude
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: lat
+ in: query
+ description: The latitude to search around
+ required: true
+ type: string
+ - name: long
+ in: query
+ description: The longtitude to search around
+ required: true
+ type: string
+ - name: name
+ in: query
+ description: The name a place is known as
+ required: true
+ type: string
+ - name: token
+ in: query
+ description: The token found in the response from geo/similar_places
+ required: true
+ type: string
+ - name: contained_within
+ in: query
+ description: This is the place_id which you would like to restrict the search results to
+ required: false
+ type: string
+ - name: attribute:street_address
+ in: query
+ description: This parameter searches for places which have this givven street address
+ required: false
+ type: string
+ - name: callback
+ in: query
+ description: If supplied, the responses will use the JSON format with a callback of the given name
+ required: false
+ type: string
+ responses:
+ 200:
+ description: Success
+ schema:
+ $ref: '#/definitions/Places'
+
+ /trends/place:
+ get:
+ description: Returns the top 10 trending topics for a specific WOEID
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: id
+ in: query
+ description: The yahoo where on earch id
+ required: true
+ type: string
+ - name: exclude
+ in: query
+ description: Setting this equal to hashtages will remove all hashtages from the trends list
+ required: true
+ type: string
+ responses:
+ 200:
+ description: Success
+ schema:
+ $ref: '#/definitions/TrendInfo'
+
+ /trends/available:
+ get:
+ description: Returns the availability
+ security:
+ - oauth:
+ - basic
+ responses:
+ 200:
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Location'
+
+ /trends/closest:
+ get:
+ description: Returns the location that Twitter has trending topic information for
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: lat
+ in: query
+ description: If provided with a long parameter the available trend locations wil be stored by distance
+ required: true
+ type: string
+ - name: long
+ in: query
+ description: If provided with a lat parameters the available trend locations will be sorted by distance
+ required: true
+ type: string
+ responses:
+ 200:
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Location'
+
+ /users/report_spam:
+ post:
+ description: Returna users report spam
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: screen_name
+ in: query
+ description: The ID or screen_name of the user you want to report as a spammer
+ required: false
+ type: string
+ - name: user_id
+ in: query
+ description: The ID of the user you want to report as a spammer
+ required: false
+ type: string
+ responses:
+ 200:
+ description: Success
+ schema:
+ $ref: '#/definitions/Users'
+
+ /help/configuration:
+ get:
+ description: Returns the current configuration used by Twitter including twitter.com slugs which are not usernames
+ security:
+ - oauth:
+ - basic
+ responses:
+ 200:
+ description: Success
+ schema:
+ $ref: '#/definitions/Help_Config'
+
+ /help/languages:
+ get:
+ description: Returns the list of languages supported by Twitter along with the language code supported by Twitter
+ security:
+ - oauth:
+ - basic
+ responses:
+ 200:
+ description: Success
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Help_Language'
+
+ /help/privacy:
+ get:
+ description: Returns Twitter's privacy policy
+ security:
+ - oauth:
+ - basic
+ responses:
+ 200:
+ description: Success
+ schema:
+ $ref: '#/definitions/Help_Privacy'
+
+ /help/tos:
+ get:
+ description: Returns the Twitter Terms of Service
+ security:
+ - oauth:
+ - basic
+ responses:
+ 200:
+ description: Success
+ schema:
+ $ref: '#/definitions/Help_Tos'
+
+ /application/rate_limit_status:
+ get:
+ description: Returns the current rate limits for methods belonging to the specified resource families
+ security:
+ - oauth:
+ - basic
+ parameters:
+ - name: resources
+ in: query
+ description: A comma-separated list of resource families you want to know the current rate limit disposition for
+ required: false
+ type: array
+ items:
+ type: string
+ responses:
+ 200:
+ description: Success
+
+
+################################################################################
+# Definitions #
+################################################################################
+definitions:
+ Tweets:
+ type: object
+ properties:
+ contributors:
+ type: array
+ items:
+ $ref: '#/definitions/Contributors'
+ coordinates:
+ $ref: '#/definitions/Coordinates'
+ created_at:
+ type: string
+ current_user_retweet:
+ $ref: '#/definitions/Tweets'
+ entities:
+ $ref: '#/definitions/Entities'
+ favorite_count:
+ type: integer
+ favorited:
+ type: boolean
+ filter_level:
+ type: string
+ id:
+ type: integer
+ id_str:
+ type: string
+ in_reply_to_screen_name:
+ type: string
+ in_reply_to_status_id:
+ type: integer
+ in_reply_to_status_id_str:
+ type: string
+ in_reply_to_user_id:
+ type: integer
+ in_reply_to_user_id_str:
+ type: string
+ lang:
+ type: string
+ place:
+ $ref: '#/definitions/Places'
+ possibly_sensitive:
+ type: boolean
+ quoted_status_id:
+ type: integer
+ quoted_status_id_str:
+ type: string
+ quoted_status:
+ $ref: '#/definitions/Tweets'
+ scopes:
+ type: object
+ additionalProperties: {}
+ retweet_count:
+ type: integer
+ retweeted:
+ type: boolean
+ retweeted_status:
+ $ref: '#/definitions/Tweets'
+ source:
+ type: string
+ text:
+ type: string
+ truncated:
+ type: string
+ user:
+ $ref: '#/definitions/Users'
+ withheld_copyright:
+ type: boolean
+ withheld_countries:
+ type: array
+ items:
+ type: string
+ withheld_scope:
+ type: string
+
+ Contributors:
+ type: object
+ properties:
+ id:
+ type: integer
+ id_str:
+ type: string
+ screen_name:
+ type: string
+
+ Coordinates:
+ type: object
+ properties:
+ coordinates:
+ type: array
+ items:
+ type: number
+ type:
+ type: string
+
+ Users:
+ type: object
+ properties:
+ contributors_enabled:
+ type: boolean
+ created_at:
+ type: string
+ default_profile:
+ type: boolean
+ default_profile_image:
+ type: boolean
+ description:
+ type: string
+ entities:
+ $ref: '#/definitions/Entities'
+ favorites_count:
+ type: integer
+ follow_request_sent:
+ type: boolean
+ following:
+ type: boolean
+ followers_count:
+ type: integer
+ friends_count:
+ type: integer
+ geo_enabled:
+ type: boolean
+ id:
+ type: integer
+ id_str:
+ type: string
+ is_translator:
+ type: boolean
+ lang:
+ type: string
+ listed_count:
+ type: integer
+ location:
+ type: string
+ name:
+ type: string
+ notifications:
+ type: boolean
+ profile_background_color:
+ type: string
+ profile_background_image_url:
+ type: string
+ profile_background_image_url_https:
+ type: string
+ profile_background_tile:
+ type: string
+ profile_banner_url:
+ type: string
+ profile_image_url:
+ type: string
+ profile_image_url_https:
+ type: string
+ profile_link_color:
+ type: string
+ profile_sidebar_border_color:
+ type: string
+ profile_sidebar_fill_color:
+ type: string
+ profile_text_color:
+ type: string
+ profile_use_background_image:
+ type: boolean
+ protected:
+ type: boolean
+ screen_name:
+ type: string
+ show_all_inline_media:
+ type: boolean
+ status:
+ $ref: '#/definitions/Tweets'
+ statuses_count:
+ type: integer
+ time_zone:
+ type: string
+ url:
+ type: string
+ utc_offset:
+ type: integer
+ verified:
+ type: boolean
+ withheld_in_countries:
+ type: string
+ withheld_scope:
+ type: string
+
+ Entities:
+ type: object
+ properties:
+ hashtags:
+ type: array
+ items:
+ $ref: '#/definitions/Hashtags'
+ media:
+ type: array
+ items:
+ $ref: '#/definitions/Media'
+ urls:
+ type: array
+ items:
+ $ref: '#/definitions/URL'
+ user_mentions:
+ type: array
+ items:
+ $ref: '#/definitions/User_Mention'
+
+ Hashtags:
+ type: object
+ properties:
+ indices:
+ type: array
+ items:
+ type: integer
+ text:
+ type: string
+
+ Media:
+ type: object
+ properties:
+ display_url:
+ type: string
+ expanded_url:
+ type: string
+ id:
+ type: integer
+ id_str:
+ type: string
+ indices:
+ type: array
+ items:
+ type: integer
+ media_url:
+ type: string
+ media_url_https:
+ type: string
+ sizes:
+ $ref: '#/definitions/Sizes'
+ source_status_id:
+ type: integer
+ source_status_id_str:
+ type: integer
+ type:
+ type: string
+ url:
+ type: string
+
+ Size:
+ type: object
+ properties:
+ h:
+ type: integer
+ resize:
+ type: string
+ w:
+ type: integer
+
+
+ Sizes:
+ type: object
+ properties:
+ thumb:
+ $ref: '#/definitions/Size'
+ large:
+ $ref: '#/definitions/Size'
+ medium:
+ $ref: '#/definitions/Size'
+ small:
+ $ref: '#/definitions/Size'
+
+ URL:
+ type: object
+ properties:
+ display_url:
+ type: string
+ expanded_url:
+ type: string
+ indices:
+ type: string
+ url:
+ type: string
+
+ User_Mention:
+ type: object
+ properties:
+ id:
+ type: integer
+ id_str:
+ type: string
+ indices:
+ type: array
+ items:
+ type: integer
+ name:
+ type: string
+ screen_name:
+ type: string
+
+ Places:
+ type: object
+ properties:
+ attributes:
+ type: object
+ additionalProperties: {}
+ bounding_box:
+ $ref: '#/definitions/Bounding_box'
+ country:
+ type: string
+ country_code:
+ type: string
+ full_name:
+ type: string
+ id:
+ type: string
+ name:
+ type: string
+ place_type:
+ type: string
+ url:
+ type: string
+
+ Bounding_box:
+ type: object
+ properties:
+ coordinates:
+ type: array
+ items:
+ type: array
+ items:
+ type: number
+ type:
+ type: string
+
+ Lists:
+ type: object
+ properties:
+ created_at:
+ type: string
+ slug:
+ type: string
+ name:
+ type: string
+ description:
+ type: string
+ mode:
+ type: string
+ following:
+ type: boolean
+ user:
+ $ref: '#/definitions/Users'
+ member_count:
+ type: integer
+ id_str:
+ type: string
+ subscriber_count:
+ type: integer
+ id:
+ type: integer
+ uri:
+ type: string
+
+ Cursor_lists:
+ type: object
+ properties:
+ previous_cursor:
+ type: integer
+ lists:
+ type: array
+ items:
+ $ref: '#/definitions/Lists'
+ previous_cursor_str:
+ type: string
+ next_cursor:
+ type: integer
+ next_cursor_str:
+ type: string
+
+ Cursor_users:
+ type: object
+ properties:
+ previous_cursor:
+ type: integer
+ users:
+ type: array
+ items:
+ $ref: '#/definitions/Users'
+ previous_cursor_str:
+ type: string
+ next_cursor:
+ type: integer
+ next_cursor_str:
+ type: string
+
+ Cursor_ids:
+ type: object
+ properties:
+ previous_cursor:
+ type: integer
+ users:
+ type: array
+ items:
+ type: integer
+ previous_cursor_str:
+ type: string
+ next_cursor:
+ type: integer
+ next_cursor_str:
+ type: string
+
+ Messages:
+ type: object
+ properties:
+ created_at:
+ type: string
+ entities:
+ $ref: '#/definitions/Entities'
+ id:
+ type: integer
+ id_string:
+ type: string
+ recipient:
+ $ref: '#/definitions/Users'
+ recipient_id:
+ type: integer
+ recipient_screen_name:
+ type: string
+ sender:
+ $ref: '#/definitions/Users'
+ sender_id:
+ type: integer
+ sender_screen_name:
+ type: string
+ text:
+ type: string
+
+ Query:
+ type: object
+ properties:
+ created_at:
+ type: string
+ id:
+ type: integer
+ id_str:
+ type: string
+ name:
+ type: string
+ position:
+ type: string
+ query:
+ type: string
+
+ Friendship:
+ type: object
+ properties:
+ relationship:
+ $ref: '#/definitions/Targets'
+ source:
+ $ref: '#/definitions/Source'
+
+ Targets:
+ type: object
+ properties:
+ target:
+ $ref: '#/definitions/Target'
+
+ Target:
+ type: object
+ properties:
+ id_str:
+ type: string
+ id:
+ type: integer
+ followed_by:
+ type: boolean
+ screen_name:
+ type: string
+ following:
+ type: boolean
+
+ Source:
+ type: object
+ properties:
+ can_dm:
+ type: boolean
+ blocking:
+ type: boolean
+ id_str:
+ type: boolean
+ all_replies:
+ type: boolean
+ want_retweets:
+ type: boolean
+ id:
+ type: integer
+ marked_spam:
+ type: boolean
+ followed_by:
+ type: boolean
+ notifications_enable:
+ type: boolean
+ screen_name:
+ type: string
+ following:
+ type: boolean
+
+ Settings:
+ type: object
+ properties:
+ sleep_time:
+ $ref: '#/definitions/Sleep'
+ use_cookie_personalization:
+ type: boolean
+ trend_location:
+ type: array
+ items:
+ $ref: '#/definitions/Location'
+ language:
+ type: string
+ discoverable_by_email:
+ type: boolean
+ always_use_https:
+ type: boolean
+ protected:
+ type: boolean
+ geo_enabled:
+ type: boolean
+ show_all_inline_media:
+ type: boolean
+ screen_name:
+ type: string
+
+ Sleep:
+ type: object
+ properties:
+ end_time:
+ type: string
+ enabled:
+ type: boolean
+ start_time:
+ type: string
+
+ Location:
+ type: object
+ properties:
+ name:
+ type: string
+ placeType:
+ $ref: '#/definitions/PlaceType'
+ woeid:
+ type: integer
+ country:
+ type: string
+ url:
+ type: string
+ countryCode:
+ type: string
+ parentid:
+ type: integer
+
+ PlaceType:
+ type: object
+ properties:
+ name:
+ type: string
+ code:
+ type: integer
+
+ TrendInfo:
+ type: object
+ properties:
+ as_of:
+ type: string
+ created_at:
+ type: string
+ locations:
+ type: array
+ items:
+ $ref: '#/definitions/Location'
+ trends:
+ type: array
+ items:
+ $ref: '#/definitions/Trends'
+
+ Trends:
+ type: object
+ properties:
+ events:
+ type: string
+ name:
+ type: string
+ promoted_content:
+ type: string
+ query:
+ type: string
+ url:
+ type: string
+
+ Help_Config:
+ type: object
+ properties:
+ dm_text_character_limit:
+ type: integer
+ characters_reserved_per_media:
+ type: integer
+ max_media_per_upload:
+ type: integer
+ non_username_paths:
+ type: array
+ items:
+ type: string
+ photo_size_limit:
+ type: integer
+ photo_sizes:
+ $ref: '#/definitions/Sizes'
+
+ Help_Language:
+ type: object
+ properties:
+ code:
+ type: string
+ status:
+ type: string
+ name:
+ type: string
+
+ Help_Privacy:
+ type: object
+ properties:
+ privacy:
+ type: string
+
+ Help_Tos:
+ type: object
+ properties:
+ Tos:
+ type: string
+
+
+
+
+