3.0.0 • Published 5 years ago

@datafire/cpy_re_peertube v3.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@datafire/cpy_re_peertube

Client library for PeerTube

Installation and Usage

npm install --save @datafire/cpy_re_peertube
let cpy_re_peertube = require('@datafire/cpy_re_peertube').create({
  access_token: "",
  refresh_token: "",
  client_id: "",
  client_secret: "",
  redirect_uri: ""
});

.then(data => {
  console.log(data);
});

Description

Introduction

The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite HTTP/REST library for your programming language to use PeerTube. The spec API is fully compatible with openapi-generator which generates a client SDK in the language of your choice - we generate some client SDKs automatically:

See the Quick Start guide so you can play with the PeerTube API.

Authentication

When you sign up for an account, you are given the possibility to generate sessions, and authenticate using this session token. One session token can currently be used at a time.

Roles

Accounts are given permissions based on their role. There are three roles on PeerTube: Administrator, Moderator, and User. See the roles guide for a detail of their permissions.

Errors

The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format.

{
  "code": "unauthorized_request", // example inner error code
  "error": "Token is invalid." // example exposed error message
}

Actions

oauthCallback

Exchange the code passed to your redirect URI for an access_token

cpy_re_peertube.oauthCallback({
  "code": ""
}, context)

Input

  • input object
    • code required string

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

oauthRefresh

Exchange a refresh_token for an access_token

cpy_re_peertube.oauthRefresh(null, context)

Input

This action has no parameters

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

abuses.get

List abuses

cpy_re_peertube.abuses.get({}, context)

Input

  • input object
    • id integer: only list the report with this id
    • predefinedReason array: predefined reason the listed reports should contain
    • search string: plain search that will match with video titles, reporter names and more
    • state integer (values: 1, 2, 3): The abuse state (Pending = 1, Rejected = 2, Accepted = 3)
    • searchReporter string: only list reports of a specific reporter
    • searchReportee string: only list reports of a specific reportee
    • searchVideo string: only list reports of a specific video
    • searchVideoChannel string: only list reports of a specific video channel
    • videoIs string (values: deleted, blacklisted): only list blacklisted or deleted videos
    • filter string (values: video, comment, account): only list account, comment or video reports
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string (values: -id, -createdAt, -state): Sort abuses by criteria

Output

abuses.post

Report an abuse

cpy_re_peertube.abuses.post({
  "body": {
    "reason": ""
  }
}, context)

Input

  • input object
    • body required object
      • account object
        • id number: Account id to report
      • comment object
        • id number: Comment id to report
      • predefinedReasons PredefinedAbuseReasons
      • reason required string: Reason why the user reports this video
      • video object
        • endAt integer: Timestamp in the video that marks the ending of the report
        • id number: Video id to report
        • startAt integer: Timestamp in the video that marks the beginning of the report

Output

Output schema unknown

abuses.abuseId.delete

Delete an abuse

cpy_re_peertube.abuses.abuseId.delete({
  "abuseId": 0
}, context)

Input

  • input object
    • abuseId required integer: Abuse id

Output

Output schema unknown

abuses.abuseId.put

Update an abuse

cpy_re_peertube.abuses.abuseId.put({
  "abuseId": 0
}, context)

Input

  • input object
    • abuseId required integer: Abuse id
    • body object
      • moderationComment string: Update the report comment visible only to the moderation team
      • state AbuseStateSet

Output

Output schema unknown

abuses.abuseId.messages.get

List messages of an abuse

cpy_re_peertube.abuses.abuseId.messages.get({
  "abuseId": 0
}, context)

Input

  • input object
    • abuseId required integer: Abuse id

Output

abuses.abuseId.messages.post

Add message to an abuse

cpy_re_peertube.abuses.abuseId.messages.post({
  "abuseId": 0,
  "body": {
    "message": ""
  }
}, context)

Input

  • input object
    • abuseId required integer: Abuse id
    • body required object
      • message required string: Message to send

Output

Output schema unknown

abuses.abuseId.messages.abuseMessageId.delete

Delete an abuse message

cpy_re_peertube.abuses.abuseId.messages.abuseMessageId.delete({
  "abuseId": 0,
  "abuseMessageId": 0
}, context)

Input

  • input object
    • abuseId required integer: Abuse id
    • abuseMessageId required integer: Abuse message id

Output

Output schema unknown

accounts.get

List accounts

cpy_re_peertube.accounts.get({}, context)

Input

  • input object
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

accounts.name.get

Get an account

cpy_re_peertube.accounts.name.get({
  "name": ""
}, context)

Input

  • input object
    • name required string: The username or handle of the account

Output

accounts.name.ratings.get

List ratings of an account

cpy_re_peertube.accounts.name.ratings.get({
  "name": ""
}, context)

Input

  • input object
    • name required string: The username or handle of the account
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column
    • rating string (values: like, dislike): Optionally filter which ratings to retrieve

Output

accounts.name.video_channels.get

List video channels of an account

cpy_re_peertube.accounts.name.video_channels.get({
  "name": ""
}, context)

Input

  • input object
    • name required string: The username or handle of the account
    • withStats boolean: include view statistics for the last 30 days (only if authentified as the account user)
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

accounts.name.videos.get

List videos of an account

cpy_re_peertube.accounts.name.videos.get({
  "name": ""
}, context)

Input

  • input object
    • name required string: The username or handle of the account
    • nsfw string (values: true, false): whether to include nsfw videos, if any
    • filter string (values: local, all-local): Special filters which might require special rights:
    • skipCount string (values: true, false): if you don't need the total in the response
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string (values: name, -duration, -createdAt, -publishedAt, -views, -likes, -trending): Sort videos by criteria

Output

blocklist.accounts.get

List account blocks

cpy_re_peertube.blocklist.accounts.get({}, context)

Input

  • input object
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

Output schema unknown

blocklist.accounts.post

Block an account

cpy_re_peertube.blocklist.accounts.post({}, context)

Input

  • input object
    • body object
      • accountName required string: account to block, in the form username@domain

Output

Output schema unknown

blocklist.accounts.accountName.delete

Unblock an account by its handle

cpy_re_peertube.blocklist.accounts.accountName.delete({
  "accountName": ""
}, context)

Input

  • input object
    • accountName required string: account to unblock, in the form username@domain

Output

Output schema unknown

blocklist.servers.get

List server blocks

cpy_re_peertube.blocklist.servers.get({}, context)

Input

  • input object
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

Output schema unknown

blocklist.servers.post

Block a server

cpy_re_peertube.blocklist.servers.post({}, context)

Input

  • input object
    • body object
      • host required string: server domain to block

Output

Output schema unknown

blocklist.servers.host.delete

Unblock a server by its domain

cpy_re_peertube.blocklist.servers.host.delete({
  "host": ""
}, context)

Input

  • input object
    • host required string: server domain to unblock

Output

Output schema unknown

config.get

Get instance public configuration

cpy_re_peertube.config.get(null, context)

Input

This action has no parameters

Output

config.about.get

Get instance "About" information

cpy_re_peertube.config.about.get(null, context)

Input

This action has no parameters

Output

config.custom.delete

Delete instance runtime configuration

cpy_re_peertube.config.custom.delete(null, context)

Input

This action has no parameters

Output

Output schema unknown

config.custom.get

Get instance runtime configuration

cpy_re_peertube.config.custom.get(null, context)

Input

This action has no parameters

Output

config.custom.put

Set instance runtime configuration

cpy_re_peertube.config.custom.put(null, context)

Input

This action has no parameters

Output

Output schema unknown

feeds.video_comments.format.get

List comments on videos

cpy_re_peertube.feeds.video_comments.format.get({
  "format": ""
}, context)

Input

  • input object
    • format required string (values: xml, rss, rss2, atom, atom1, json, json1): format expected (we focus on making rss the most featureful ; it serves Media RSS)
    • videoId string: limit listing to a specific video
    • accountId string: limit listing to a specific account
    • accountName string: limit listing to a specific account
    • videoChannelId string: limit listing to a specific video channel
    • videoChannelName string: limit listing to a specific video channel

Output

  • output object

feeds.videos.format.get

List videos

cpy_re_peertube.feeds.videos.format.get({
  "format": ""
}, context)

Input

  • input object
    • format required string (values: xml, rss, rss2, atom, atom1, json, json1): format expected (we focus on making rss the most featureful ; it serves Media RSS)
    • accountId string: limit listing to a specific account
    • accountName string: limit listing to a specific account
    • videoChannelId string: limit listing to a specific video channel
    • videoChannelName string: limit listing to a specific video channel
    • sort string: Sort column
    • nsfw string (values: true, false): whether to include nsfw videos, if any
    • filter string (values: local, all-local): Special filters which might require special rights:

Output

  • output object

jobs.state.get

List instance jobs

cpy_re_peertube.jobs.state.get({
  "state": ""
}, context)

Input

  • input object
    • state required string (values: , active, completed, failed, waiting, delayed): The state of the job ('' for for no filter)
    • jobType string (values: activitypub-follow, activitypub-http-broadcast, activitypub-http-fetcher, activitypub-http-unicast, email, video-transcoding, video-file-import, video-import, videos-views, activitypub-refresher, video-redundancy, video-live-ending): job type
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

  • output object
    • data array
    • total integer

plugins.get

List plugins

cpy_re_peertube.plugins.get({}, context)

Input

  • input object
    • pluginType integer
    • uninstalled boolean
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

plugins.available.get

List available plugins

cpy_re_peertube.plugins.available.get({}, context)

Input

  • input object
    • search string
    • pluginType integer
    • currentPeerTubeEngine string
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

plugins.install.post

Install a plugin

cpy_re_peertube.plugins.install.post({}, context)

Input

  • input object

Output

Output schema unknown

plugins.uninstall.post

Uninstall a plugin

cpy_re_peertube.plugins.uninstall.post({}, context)

Input

  • input object
    • body object
      • npmName required string: name of the plugin/theme in its package.json

Output

Output schema unknown

plugins.update.post

Update a plugin

cpy_re_peertube.plugins.update.post({}, context)

Input

  • input object

Output

Output schema unknown

plugins.npmName.get

Get a plugin

cpy_re_peertube.plugins.npmName.get({
  "npmName": ""
}, context)

Input

  • input object
    • npmName required string: name of the plugin/theme on npmjs.com or in its package.json

Output

plugins.npmName.public_settings.get

Get a plugin's public settings

cpy_re_peertube.plugins.npmName.public_settings.get({
  "npmName": ""
}, context)

Input

  • input object
    • npmName required string: name of the plugin/theme on npmjs.com or in its package.json

Output

  • output object

plugins.npmName.registered_settings.get

Get a plugin's registered settings

cpy_re_peertube.plugins.npmName.registered_settings.get({
  "npmName": ""
}, context)

Input

  • input object
    • npmName required string: name of the plugin/theme on npmjs.com or in its package.json

Output

  • output object

plugins.npmName.settings.put

Set a plugin's settings

cpy_re_peertube.plugins.npmName.settings.put({
  "npmName": ""
}, context)

Input

  • input object
    • npmName required string: name of the plugin/theme on npmjs.com or in its package.json
    • body object
      • settings object

Output

Output schema unknown

redundancy.videos.get

List videos being mirrored

cpy_re_peertube.redundancy.videos.get({
  "target": ""
}, context)

Input

  • input object
    • target required string (values: my-videos, remote-videos): direction of the mirror
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string (values: name): Sort abuses by criteria

Output

redundancy.videos.post

Mirror a video

cpy_re_peertube.redundancy.videos.post({}, context)

Input

  • input object
    • body object
      • videoId required integer

Output

Output schema unknown

redundancy.videos.redundancyId.delete

Delete a mirror done on a video

cpy_re_peertube.redundancy.videos.redundancyId.delete({
  "redundancyId": ""
}, context)

Input

  • input object
    • redundancyId required string: id of an existing redundancy on a video

Output

Output schema unknown

redundancy.host.put

Update a server redundancy policy

cpy_re_peertube.redundancy.host.put({
  "host": ""
}, context)

Input

  • input object
    • host required string: server domain to mirror
    • body object
      • redundancyAllowed required boolean: allow mirroring of the host's local videos

Output

Output schema unknown

search.video_channels.get

Search channels

cpy_re_peertube.search.video_channels.get({
  "search": ""
}, context)

Input

  • input object
    • search required string: String to search. If the user can make a remote URI search, and the string is an URI then the PeerTube instance will fetch the remote object and add it to its database. Then, you can use the REST API to fetch the complete channel information and interact with it.
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • searchTarget string (values: local, search-index): If the administrator enabled search index support, you can override the default search target.
    • sort string: Sort column

Output

search.videos.get

Search videos

cpy_re_peertube.search.videos.get({
  "search": ""
}, context)

Input

  • input object
    • search required string: String to search. If the user can make a remote URI search, and the string is an URI then the PeerTube instance will fetch the remote object and add it to its database. Then, you can use the REST API to fetch the complete video information and interact with it.
    • nsfw string (values: true, false): whether to include nsfw videos, if any
    • filter string (values: local, all-local): Special filters which might require special rights:
    • skipCount string (values: true, false): if you don't need the total in the response
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • searchTarget string (values: local, search-index): If the administrator enabled search index support, you can override the default search target.
    • sort string (values: name, -duration, -createdAt, -publishedAt, -views, -likes, -match): Sort videos by criteria
    • startDate string: Get videos that are published after this date
    • endDate string: Get videos that are published before this date
    • originallyPublishedStartDate string: Get videos that are originally published after this date
    • originallyPublishedEndDate string: Get videos that are originally published before this date
    • durationMin integer: Get videos that have this minimum duration
    • durationMax integer: Get videos that have this maximum duration

Output

server.followers.get

List instance followers

cpy_re_peertube.server.followers.get({}, context)

Input

  • input object
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

server.following.get

List instances followed by the server

cpy_re_peertube.server.following.get({}, context)

Input

  • input object
    • state string (values: pending, accepted)
    • actorType string (values: Person, Application, Group, Service, Organization)
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

server.following.post

Follow a server

cpy_re_peertube.server.following.post({}, context)

Input

  • input object
    • body object
      • hosts array
        • items string

Output

Output schema unknown

server.following.host.delete

Unfollow a server

cpy_re_peertube.server.following.host.delete({
  "host": ""
}, context)

Input

  • input object
    • host required string: The host to unfollow

Output

Output schema unknown

users.get

List users

cpy_re_peertube.users.get({}, context)

Input

  • input object
    • search string: Plain text search that will match with user usernames or emails
    • blocked boolean: Filter results down to (un)banned users
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string (values: -id, -username, -createdAt): Sort users by criteria

Output

  • output array

users.post

Create a user

cpy_re_peertube.users.post({
  "body": null
}, context)

Input

Output

users.me.get

Get my user information

cpy_re_peertube.users.me.get(null, context)

Input

This action has no parameters

Output

  • output array

users.me.put

Update my user information

cpy_re_peertube.users.me.put({
  "body": null
}, context)

Input

Output

Output schema unknown

users.me.abuses.get

List my abuses

cpy_re_peertube.users.me.abuses.get({}, context)

Input

  • input object
    • id integer: only list the report with this id
    • state integer (values: 1, 2, 3): The abuse state (Pending = 1, Rejected = 2, Accepted = 3)
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string (values: -id, -createdAt, -state): Sort abuses by criteria

Output

users.me.avatar.pick.post

Update my user avatar

cpy_re_peertube.users.me.avatar.pick.post({}, context)

Input

  • input object
    • avatarfile string: The file to upload.

Output

users.me.history.videos.get

List watched videos history

cpy_re_peertube.users.me.history.videos.get({}, context)

Input

  • input object
    • start integer: Offset used to paginate results
    • count integer: Number of items to return

Output

users.me.history.videos.remove.post

Clear video history

cpy_re_peertube.users.me.history.videos.remove.post({}, context)

Input

  • input object
    • beforeDate string: history before this date will be deleted

Output

Output schema unknown

users.me.notification_settings.put

Update my notification settings

cpy_re_peertube.users.me.notification_settings.put({}, context)

Input

Output

Output schema unknown

users.me.notifications.get

List my notifications

cpy_re_peertube.users.me.notifications.get({}, context)

Input

  • input object
    • unread boolean: only list unread notifications
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

users.me.notifications.read.post

Mark notifications as read by their id

cpy_re_peertube.users.me.notifications.read.post({}, context)

Input

  • input object
    • body object
      • ids required array: ids of the notifications to mark as read
        • items integer

Output

Output schema unknown

users.me.notifications.read_all.post

Mark all my notification as read

cpy_re_peertube.users.me.notifications.read_all.post(null, context)

Input

This action has no parameters

Output

Output schema unknown

users.me.subscriptions.get

Get my user subscriptions

cpy_re_peertube.users.me.subscriptions.get({}, context)

Input

  • input object
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

Output schema unknown

users.me.subscriptions.post

Add subscription to my user

cpy_re_peertube.users.me.subscriptions.post({}, context)

Input

  • input object
    • body object
      • uri required string: uri of the video channels to subscribe to

Output

Output schema unknown

users.me.subscriptions.exist.get

Get if subscriptions exist for my user

cpy_re_peertube.users.me.subscriptions.exist.get({
  "uris": []
}, context)

Input

  • input object
    • uris required array: list of uris to check if each is part of the user subscriptions

Output

  • output object

users.me.subscriptions.videos.get

List videos of subscriptions of my user

cpy_re_peertube.users.me.subscriptions.videos.get({}, context)

Input

  • input object
    • nsfw string (values: true, false): whether to include nsfw videos, if any
    • filter string (values: local, all-local): Special filters which might require special rights:
    • skipCount string (values: true, false): if you don't need the total in the response
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string (values: name, -duration, -createdAt, -publishedAt, -views, -likes, -trending): Sort videos by criteria

Output

users.me.subscriptions.subscriptionHandle.delete

Delete subscription of my user

cpy_re_peertube.users.me.subscriptions.subscriptionHandle.delete({
  "subscriptionHandle": ""
}, context)

Input

  • input object
    • subscriptionHandle required string: The subscription handle

Output

Output schema unknown

users.me.subscriptions.subscriptionHandle.get

Get subscription of my user

cpy_re_peertube.users.me.subscriptions.subscriptionHandle.get({
  "subscriptionHandle": ""
}, context)

Input

  • input object
    • subscriptionHandle required string: The subscription handle

Output

users.me.video_playlists.videos_exist.get

Check video exists in my playlists

cpy_re_peertube.users.me.video_playlists.videos_exist.get({
  "videoIds": []
}, context)

Input

  • input object
    • videoIds required array: The video ids to check

Output

  • output object
    • videoId array
      • items object
        • playlistElementId integer
        • playlistId integer
        • startTimestamp integer
        • stopTimestamp integer

users.me.video_quota_used.get

Get my user used quota

cpy_re_peertube.users.me.video_quota_used.get(null, context)

Input

This action has no parameters

Output

  • output number

users.me.videos.get

Get videos of my user

cpy_re_peertube.users.me.videos.get({}, context)

Input

  • input object
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

users.me.videos.imports.get

Get video imports of my user

cpy_re_peertube.users.me.videos.imports.get({}, context)

Input

  • input object
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

users.me.videos.videoId.rating.get

Get rate of my user for a video

cpy_re_peertube.users.me.videos.videoId.rating.get({
  "videoId": ""
}, context)

Input

  • input object
    • videoId required string: The video id

Output

users.register.post

Register a user

cpy_re_peertube.users.register.post({
  "body": null
}, context)

Input

Output

Output schema unknown

delUserId

Delete a user

cpy_re_peertube.delUserId({
  "id": 0
}, context)

Input

  • input object
    • id required integer: The user id

Output

Output schema unknown

getUserId

Get a user

cpy_re_peertube.getUserId({
  "id": 0
}, context)

Input

  • input object
    • id required integer: The user id

Output

putUserId

Update a user

cpy_re_peertube.putUserId({
  "body": null,
  "id": 0
}, context)

Input

  • input object
    • body required UpdateUser
    • id required integer: The user id

Output

Output schema unknown

video_channels.get

List video channels

cpy_re_peertube.video_channels.get({}, context)

Input

  • input object
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

video_channels.post

Create a video channel

cpy_re_peertube.video_channels.post({}, context)

Input

Output

Output schema unknown

video_channels.channelHandle.delete

Delete a video channel

cpy_re_peertube.video_channels.channelHandle.delete({
  "channelHandle": ""
}, context)

Input

  • input object
    • channelHandle required string: The video channel handle

Output

Output schema unknown

video_channels.channelHandle.get

Get a video channel

cpy_re_peertube.video_channels.channelHandle.get({
  "channelHandle": ""
}, context)

Input

  • input object
    • channelHandle required string: The video channel handle

Output

video_channels.channelHandle.put

Update a video channel

cpy_re_peertube.video_channels.channelHandle.put({
  "channelHandle": ""
}, context)

Input

  • input object

Output

Output schema unknown

video_channels.channelHandle.videos.get

List videos of a video channel

cpy_re_peertube.video_channels.channelHandle.videos.get({
  "channelHandle": ""
}, context)

Input

  • input object
    • channelHandle required string: The video channel handle
    • nsfw string (values: true, false): whether to include nsfw videos, if any
    • filter string (values: local, all-local): Special filters which might require special rights:
    • skipCount string (values: true, false): if you don't need the total in the response
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string (values: name, -duration, -createdAt, -publishedAt, -views, -likes, -trending): Sort videos by criteria

Output

video_playlists.get

List video playlists

cpy_re_peertube.video_playlists.get({}, context)

Input

  • input object
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string: Sort column

Output

video_playlists.post

If the video playlist is set as public, the videoChannelId is mandatory.

cpy_re_peertube.video_playlists.post({
  "displayName": ""
}, context)

Input

  • input object
    • description string: Video playlist description
    • displayName required string: Video playlist display name
    • privacy integer (values: 1, 2, 3): The video playlist privacy (Public = 1, Unlisted = 2, Private = 3)
    • thumbnailfile string: Video playlist thumbnail file
    • videoChannelId integer: Video channel in which the playlist will be published

Output

  • output object
    • videoPlaylist object
      • id integer
      • uuid string

video_playlists.privacies.get

List available playlist privacies

cpy_re_peertube.video_playlists.privacies.get(null, context)

Input

This action has no parameters

Output

  • output array
    • items string

video_playlists.id.delete

Delete a video playlist

cpy_re_peertube.video_playlists.id.delete({
  "id": null
}, context)

Input

  • input object

Output

Output schema unknown

video_playlists.id.get

Get a video playlist

cpy_re_peertube.video_playlists.id.get({
  "id": null
}, context)

Input

  • input object

Output

video_playlists.id.put

If the video playlist is set as public, the playlist must have a assigned channel.

cpy_re_peertube.video_playlists.id.put({
  "id": null
}, context)

Input

  • input object
    • description string: Video playlist description
    • displayName string: Video playlist display name
    • privacy integer (values: 1, 2, 3): The video playlist privacy (Public = 1, Unlisted = 2, Private = 3)
    • thumbnailfile string: Video playlist thumbnail file
    • videoChannelId integer: Video channel in which the playlist will be published

Output

Output schema unknown

video_playlists.id.videos.get

List videos of a playlist

cpy_re_peertube.video_playlists.id.videos.get({
  "id": null
}, context)

Input

  • input object

Output

video_playlists.id.videos.post

Add a video in a playlist

cpy_re_peertube.video_playlists.id.videos.post({
  "id": null
}, context)

Input

  • input object
    • body object
      • startTimestamp integer: Start the video at this specific timestamp (in seconds)
      • stopTimestamp integer: Stop the video at this specific timestamp (in seconds)
      • videoId required integer: Video to add in the playlist

Output

  • output object
    • videoPlaylistElement object
      • id integer

video_playlists.id.videos.reorder.post

Reorder a playlist

cpy_re_peertube.video_playlists.id.videos.reorder.post({
  "id": null
}, context)

Input

  • input object
    • body object
      • insertAfterPosition required integer: New position for the block to reorder, to add the block before the first element
      • reorderLength integer: How many element from startPosition to reorder
      • startPosition required integer: Start position of the element to reorder

Output

Output schema unknown

video_playlists.id.videos.playlistElementId.delete

Delete an element from a playlist

cpy_re_peertube.video_playlists.id.videos.playlistElementId.delete({
  "id": null,
  "playlistElementId": 0
}, context)

Input

  • input object
    • playlistElementId required integer: Playlist element id

Output

Output schema unknown

video_playlists.id.videos.playlistElementId.put

Update a playlist element

cpy_re_peertube.video_playlists.id.videos.playlistElementId.put({
  "id": null,
  "playlistElementId": 0
}, context)

Input

  • input object
    • playlistElementId required integer: Playlist element id
    • body object
      • startTimestamp integer: Start the video at this specific timestamp (in seconds)
      • stopTimestamp integer: Stop the video at this specific timestamp (in seconds)

Output

Output schema unknown

videos.get

List videos

cpy_re_peertube.videos.get({}, context)

Input

  • input object
    • nsfw string (values: true, false): whether to include nsfw videos, if any
    • filter string (values: local, all-local): Special filters which might require special rights:
    • skipCount string (values: true, false): if you don't need the total in the response
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string (values: name, -duration, -createdAt, -publishedAt, -views, -likes, -trending): Sort videos by criteria

Output

videos.blacklist.get

List video blocks

cpy_re_peertube.videos.blacklist.get({}, context)

Input

  • input object
    • type integer (values: 1, 2): list only blocks that match this type:
    • search string: plain search that will match with video titles, and more
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string (values: -id, name, -duration, -views, -likes, -dislikes, -uuid, -createdAt): Sort blacklists by criteria

Output

videos.categories.get

List available video categories

cpy_re_peertube.videos.categories.get(null, context)

Input

This action has no parameters

Output

  • output array
    • items string

videos.imports.post

Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)

cpy_re_peertube.videos.imports.post({
  "channelId": 0,
  "name": ""
}, context)

Input

  • input object
    • category string: Video category
    • channelId required integer: Channel id that will contain this video
    • commentsEnabled boolean: Enable or disable comments for this video
    • description string: Video description
    • downloadEnabled boolean: Enable or disable downloading for this video
    • language string: Video language
    • licence string: Video licence
    • magnetUri string: Magnet URI
    • name required string: Video name
    • nsfw boolean: Whether or not this video contains sensitive content
    • previewfile string: Video preview file
    • privacy integer (values: 1, 2, 3, 4): The video privacy (Public = 1, Unlisted = 2, Private = 3, Internal = 4)
    • support string: A text tell the audience how to support the video creator
    • tags array: Video tags (maximum 5 tags each between 2 and 30 characters)
    • targetUrl string: HTTP target URL
    • thumbnailfile string: Video thumbnail file
    • torrentfile string: Torrent File
    • waitTranscoding boolean: Whether or not we wait transcoding before publish the video

Output

videos.languages.get

List available video languages

cpy_re_peertube.videos.languages.get(null, context)

Input

This action has no parameters

Output

  • output array
    • items string

videos.licences.get

List available video licences

cpy_re_peertube.videos.licences.get(null, context)

Input

This action has no parameters

Output

  • output array
    • items string

videos.live.post

Create a live

cpy_re_peertube.videos.live.post({
  "channelId": 0,
  "name": ""
}, context)

Input

  • input object
    • category string: Live video/replay category
    • channelId required integer: Channel id that will contain this live video
    • commentsEnabled boolean: Enable or disable comments for this live video/replay
    • description string: Live video/replay description
    • downloadEnabled boolean: Enable or disable downloading for the replay of this live
    • language string: Live video/replay language
    • licence string: Live video/replay licence
    • name required string: Live video/replay name
    • nsfw boolean: Whether or not this live video/replay contains sensitive content
    • permanentLive boolean: User can stream multiple times in a permanent live
    • previewfile string: Live video/replay preview file
    • privacy integer (values: 1, 2, 3, 4): The video privacy (Public = 1, Unlisted = 2, Private = 3, Internal = 4)
    • saveReplay boolean
    • support string: A text tell the audience how to support the creator
    • tags array: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
    • thumbnailfile string: Live video/replay thumbnail file

Output

videos.live.id.get

Get a live information

cpy_re_peertube.videos.live.id.get({
  "id": null
}, context)

Input

  • input object

Output

videos.live.id.put

Update a live information

cpy_re_peertube.videos.live.id.put({
  "id": null
}, context)

Input

Output

Output schema unknown

videos.ownership.get

List video ownership changes

cpy_re_peertube.videos.ownership.get(null, context)

Input

This action has no parameters

Output

Output schema unknown

videos.ownership.id.accept.post

Accept ownership change request

cpy_re_peertube.videos.ownership.id.accept.post({
  "id": null
}, context)

Input

  • input object

Output

Output schema unknown

videos.ownership.id.refuse.post

Refuse ownership change request

cpy_re_peertube.videos.ownership.id.refuse.post({
  "id": null
}, context)

Input

  • input object

Output

Output schema unknown

videos.privacies.get

List available video privacies

cpy_re_peertube.videos.privacies.get(null, context)

Input

This action has no parameters

Output

  • output array
    • items string

videos.upload.post

Upload a video

cpy_re_peertube.videos.upload.post({
  "channelId": 0,
  "name": "",
  "videofile": ""
}, context)

Input

  • input object
    • category integer: Video category
    • channelId required integer: Channel id that will contain this video
    • commentsEnabled boolean: Enable or disable comments for this video
    • description string: Video description
    • downloadEnabled boolean: Enable or disable downloading for this video
    • language integer: Video language
    • licence string: Video licence
    • name required string: Video name
    • nsfw boolean: Whether or not this video contains sensitive content
    • originallyPublishedAt string: Date when the content was originally published
    • previewfile string: Video preview file
    • privacy integer (values: 1, 2, 3, 4): The video privacy (Public = 1, Unlisted = 2, Private = 3, Internal = 4)
    • support string: A text tell the audience how to support the video creator
    • tags array: Video tags (maximum 5 tags each between 2 and 30 characters)
    • thumbnailfile string: Video thumbnail file
    • videofile required string: Video file
    • waitTranscoding boolean: Whether or not we wait transcoding before publish the video

Output

videos.id.delete

Delete a video

cpy_re_peertube.videos.id.delete({
  "id": null
}, context)

Input

  • input object

Output

Output schema unknown

videos.id.get

Get a video

cpy_re_peertube.videos.id.get({
  "id": null
}, context)

Input

  • input object

Output

videos.id.put

Update a video

cpy_re_peertube.videos.id.put({
  "id": null
}, context)

Input

  • input object
    • category integer: Video category
    • commentsEnabled boolean: Enable or disable comments for this video
    • description string: Video description
    • language string: Video language
    • licence integer: Video licence
    • name string: Video name
    • nsfw boolean: Whether or not this video contains sensitive content
    • originallyPublishedAt string: Date when the content was originally published
    • previewfile string: Video preview file
    • privacy integer (values: 1, 2, 3, 4): The video privacy (Public = 1, Unlisted = 2, Private = 3, Internal = 4)
    • support string: A text tell the audience how to support the video creator
    • tags array: Video tags (maximum 5 tags each between 2 and 30 characters)
    • thumbnailfile string: Video thumbnail file
    • waitTranscoding string: Whether or not we wait transcoding before publish the video

Output

Output schema unknown

videos.id.blacklist.delete

Unblock a video by its id

cpy_re_peertube.videos.id.blacklist.delete({
  "id": null
}, context)

Input

  • input object

Output

Output schema unknown

videos.id.blacklist.post

Block a video

cpy_re_peertube.videos.id.blacklist.post({
  "id": null
}, context)

Input

  • input object

Output

Output schema unknown

videos.id.captions.get

List captions of a video

cpy_re_peertube.videos.id.captions.get({
  "id": null
}, context)

Input

  • input object

Output

videos.id.captions.captionLanguage.delete

Delete a video caption

cpy_re_peertube.videos.id.captions.captionLanguage.delete({
  "id": null,
  "captionLanguage": ""
}, context)

Input

  • input object
    • captionLanguage required string: The caption language

Output

Output schema unknown

videos.id.captions.captionLanguage.put

Add or replace a video caption

cpy_re_peertube.videos.id.captions.captionLanguage.put({
  "id": null,
  "captionLanguage": ""
}, context)

Input

  • input object
    • captionLanguage required string: The caption language
    • captionfile string: The file to upload.

Output

Output schema unknown

videos.id.comment_threads.get

List threads of a video

cpy_re_peertube.videos.id.comment_threads.get({
  "id": null
}, context)

Input

  • input object
    • start integer: Offset used to paginate results
    • count integer: Number of items to return
    • sort string (values: -createdAt, -totalReplies): Sort comments by criteria

Output

videos.id.comment_threads.post

Create a thread

cpy_re_peertube.videos.id.comment_threads.post({
  "id": null
}, context)

Input

  • input object
    • body object
      • text required string: Text comment

Output

videos.id.comment_threads.threadId.get

Get a thread

cpy_re_peertube.videos.id.comment_threads.threadId.get({
  "id": null,
  "threadId": 0
}, context)

Input

  • input object
    • threadId required integer: The thread id (root comment id)

Output

videos.id.comments.commentId.delete

Delete a comment or a reply

cpy_re_peertube.videos.id.comments.commentId.delete({
  "id": null,
  "commentId": 0
}, context)

Input

  • input object
    • commentId required integer: The comment id

Output

Output schema unknown

videos.id.comments.commentId.post

Reply to a thread of a video

cpy_re_peertube.videos.id.comments.commentId.post({
  "id": null,
  "commentId": 0
}, context)

Input

  • input object
    • commentId required integer: The comment id
    • body object
      • text required string: Text comment

Output

videos.id.description.get

Get complete video description

cpy_re_peertube.videos.id.description.get({
  "id": null
}, context)

Input

  • input object

Output

  • output string

videos.id.give_ownership.post

Request ownership change

cpy_re_peertube.videos.id.give_ownership.post({
  "id": null,
  "username": ""
}, context)

Input

  • input object
    • username required string

Output

Output schema unknown

videos.id.rate.put

Like/dislike a video

cpy_re_peertube.videos.id.rate.put({
  "id": null
}, context)

Input

  • input object

Output

Output schema unknown

videos.id.views.post

Add a view to a video

cpy_re_peertube.videos.id.views.post({
  "id": null
}, context)

Input

  • input object

Output

Output schema unknown

videos.id.watching.put

Set watching progress of a video

cpy_re_peertube.videos.id.watching.put({
  "id": null,
  "body": null
}, context)

Input

Output

Output schema unknown

Definitions

Abuse

AbuseMessage

  • AbuseMessage object
    • account AccountSummary
    • byModerator boolean
    • createdAt string
    • id integer
    • message string

AbusePredefinedReasons

  • AbusePredefinedReasons array
    • items string (values: violentOrAbusive, hatefulOrAbusive, spamOrMisleading, privacy, rights, serverRules, thumbnails, captions)

AbuseStateConstant

AbuseStateSet

  • AbuseStateSet integer (values: 1, 2, 3): The abuse state (Pending = 1, Rejected = 2, Accepted = 3)

Account

  • Account
    • host string
    • avatar Avatar
    • createdAt string
    • followersCount integer
    • followingCount integer
    • id integer
    • name string
    • updatedAt string
    • url string
    • description string
    • displayName string
    • userId string

AccountSummary

  • AccountSummary object
    • host string
    • avatar
      • createdAt string
      • path string
      • updatedAt string
    • displayName string
    • id integer
    • name string
    • url string

Actor

  • Actor object
    • host string
    • avatar Avatar
    • createdAt string
    • followersCount integer
    • followingCount integer
    • id integer
    • name string
    • updatedAt string
    • url string

ActorInfo

  • ActorInfo object
    • host string
    • avatar object
      • path string
    • displayName string
    • id integer
    • name string

AddUser

  • AddUser object
    • email required string: The user email
    • password required string: The user password. If the smtp server is configured, you can leave empty and an email will be sent
    • role required UserRole
    • username required string: The user username
    • videoQuota required integer: The user video quota
    • videoQuotaDaily required integer: The user daily video quota

AddUserResponse

  • AddUserResponse object
    • user object
      • account object
        • id integer
      • id integer

Avatar

  • Avatar object
    • createdAt string
    • path string
    • updatedAt string

CommentThreadPostResponse

CommentThreadResponse

  • CommentThreadResponse object

FileRedundancyInformation

  • FileRedundancyInformation object
    • createdAt string
    • expiresOn string
    • fileUrl string
    • id integer
    • size integer
    • strategy string (values: manual, most-views, trending, recently-added)
    • updatedAt string

Follow

  • Follow object
    • createdAt string
    • follower Actor
    • following Actor
    • id integer
    • score number: score reflecting the reachability of the actor, with steps of 10 and a base score of 1000.
    • state string (values: pending, accepted)
    • updatedAt string

GetMeVideoRating

  • GetMeVideoRating object
    • id required string: Id of the video
    • rating required number: Rating of the video

Job

  • Job object
    • createdAt string
    • data object
    • error object
    • finishedOn string
    • id integer
    • processedOn string
    • state string (values: active, completed, failed, waiting, delayed)
    • type string (values: activitypub-http-unicast, activitypub-http-broadcast, activitypub-http-fetcher, activitypub-follow, video-file-import, video-transcoding, email, video-import, videos-views, activitypub-refresher, video-redundancy)

LiveVideoResponse

  • LiveVideoResponse object
    • permanentLive boolean: User can stream multiple times in a permanent live
    • rtmpUrl string
    • saveReplay boolean
    • streamKey string: RTMP stream key to use to stream into this live video

LiveVideoUpdate

  • LiveVideoUpdate object
    • permanentLive boolean: User can stream multiple times in a permanent live
    • saveReplay boolean

MRSSGroupContent

  • MRSSGroupContent object
    • duration integer
    • fileSize integer
    • framerate integer
    • height integer
    • lang string
    • type string
    • url string

MRSSPeerLink

  • MRSSPeerLink object
    • href string
    • type string (values: application/x-bittorrent)

NSFWPolicy

  • NSFWPolicy string (values: display, blur, do_not_list)

Notification

  • Notification object
    • account
      • host string
      • avatar object
        • path string
      • displayName string
      • id integer
      • name string
    • actorFollow object
      • follower ActorInfo
      • following object
        • host string
        • displayName string
        • name string
        • type string (values: account, channel, instance)
      • id integer
      • state string (values: pending, accepted)
    • comment object
    • createdAt string
    • id integer
    • read boolean
    • type integer: Notification type, following the UserNotificationType enum:
    • updatedAt string
    • video
      • id integer
      • name string
      • uuid string
      • channel ActorInfo
    • videoAbuse object
      • id integer
      • video
        • id integer
        • name string
        • uuid string
    • videoBlacklist object
      • id integer
      • video
        • id integer
        • name string
        • uuid string
    • videoImport object
      • id integer
      • magnetUri string
      • targetUri string
      • torrentName string
      • video VideoInfo

NotificationListResponse

  • NotificationListResponse object

NotificationSettingValue

  • NotificationSettingValue integer (values: 0, 1, 3): Notification type

PlaylistElement

  • PlaylistElement object
    • position integer
    • startTimestamp integer
    • stopTimestamp integer
    • video

Plugin

  • Plugin object
    • createdAt string
    • description string
    • enabled boolean
    • homepage string
    • latestVersion string
    • name string
    • peertubeEngine string
    • settings object
    • type integer (values: 1, 2): - 1: PLUGIN
    • uninstalled boolean
    • updatedAt string
    • version string

PluginResponse

  • PluginResponse object
    • data array
    • total integer

PredefinedAbuseReasons

  • PredefinedAbuseReasons array: Reason categories that help triage reports
    • items string (values: violentOrAbusive, hatefulOrAbusive, spamOrMisleading, privacy, rights, serverRules, thumbnails, captions)

RegisterUser

  • RegisterUser object
    • channel object
      • displayName string: The display name for the default channel
      • name string: The username for the default channel
    • displayName string: The user display name
    • email required string: The email of the user
    • password required string: The password of the user
    • username required string: The username of the user

ServerConfig

  • ServerConfig object
    • autoBlacklist object
      • videos object
        • ofUsers object
          • enabled boolean
    • avatar object
      • extensions array
        • items string
      • file object
        • size object
          • max integer
    • contactForm object
      • enabled boolean
    • email object
      • enabled boolean
    • followings object
      • instance object
        • autoFollowIndex object
          • indexUrl string
    • import object
      • videos object
        • http object
          • enabled boolean
        • torrent object
          • enabled boolean
    • instance object
      • customizations object
        • css string
        • javascript string
      • defaultClientRoute string
      • defaultNSFWPolicy string
      • isNSFW boolean
      • name string
      • shortDescription string
    • plugin object
      • registered array
        • items string
    • search object
      • remoteUri object
        • anonymous boolean
        • users boolean
    • serverCommit string
    • serverVersion string
    • signup object
      • allowed boolean
      • allowedForCurrentIP boolean
      • requiresEmailVerification boolean
    • theme object
      • registered array
        • items string
    • tracker object
      • enabled boolean
    • transcoding object
      • enabledResolutions array
        • items integer
      • hls object
        • enabled boolean
      • webtorrent object
        • enabled boolean
    • trending object
      • videos object
        • intervalDays integer
    • user object
      • videoQuota integer
      • videoQuotaDaily integer
    • video object
      • file object
        • extensions array
          • items string
      • image object
        • extensions array
          • items string
        • size object
          • max integer
    • videoCaption object
      • file object
        • extensions array
          • items string
        • size object
          • max integer

ServerConfigAbout

  • ServerConfigAbout object
    • instance object
      • description string
      • name string
      • shortDescription string
      • terms string

ServerConfigCustom

  • ServerConfigCustom object
    • admin object
      • email string
    • autoBlacklist object
      • videos object
        • ofUsers object
          • enabled boolean
    • cache object
      • captions object
        • size integer
      • previews object
        • size integer
    • contactForm object
      • enabled boolean
    • followers object
      • instance object
        • enabled boolean
        • manualApproval boolean
    • import object
      • videos object
        • http object
          • enabled boolean
        • torrent object
          • enabled boolean
    • instance object
      • customizations object
        • css string
        • javascript string
      • defaultClientRoute string
      • defaultNSFWPolicy string
      • description string
      • isNSFW boolean
      • name string
      • shortDescription string
      • terms string
    • services object
      • twitter object
        • username string
        • whitelisted boolean
    • signup object
      • enabled boolean
      • limit integer
      • requiresEmailVerification boolean
    • theme object
      • default string
    • transcoding object
      • allowAdditionalExtensions boolean
      • allowAudioFiles boolean
      • enabled boolean
      • hls object
        • enabled boolean
      • resolutions object
        • 1080p boolean
        • 2160p boolean
        • 240p boolean
        • 360p boolean
        • 480p boolean
        • 720p boolean
      • threads integer
    • user object
      • videoQuota integer
      • videoQuotaDaily integer

UpdateMe

  • UpdateMe object
    • autoPlayVideo required boolean: Your new autoPlayVideo
    • displayNSFW required string (values: true, false, both): Your new displayNSFW
    • email required string: Your new email
    • password required string: Your new password

UpdateUser

  • UpdateUser object
    • email required string: The updated email of the user
    • id required string: The user id
    • role required UserRole
    • videoQuota required integer: The updated video quota of the user
    • videoQuotaDaily required integer: The updated daily video quota of the user

User

  • User object
    • abusesAcceptedCount integer
    • abusesCount integer
    • abusesCreatedCount integer
    • account Account
    • autoPlayVideo boolean: Automatically start playing the video on the watch page
    • blocked boolean
    • blockedReason string
    • createdAt string
    • email string: The user email
    • emailVerified boolean: Has the user confirmed their email address?
    • id integer
    • noInstanceConfigWarningModal boolean
    • noWelcomeModal boolean
    • nsfwPolicy NSFWPolicy
    • role UserRole
    • roleLabel string (values: User, Moderator, Administrator)
    • theme string: Theme enabled by this user
    • username string: The user username
    • videoChannels array
    • videoCommentsCount integer
    • videoQuota integer: The user video quota
    • videoQuotaDaily integer: The user daily video quota
    • videosCount integer
    • webtorrentEnabled boolean: Enable P2P in the player

UserRole

  • UserRole integer (values: 0, 1, 2): The user role (Admin = 0, Moderator = 1, User = 2)

UserWatchingVideo

  • UserWatchingVideo object
    • currentTime integer: timestamp within the video, in seconds

Video