Skip to content

Instantly share code, notes, and snippets.

@dskvr
Created March 21, 2020 05:56
Show Gist options
  • Save dskvr/bdcb4da5c8501bc01b06c6865aa941c4 to your computer and use it in GitHub Desktop.
Save dskvr/bdcb4da5c8501bc01b06c6865aa941c4 to your computer and use it in GitHub Desktop.
Put.io 2.7.0 OAS 3.0 Specification
openapi: 3.0.2
info:
version: "2.7.0"
title: Put.io
description: |
Start by registering your application and obtaining your API credentials from [OAuth Apps page](https://app.put.io/settings/account/oauth/apps).
The API is CORS enabled. All API responses include following header:
Access-Control-Allow-Origin: "*"
We have clients for folowing languages at the moment:
* [Python](https://pypi.org/project/putio.py/)
* [JavaScript](https://www.npmjs.com/package/@putdotio/api-client)
* [Go](https://godoc.org/github.com/putdotio/go-putio/putio)
* [Swift](https://cocoapods.org/pods/PutioAPI)
And, if you want to share, you can tell us what you are building at [info@put.io](info@put.io)
If you want to try API methoes via Swagger UI, use *implicit* authorization type and pass `3270` as `client_id`.
termsOfService: https://put.io/terms-of-service/
contact:
name: API Support
email: info@put.io
servers:
- url: https://api.put.io/v2
components:
securitySchemes:
OAuth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://api.put.io/v2/oauth2/authenticate
tokenUrl: https://api.put.io/v2/oauth2/access_token
scopes: {}
implicit:
authorizationUrl: https://api.put.io/v2/oauth2/authenticate
scopes: {}
schemas:
Error:
type: object
properties:
error_type:
type: string
error_message:
type: string
error_id:
type: string
extra:
type: object
AccountInfo:
type: object
properties:
user_id:
type: integer
format: int64
example: 1234
username:
type: string
example: cenk
mail:
type: string
format: email
example: cenk@example.com
AccountSettings:
type: object
properties:
default_download_folder:
type: integer
example: 0
default: 0
is_invisible:
type: boolean
example: True
default: False
subtitle_languages:
type: array
items:
type: string
example: ["tur", "eng"]
default: []
default_subtitle_language:
type: string
example: "tur"
default: null
File:
type: object
properties:
content_type:
type: string
example: application/x-directory
crc32:
type: string
created_at:
type: string
format: date-time
id:
type: integer
is_mp4_available:
type: boolean
description: "Video has converted to MP4."
is_shared:
type: boolean
description: "Not your file, some friend has shared this file with you."
name:
type: string
description: Also includes extension.
parent_id:
type: integer
screenshot:
type: string
format: uri
size:
type: integer
file_type:
$ref: '#/components/schemas/FileType'
extension:
type: string
need_convert:
type: boolean
description: "`true` if video needs to be converted to H.264 video & 2-channel AAC audio format. `false` if video has already converted to MP4 or video is in H.264-AAC format. This field is present only if `mp4_status=true` is passed in listing request."
mp4_size:
type: integer
description: Size of the converted MP4. This field is present only if `mp4_status=true` is passed in listing request.
FileType:
type: string
enum:
- FOLDER
- FILE
- AUDIO
- VIDEO
- IMAGE
- ARCHIVE
- PDF
- TEXT
- SWF
Extraction:
type: object
properties:
id:
type: integer
name:
type: string
status:
type: string
enum:
- IN_QUEUE
- EXTRACTING
- EXTRACTED
- PASSWORD
- ERROR
message:
type: string
num_parts:
type: integer
files:
type: array
items:
type: integer
Transfer:
type: object
properties:
availability:
type: integer
minimum: 0
maximum: 100
created_at:
type: string
format: date-time
current_ratio:
type: number
format: float
minimum: 0
downloaded:
type: integer
uploaded:
type: integer
down_speed:
type: integer
up_speed:
type: integer
error_message:
type: string
estimated_time:
type: integer
file_id:
type: integer
finished_at:
type: string
format: date-time
id:
type: integer
is_private:
type: boolean
name:
type: string
peers:
type: integer
minimum: 0
percent_done:
type: integer
minimum: 0
maximum: 100
save_parent_id:
type: integer
seconds_seeding:
type: integer
size:
type: integer
source:
type: string
status:
type: string
enum:
- IN_QUEUE
- WAITING
- DOWNLOADING
- COMPLETING
- SEEDING
- COMPLETED
- ERROR
subscription_id:
type: integer
tracker_message:
type: string
type:
type: string
enum:
- TORRENT
- URL
- PLAYLIST
RssFeed:
type: object
properties:
id:
type: integer
title:
type: string
example: "Test RSS feed"
rss_source_url:
type: string
example: "http://example.com/feed.rss"
format: uri
parent_dir_id:
type: integer
example: 0
delete_old_files:
type: boolean
example: false
keyword:
type: string
example: null
paused:
type: boolean
example: false
paused_at:
type: string
format: date-time
example: "2018-10-05T16:58:46"
created_at:
type: string
format: date-time
example: "2018-10-05T13:58:46"
updated_at:
type: string
format: date-time
example: "2018-10-05T13:58:46"
started_at:
type: string
format: date-time
example: "2018-10-05T13:58:46"
Friend:
type: object
properties:
name:
type: string
avatar_url:
type: string
format: uri
id:
type: integer
Config:
type: object
properties:
config:
type: object
ConfigValue:
type: object
properties:
value:
type: object
OOBCode:
type: object
properties:
code:
type: string
example: "ASDF1234"
OAuthToken:
type: object
properties:
oauth_token:
type: string
example: "ZIWFWMPOOJL463Z7WI24"
security:
- OAuth2: []
tags:
- name: "account"
description: "Manage your account and settings"
- name: "files"
description: "Manage your files"
- name: "transfers"
description: "Manage your transfers"
- name: "config"
description: "Key-value storage for app to store user specific data"
- name: "zips"
description: "Download multiple files/folders as ZIP file"
- name: "shares"
description: "Manage your shared files"
- name: "friends"
description: "Manage your friends"
- name: "rss"
description: "Manage your rss feeds"
- name: "events"
description: "List or delete your events"
paths:
/account/info:
get:
tags:
- account
summary: Get account info
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
info:
$ref: '#/components/schemas/AccountInfo'
/account/settings:
get:
tags:
- account
summary: Get account settings
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AccountSettings'
post:
tags:
- account
summary: Update account settings
description: Only sent parameters are updated. Missing ones will not be removed.
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/AccountSettings'
responses:
200:
description: OK
/transfers/list:
get:
tags:
- transfers
summary: List all transfers
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
transfers:
type: array
items:
$ref: '#/components/schemas/Transfer'
/transfers/{id}:
get:
tags:
- transfers
summary: Get transfer details
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
transfer:
$ref: '#/components/schemas/Transfer'
/transfers/add:
post:
tags:
- transfers
summary: Add new transfer from URI
description: If you want to upload a torrent file, use `/files/upload` endpoint.
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
url:
type: string
format: uri
description: HTTP[S] URL or magnet link.
save_parent_id:
description: Where to save the transfer's files.
type: integer
callback_url:
description: Transfer’s metadata will be POSTed to this URL after the download is finished.
type: string
format: uri
required:
- url
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
transfer:
$ref: '#/components/schemas/Transfer'
/transfers/retry:
post:
tags:
- transfers
summary: Retry failed transfer
parameters:
- name: id
in: query
required: true
schema:
type: integer
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
transfer:
$ref: '#/components/schemas/Transfer'
/transfers/cancel:
post:
tags:
- transfers
summary: Cancel or remove transfers
description: If transfer is in SEEDING state, stops seeding. Else, removes transfer entry. Does not remove their files.
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
transfer_ids:
type: array
items:
type: integer
required:
- transfer_ids
responses:
200:
description: OK
/transfers/clean:
post:
tags:
- transfers
summary: Clean finished transfers
description: Only removes transfer entries, does not remove files.
requestBody:
required: false
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
transfer_ids:
type: array
description: If not given, removes all completed transfers.
items:
type: integer
required:
- transfer_ids
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
deleted_ids:
type: array
items:
type: integer
/transfers/remove:
post:
tags:
- transfers
summary: Remove transfers
requestBody:
required: false
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
remove_filter:
type: string
enum:
- completed
- all
transfer_ids:
type: array
description: If remove_filter is not given, then transfer_ids must be given.
items:
type: integer
responses:
200:
description: OK
/files/list:
get:
tags:
- files
summary: List files and their properties
parameters:
- name: parent_id
description: List files under a folder. If not specified, files at root folder will be listed. Listing is not recursive. However, if you pass "-1", all files of the user will be returned. If you pass "-1", make sure that you also specify `per_page` param to make use of cursor.
in: query
schema:
type: integer
- name: per_page
description: Number of files to be returned in response. If not specified `cursor` will always be `null` and no more than 1000 items will be returned.
in: query
schema:
type: integer
maximum: 1000
- name: sort_by
description: Sort order of files in response. If not specified, the value saved in user settings will be used.
in: query
schema:
type: string
enum:
- NAME_ASC
- NAME_DESC
- SIZE_ASC
- SIZE_DESC
- DATE_ASC
- DATE_DESC
- MODIFIED_ASC
- MODIFIED_DESC
- name: content_type
description: Filter files by content type.
in: query
schema:
type: string
- name: file_type
description: Filter files by file type.
in: query
schema:
type: array
items:
$ref: '#/components/schemas/FileType'
explode: false
- name: stream_url
description: Include `stream_url` in files array.
in: query
schema:
type: boolean
- name: stream_url_parent
description: Include `stream_url` in parent object.
in: query
schema:
type: boolean
- name: mp4_stream_url
description: Include `mp4_stream_url` in files array.
in: query
schema:
type: boolean
- name: mp4_stream_url_parent
description: Include `mp4_stream_url` in parent object.
in: query
schema:
type: boolean
- name: hidden
description: Folders such as "Your friends files" at root and folders in it are hidden by default if they are empty. If you want to include them in response, you can pass `true`.
in: query
schema:
type: boolean
- name: mp4_status
description: Include `mp4_size` and `need_convert` fileds in response.
in: query
schema:
type: boolean
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
files:
type: array
items:
$ref: '#/components/schemas/File'
parent:
$ref: '#/components/schemas/File'
total:
type: integer
cursor:
type: string
description: Cursor value for fetching next page. You have to specify "per_page" param to get a cursor. Otherwise, it will always be null.
/files/list/continue:
post:
tags:
- files
summary: Fetch remaining files via cursor
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
cursor:
type: string
description: Cursor value from /files/list response.
per_page:
description: Number of files to be returned in response.
type: integer
maximum: 1000
required:
- cursor
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
files:
type: array
items:
$ref: '#/components/schemas/File'
cursor:
type: string
description: Cursor value for fetching next page. If last page, cursor is null.
/files/search:
get:
tags:
- files
summary: Search your and your friends' files
parameters:
- name: query
description: The keyword to search.
in: query
required: true
schema:
type: string
- name: per_page
description: Number of files to be returned in response.
in: query
schema:
type: integer
maximum: 1000
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
files:
type: array
items:
$ref: '#/components/schemas/File'
total:
type: integer
cursor:
type: string
description: Cursor value for fetching next page. You have to specify "per_page" param to get a cursor. Otherwise, it will always be null.
/files/search/continue:
post:
tags:
- files
summary: Fetch rest of the search results
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
cursor:
type: string
description: Cursor value from /files/list response.
per_page:
description: Number of files to be returned in response.
type: integer
maximum: 1000
required:
- cursor
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
files:
type: array
items:
$ref: '#/components/schemas/File'
total:
type: integer
cursor:
type: string
description: Cursor value for fetching next page. You have to specify "per_page" param to get a cursor. Otherwise, it will always be null.
/files/create-folder:
post:
tags:
- files
summary: Create new folder
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
name:
type: string
description: Name of the new folder.
parent_id:
description: Location of the new folder.
type: integer
required:
- name
- parent_id
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
file:
$ref: '#/components/schemas/File'
/files/rename:
post:
tags:
- files
summary: Rename file
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
file_id:
type: integer
description: ID of the file to be renamed.
name:
description: Name of the new file.
type: string
required:
- file_id
- name
responses:
200:
description: OK
/files/move:
post:
tags:
- files
summary: Move files
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
file_ids:
description: ID of the file to be renamed.
type: array
items:
type: integer
parent_id:
description: Location of the destination folder.
type: integer
required:
- file_ids
- parent_id
responses:
200:
description: OK
/files/{id}/mp4:
post:
tags:
- files
summary: Convert file to MP4
parameters:
- name: id
description: ID of the file to be converted.
in: path
required: true
schema:
type: integer
responses:
200:
description: OK
get:
tags:
- files
summary: Get MP4 conversion status
parameters:
- name: id
description: ID of the file to be converted.
in: path
required: true
schema:
type: integer
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
mp4:
type: object
properties:
status:
type: string
enum:
- IN_QUEUE
- EXTRACTING
- EXTRACTED
- PASSWORD
- ERROR
percent_done:
type: integer
size:
type: integer
/files/{id}/subtitles:
get:
tags:
- files
summary: List available subtitles
description: Lists available subtitles for user’s preferred language. User must select “Default Subtitle Language” from settings page.
parameters:
- name: id
description: File id
in: path
required: true
schema:
type: integer
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
subtitles:
type: array
items:
type: object
properties:
key:
type: string
example: "V7mVadfvq34erarjy9tqj0435hgare"
description: This is the key used for downloading subtitle.
language:
type: string
example: "English"
description: Language name in English. This may be null. We are working on improving it.
name:
type: string
example: "MySubtitle1.srt"
description: Subtitle files name.
source:
type: string
example: "folder"
enum:
- opensubtitles
- mkv
- folder
description: Where we got this subtitle from.
/files/{id}/subtitles/{key}:
get:
tags:
- files
summary: Download subtitle file
parameters:
- name: id
in: path
required: true
schema:
type: integer
- name: key
in: path
required: true
schema:
type: string
- name: format
in: query
required: false
schema:
type: string
enum:
- srt
- webvtt
responses:
200:
description: OK
content:
text/vtt:
schema:
type: string
application/x-subrip:
schema:
type: string
/files/{id}/hls/media.m3u8:
get:
tags:
- files
summary: Download HLS playlist for video file
parameters:
- name: id
description: File id
in: path
required: true
schema:
type: integer
- name: subtitle_key
description: Subtitle key for the file. Use “all” as key to get available subtitles for user’s preferred languages.
in: query
required: true
schema:
type: string
responses:
200:
description: OK
content:
m3u8:
schema:
type: string
/files/share:
post:
tags:
- shares
summary: Shares files with friends
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
file_ids:
type: array
items:
type: integer
friends:
description: ‘everyone’ or user names of friends.
example: ‘johndoe,janedoe’
type: array
items:
type: string
required:
- file_ids
- friends
responses:
200:
description: OK
/files/shared:
get:
tags:
- shares
summary: List your shared files
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
shared:
type: array
items:
type: object
properties:
id:
type: integer
name:
type: string
size:
type: integer
share_with:
oneOf:
- type: integer
- type: string
/files/{id}/shared-with:
get:
tags:
- shares
summary: List users that the file is shared with
description: Each result item contains a share id which can be used for unsharing.
parameters:
- name: id
description: File id
in: path
required: true
schema:
type: integer
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
shared-with:
type: array
items:
type: object
properties:
user_name:
type: string
example: "John Doe"
user_avatar_url:
type: string
example: "/avatars/johndoe.png"
share_id:
type: integer
example: 3913572317
/files/unshare:
post:
tags:
- shares
summary: Unshare file
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
shares:
description: ‘everyone’ or friend's id
type: array
items:
anyOf:
- type: integer
- type: string
required:
- shares
responses:
200:
description: OK
/events/list:
get:
tags:
- events
summary: List events
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
events:
type: array
items:
type: object
properties:
id:
type: integer
created_at:
type: string
format: date-time
example: "2014-12-09 22:31:42"
type:
type: string
enum:
- upload
- zip_created
- transfer_completed
- file_shared
- transfer_from_rss_error
- transfer_error
- transfer_callback_error
- file_from_rss_deleted_for_space
- private_torrent_pin
- rss_filter_paused
/events/delete:
post:
tags:
- events
summary: Clear events
responses:
200:
description: OK
/files/delete:
post:
tags:
- files
summary: Delete files
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
file_ids:
type: array
items:
type: integer
required:
- file_ids
responses:
200:
description: OK
/files/upload:
post:
tags:
- files
summary: Upload file
description: If the uploaded file is a torrent file, starts it as a transfer. This endpoint must be used with upload.put.io domain.
servers:
- url: https://upload.put.io/v2
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
description: Content of the file
filename:
type: string
description: Override file name
parent_id:
type: integer
description: Where to put file
required:
- file
responses:
200:
description: OK
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/File'
- $ref: '#/components/schemas/Transfer'
/files/{id}/url:
get:
tags:
- files
summary: Get download URL
description: The returned URL contains an authentication token that is only valid from the IP address that this request is made.
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
url:
type: string
format: uri
404:
description: File not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/files/extract:
get:
tags:
- files
summary: List active extractions
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
extractions:
type: array
items:
$ref: '#/components/schemas/Extraction'
post:
tags:
- files
summary: Extract ZIP and RAR archives
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
file_ids:
type: array
items:
type: integer
password:
type: string
required:
- file_ids
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
extractions:
type: array
items:
$ref: '#/components/schemas/Extraction'
/files/{id}/start-from:
post:
tags:
- files
summary: Set video position
parameters:
- name: id
in: path
description: File id
required: true
schema:
type: integer
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
time:
type: integer
description: Video position in seconds.
responses:
200:
description: OK
/files/{id}/start-from/delete:
post:
tags:
- files
summary: Delete video position
parameters:
- name: id
in: path
description: File id
required: true
schema:
type: integer
responses:
200:
description: OK
/files/search/{query}/page/{page}:
get:
tags:
- files
summary: Search your and your friends' files
deprecated: true
parameters:
- name: query
description: The keyword to search.
in: path
required: true
schema:
type: string
- name: page
description: Page number.
in: path
required: true
schema:
type: integer
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
files:
type: array
items:
$ref: '#/components/schemas/File'
next:
type: string
description: The URL for fetching next page of files.
/files/{id}:
get:
tags:
- files
summary: Get properties of file
deprecated: true
parameters:
- name: id
in: path
required: true
schema:
type: integer
- name: codecs
description: include codec info in response
in: query
schema:
type: boolean
- name: media_info
description: include media info in response
in: query
schema:
type: boolean
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
file:
$ref: '#/components/schemas/File'
404:
description: File not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/files/{id}/download:
get:
tags:
- files
summary: Download file
deprecated: true
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
302:
description: Redirected to storage server.
headers:
Location:
description: Location of the file.
schema:
type: string
format: uri
404:
description: File not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/config:
get:
tags:
- config
summary: Read config object
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Config'
put:
tags:
- config
summary: Write config object
description: Whole config object must be sent. The maximum size allowed for the whole config object should not exceed 16 megabytes.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Config'
responses:
200:
description: OK
/config/{key}:
parameters:
- name: key
in: path
required: true
schema:
type: string
get:
tags:
- config
summary: Get single config value
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ConfigValue'
put:
tags:
- config
summary: Set single config value
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConfigValue'
responses:
200:
description: OK
delete:
tags:
- config
summary: Delete single config value
responses:
200:
description: OK
/zips/create:
post:
tags:
- zips
summary: Create a ZIP link
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
file_ids:
type: array
items:
type: integer
required:
- file_ids
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
zip_id:
type: integer
/zips/list:
get:
tags:
- zips
summary: List active zipping jobs
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
zips:
type: array
items:
type: object
properties:
id:
type: integer
created_at:
type: string
format: date-time
/zips/{id}:
get:
tags:
- zips
summary: Get zipping job details
description: Gives detailed information about the give zip file id. Check the zip creation process status with your zip_id. When the process is done, you will get url value along with size and missing_files. You might need to poll this end point until you get an url value. missing_files is an array of file names which are not included into the zip file for some reason.
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
zip_status:
type: string
enum:
- NEW
- PROCESSING
- DONE
- ERROR
url:
type: string
format: uri
size:
type: integer
missing_files:
type: array
items:
type: object
properties:
id:
type: integer
name:
type: string
missing:
type: boolean
/rss/list:
get:
tags:
- rss
summary: List RSS feeds
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
feeds:
type: array
items:
$ref: '#/components/schemas/RssFeed'
/rss/{id}:
get:
tags:
- rss
summary: Get feed properties
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
feed:
$ref: '#/components/schemas/RssFeed'
post:
tags:
- rss
summary: Update RSS feed
description: Updates an RSS feed with the given parameters. The updated feed object is returned.
parameters:
- name: id
in: path
required: true
schema:
type: integer
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
title:
type: string
description: Title of the RSS feed as will appear on the site
rss_source_url:
description: The URL of the RSS feed to be watched
type: string
format: uri
parent_dir_id:
type: integer
description: The file ID of the folder to place the RSS feed files in
delete_old_files:
type: boolean
description: Should old files in the folder be deleted when space is low
default: false
dont_process_whole_feed:
type: boolean
description: Should the current items in the feed, at creation time, be ignored
default: false
keyword:
type: string
description: Only items with titles that contain any of these words will be transferred (comma-separated list of words)
default: null
unwanted_keywords:
type: string
description: No items with titles that contain any of these words will be transferred (comma-separated list of words)
default: null
paused:
type: boolean
description: Should the RSS feed be created in the paused state
default: false
required:
- url
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
feed:
$ref: '#/components/schemas/RssFeed'
/rss/create:
post:
tags:
- rss
summary: Create RSS feed
description: Creates an RSS feed with the given parameters. The created feed object is returned.
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
title:
type: string
description: Title of the RSS feed as will appear on the site
rss_source_url:
description: The URL of the RSS feed to be watched
type: string
format: uri
parent_dir_id:
type: integer
description: The file ID of the folder to place the RSS feed files in
delete_old_files:
type: boolean
description: Should old files in the folder be deleted when space is low
default: false
dont_process_whole_feed:
type: boolean
description: Should the current items in the feed, at creation time, be ignored
default: false
keyword:
type: string
description: Only items with titles that contain any of these words will be transferred (comma-separated list of words)
default: null
unwanted_keywords:
type: string
description: No items with titles that contain any of these words will be transferred (comma-separated list of words)
default: null
paused:
type: boolean
description: Should the RSS feed be created in the paused state
default: false
required:
- url
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
feed:
$ref: '#/components/schemas/RssFeed'
/rss/{id}/pause:
post:
tags:
- rss
summary: Pause feed
description: Pauses the RSS feed, so that it is not polled for new items anymore.
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
200:
description: OK
/rss/{id}/resume:
post:
tags:
- rss
summary: Resume feed
description: Resumes the RSS feed, so that it starts being polled for new items again.
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
200:
description: OK
/rss/{id}/delete:
post:
tags:
- rss
summary: Delete RSS feed
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
200:
description: OK
/friends/list:
get:
tags:
- friends
summary: List friends
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
friends:
type: array
items:
$ref: '#/components/schemas/Friend'
/friends/waiting-requests:
get:
tags:
- friends
summary: List incoming friend requests
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
friends:
type: array
items:
$ref: '#/components/schemas/Friend'
/friends/{username}/request:
post:
tags:
- friends
summary: Send friend request
parameters:
- name: username
in: path
required: true
schema:
type: string
responses:
200:
description: OK
/friends/{username}/approve:
post:
tags:
- friends
summary: Approves friend request
parameters:
- name: username
in: path
required: true
schema:
type: string
responses:
200:
description: OK
/friends/{username}/deny:
post:
tags:
- friends
summary: Deny friend request
parameters:
- name: username
in: path
required: true
schema:
type: string
responses:
200:
description: OK
/friends/{username}/unfriend:
post:
tags:
- friends
summary: Remove friend
description: Files shared with all friends will be automatically removed from old friend’s directory.
parameters:
- name: username
in: path
required: true
schema:
type: string
responses:
200:
description: OK
/oauth2/oob/code:
get:
tags:
- oob
summary: Get a new OOB authentioncation code
description: User must visit http://put.io/link and enter the code.
parameters:
- name: app_id
in: query
required: true
schema:
type: integer
- name: client_name
in: query
schema:
type: string
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
feed:
$ref: '#/components/schemas/OOBCode'
/oauth2/oob/code/{code}:
get:
tags:
- oob
summary: Check if the code is linked to the user's account
parameters:
- name: code
in: path
required: true
schema:
type: string
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
feed:
$ref: '#/components/schemas/OAuthToken'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment