mirror of
https://github.com/balkian/gists.git
synced 2024-11-21 17:22:29 +00:00
Add 'repos/e4b375171b20aea1fdc4/' from commit 'a0025f925421759994a6da28799e4e9cb0c341ae'
git-subtree-dir: repos/e4b375171b20aea1fdc4 git-subtree-mainline:a8afcd904a
git-subtree-split:a0025f9254
This commit is contained in:
commit
c036859294
644
repos/e4b375171b20aea1fdc4/api_swagger.yaml
Normal file
644
repos/e4b375171b20aea1fdc4/api_swagger.yaml
Normal file
@ -0,0 +1,644 @@
|
||||
swagger: "2.0"
|
||||
info:
|
||||
version: 0.1.0
|
||||
title: SCANER API
|
||||
license:
|
||||
name: MIT
|
||||
url: http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
|
||||
securityDefinitions: {}
|
||||
consumes:
|
||||
- application/json
|
||||
produces:
|
||||
- application/json
|
||||
paths:
|
||||
/users/{userId}:
|
||||
get:
|
||||
tags:
|
||||
- users
|
||||
operationId: app.get_user
|
||||
produces:
|
||||
- application/json
|
||||
parameters:
|
||||
- name: fields
|
||||
in: query
|
||||
required: false
|
||||
x-is-map: false
|
||||
type: string
|
||||
description: Comma-separated list of fields to include in the response.
|
||||
- name: userId
|
||||
in: path
|
||||
required: true
|
||||
x-is-map: false
|
||||
type: integer
|
||||
format: int64
|
||||
responses:
|
||||
200:
|
||||
description: User found and returned
|
||||
schema:
|
||||
$ref: "#/definitions/Users"
|
||||
/users:
|
||||
get:
|
||||
tags:
|
||||
- users
|
||||
operationId: app.get_users
|
||||
produces:
|
||||
- application/json
|
||||
parameters:
|
||||
- name: fields
|
||||
in: query
|
||||
required: false
|
||||
x-is-map: false
|
||||
type: string
|
||||
description: Comma-separated list of fields to retrieve
|
||||
- name: limit
|
||||
in: query
|
||||
required: false
|
||||
x-is-map: false
|
||||
type: integer
|
||||
format: int64
|
||||
description: Get only this many users per request
|
||||
- name: topic
|
||||
in: query
|
||||
required: false
|
||||
x-is-map: false
|
||||
type: string
|
||||
description: Only retrieve users related to a certain topic
|
||||
- name: sort_by
|
||||
in: query
|
||||
required: false
|
||||
x-is-map: false
|
||||
type: string
|
||||
description: Sort users using this criterion. Prepending a minus sign reverses the order. e.g. '-tweet_count'.
|
||||
responses:
|
||||
200:
|
||||
description: Users found and returned
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/definitions/Cursor_users"
|
||||
/tweets/{tweetId}:
|
||||
get:
|
||||
tags:
|
||||
- tweets
|
||||
operationId: app.get_tweet
|
||||
produces:
|
||||
- application/json
|
||||
parameters:
|
||||
- name: fields
|
||||
in: query
|
||||
required: false
|
||||
x-is-map: false
|
||||
type: string
|
||||
description: Comma-separated list of fields to include in the response.
|
||||
- name: tweetId
|
||||
in: path
|
||||
required: true
|
||||
x-is-map: false
|
||||
type: integer
|
||||
format: int64
|
||||
responses:
|
||||
200:
|
||||
description: Tweet found and returned
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/Tweets'
|
||||
404:
|
||||
description: Tweet not found
|
||||
delete:
|
||||
description: Delete a Tweet
|
||||
tags:
|
||||
- tweets
|
||||
operationId: app.delete_tweet
|
||||
produces:
|
||||
- application/json
|
||||
parameters:
|
||||
- name: tweetId
|
||||
in: path
|
||||
required: true
|
||||
x-is-map: false
|
||||
type: integer
|
||||
format: int64
|
||||
responses:
|
||||
200:
|
||||
description: "Tweet deleted"
|
||||
/tweets:
|
||||
get:
|
||||
tags:
|
||||
- tweets
|
||||
operationId: app.get_tweets
|
||||
produces:
|
||||
- application/json
|
||||
parameters:
|
||||
- name: fields
|
||||
in: query
|
||||
required: false
|
||||
x-is-map: false
|
||||
type: string
|
||||
description: Comma-separated list of fields to retrieve
|
||||
- name: limit
|
||||
in: query
|
||||
required: false
|
||||
x-is-map: false
|
||||
type: integer
|
||||
format: int64
|
||||
description: Get only this many tweets per request
|
||||
- name: topic
|
||||
in: query
|
||||
required: false
|
||||
x-is-map: false
|
||||
type: string
|
||||
description: Only retrieve tweets related to a certain topic
|
||||
- name: sort_by
|
||||
in: query
|
||||
required: false
|
||||
x-is-map: false
|
||||
type: string
|
||||
description: Sort tweets using this criterion. Prepending a minus sign reverses the order. e.g. 'retweet_count'.
|
||||
responses:
|
||||
200:
|
||||
description: Tweets found and returned
|
||||
schema:
|
||||
$ref: '#/definitions/Tweets'
|
||||
404:
|
||||
description: No Tweets found matching that query
|
||||
post:
|
||||
description: Upload a tweet
|
||||
tags:
|
||||
- tweets
|
||||
operationId: app.add_tweet
|
||||
produces:
|
||||
- application/json
|
||||
parameters:
|
||||
- name: body
|
||||
in: body
|
||||
required: true
|
||||
x-is-map: false
|
||||
schema:
|
||||
$ref: '#/definitions/Tweets_Raw'
|
||||
responses:
|
||||
200:
|
||||
description: "Uploaded"
|
||||
|
||||
|
||||
/friendships/show:
|
||||
get:
|
||||
description: returns detailed info about relationship between two users
|
||||
operationId: app.get_friendship
|
||||
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'
|
||||
|
||||
|
||||
definitions:
|
||||
|
||||
Tweets:
|
||||
allOf:
|
||||
-
|
||||
$ref: "#/definitions/Tweets_Raw"
|
||||
-
|
||||
type: object
|
||||
properties:
|
||||
metrics:
|
||||
$ref: '#/definitions/Tweet_metrics'
|
||||
|
||||
Tweets_Raw:
|
||||
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:
|
||||
allOf:
|
||||
-
|
||||
$ref: "#/definitions/Raw_Users"
|
||||
-
|
||||
type: object
|
||||
properties:
|
||||
metrics:
|
||||
$ref: '#/definitions/User_metrics'
|
||||
Raw_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
|
||||
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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'
|
||||
|
||||
Tweet_metrics:
|
||||
type: object
|
||||
properties:
|
||||
popularity:
|
||||
type: number
|
||||
|
||||
User_metrics:
|
||||
type: object
|
||||
properties:
|
||||
popularity:
|
||||
type: number
|
Loading…
Reference in New Issue
Block a user