# README
Go API client for peertube_api_sdk_go
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 REST API quick start for a few examples of using the PeerTube API.
Authentication
When you sign up for an account on a PeerTube instance, you are given the possibility to generate sessions on it, and authenticate there using an access token. Only one access 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, completed by a RFC7807-compliant response body.
HTTP 1.1 404 Not Found
Content-Type: application/problem+json; charset=utf-8
{
\"detail\": \"Video not found\",
\"docs\": \"https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo\",
\"status\": 404,
\"title\": \"Not Found\",
\"type\": \"about:blank\"
}
We provide error type
(following RFC7807) and code
(internal PeerTube code) values for a growing number of cases,
but it is still optional. Types are used to disambiguate errors that bear the same status code
and are non-obvious:
HTTP 1.1 403 Forbidden
Content-Type: application/problem+json; charset=utf-8
{
\"detail\": \"Cannot get this video regarding follow constraints\",
\"docs\": \"https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo\",
\"status\": 403,
\"title\": \"Forbidden\",
\"type\": \"https://docs.joinpeertube.org/api-rest-reference.html#section/Errors/does_not_respect_follow_constraints\"
}
Here a 403 error could otherwise mean that the video is private or blocklisted.
Validation errors
Each parameter is evaluated on its own against a set of rules before the route validator proceeds with potential testing involving parameter combinations. Errors coming from validation errors appear earlier and benefit from a more detailed error description:
HTTP 1.1 400 Bad Request
Content-Type: application/problem+json; charset=utf-8
{
\"detail\": \"Incorrect request parameters: id\",
\"docs\": \"https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo\",
\"instance\": \"/api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180\",
\"invalid-params\": {
\"id\": {
\"location\": \"params\",
\"msg\": \"Invalid value\",
\"param\": \"id\",
\"value\": \"9c9de5e8-0a1e-484a-b099-e80766180\"
}
},
\"status\": 400,
\"title\": \"Bad Request\",
\"type\": \"about:blank\"
}
Where id
is the name of the field concerned by the error, within the route definition.
invalid-params.<field>.location
can be either 'params', 'body', 'header', 'query' or 'cookies', and
invalid-params.<field>.value
reports the value that didn't pass validation whose invalid-params.<field>.msg
is about.
Deprecated error fields
Some fields could be included with previous versions. They are still included but their use is deprecated:
error
: superseded bydetail
Rate limits
We are rate-limiting all endpoints of PeerTube's API. Custom values can be set by administrators:
Endpoint (prefix: /api/v1 ) | Calls | Time frame |
---|---|---|
/_* | 50 | 10 seconds |
POST /users/token | 15 | 5 minutes |
POST /users/register | 2* | 5 minutes |
POST /users/ask-send-verify-email | 3 | 5 minutes |
Depending on the endpoint, *failed requests are not taken into account. A service
limit is announced by a 429 Too Many Requests
status code.
You can get details about the current state of your rate limit by reading the following headers:
Header | Description |
---|---|
X-RateLimit-Limit | Number of max requests allowed in the current time period |
X-RateLimit-Remaining | Number of remaining requests in the current time period |
X-RateLimit-Reset | Timestamp of end of current time period as UNIX timestamp |
Retry-After | Seconds to delay after the first 429 is received |
CORS
This API features Cross-Origin Resource Sharing (CORS), allowing cross-domain communication from the browser for some routes:
| Endpoint |
|------------------------- ---|
| /api/_*
|
| /download/_*
|
| /lazy-static/_*
|
| /.well-known/webfinger
|
In addition, all routes serving ActivityPub are CORS-enabled for all origins.
Overview
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 7.0.0
- Package version: 1.0.0
- Generator version: 7.11.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://joinpeertube.org
Installation
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import peertube_api_sdk_go "github.com/GIT_USER_ID/GIT_REPO_ID/peertube_api_sdk_go"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Configuration of Server URL
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
Select Server Configuration
For using other server than the one defined on index 0 set context value peertube_api_sdk_go.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), peertube_api_sdk_go.ContextServerIndex, 1)
Templated Server URL
Templated server URL is formatted using default variables from configuration or from context value peertube_api_sdk_go.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), peertube_api_sdk_go.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using peertube_api_sdk_go.ContextOperationServerIndices
and peertube_api_sdk_go.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), peertube_api_sdk_go.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), peertube_api_sdk_go.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
Documentation for API Endpoints
All URIs are relative to https://peertube2.cpy.re
Class | Method | HTTP request | Description |
---|---|---|---|
AbusesAPI | ApiV1AbusesAbuseIdDelete | Delete /api/v1/abuses/{abuseId} | Delete an abuse |
AbusesAPI | ApiV1AbusesAbuseIdMessagesAbuseMessageIdDelete | Delete /api/v1/abuses/{abuseId}/messages/{abuseMessageId} | Delete an abuse message |
AbusesAPI | ApiV1AbusesAbuseIdMessagesGet | Get /api/v1/abuses/{abuseId}/messages | List messages of an abuse |
AbusesAPI | ApiV1AbusesAbuseIdMessagesPost | Post /api/v1/abuses/{abuseId}/messages | Add message to an abuse |
AbusesAPI | ApiV1AbusesAbuseIdPut | Put /api/v1/abuses/{abuseId} | Update an abuse |
AbusesAPI | ApiV1AbusesPost | Post /api/v1/abuses | Report an abuse |
AbusesAPI | GetAbuses | Get /api/v1/abuses | List abuses |
AbusesAPI | GetMyAbuses | Get /api/v1/users/me/abuses | List my abuses |
AccountBlocksAPI | ApiV1BlocklistStatusGet | Get /api/v1/blocklist/status | Get block status of accounts/hosts |
AccountBlocksAPI | ApiV1ServerBlocklistAccountsAccountNameDelete | Delete /api/v1/server/blocklist/accounts/{accountName} | Unblock an account by its handle |
AccountBlocksAPI | ApiV1ServerBlocklistAccountsGet | Get /api/v1/server/blocklist/accounts | List account blocks |
AccountBlocksAPI | ApiV1ServerBlocklistAccountsPost | Post /api/v1/server/blocklist/accounts | Block an account |
AccountsAPI | ApiV1AccountsNameRatingsGet | Get /api/v1/accounts/{name}/ratings | List ratings of an account |
AccountsAPI | ApiV1AccountsNameVideoChannelSyncsGet | Get /api/v1/accounts/{name}/video-channel-syncs | List the synchronizations of video channels of an account |
AccountsAPI | ApiV1AccountsNameVideoChannelsGet | Get /api/v1/accounts/{name}/video-channels | List video channels of an account |
AccountsAPI | ApiV1AccountsNameVideoPlaylistsGet | Get /api/v1/accounts/{name}/video-playlists | List playlists of an account |
AccountsAPI | GetAccount | Get /api/v1/accounts/{name} | Get an account |
AccountsAPI | GetAccountFollowers | Get /api/v1/accounts/{name}/followers | List followers of an account |
AccountsAPI | GetAccountVideos | Get /api/v1/accounts/{name}/videos | List videos of an account |
AccountsAPI | GetAccounts | Get /api/v1/accounts | List accounts |
AutomaticTagsAPI | ApiV1AutomaticTagsAccountsAccountNameAvailableGet | Get /api/v1/automatic-tags/accounts/{accountName}/available | Get account available auto tags |
AutomaticTagsAPI | ApiV1AutomaticTagsPoliciesAccountsAccountNameCommentsGet | Get /api/v1/automatic-tags/policies/accounts/{accountName}/comments | Get account auto tag policies on comments |
AutomaticTagsAPI | ApiV1AutomaticTagsPoliciesAccountsAccountNameCommentsPut | Put /api/v1/automatic-tags/policies/accounts/{accountName}/comments | Update account auto tag policies on comments |
AutomaticTagsAPI | ApiV1AutomaticTagsServerAvailableGet | Get /api/v1/automatic-tags/server/available | Get server available auto tags |
ChannelsSyncAPI | AddVideoChannelSync | Post /api/v1/video-channel-syncs | Create a synchronization for a video channel |
ChannelsSyncAPI | DelVideoChannelSync | Delete /api/v1/video-channel-syncs/{channelSyncId} | Delete a video channel synchronization |
ChannelsSyncAPI | TriggerVideoChannelSync | Post /api/v1/video-channel-syncs/{channelSyncId}/sync | Triggers the channel synchronization job, fetching all the videos from the remote channel |
ConfigAPI | ApiV1ConfigInstanceAvatarDelete | Delete /api/v1/config/instance-avatar | Delete instance avatar |
ConfigAPI | ApiV1ConfigInstanceAvatarPickPost | Post /api/v1/config/instance-avatar/pick | Update instance avatar |
ConfigAPI | ApiV1ConfigInstanceBannerDelete | Delete /api/v1/config/instance-banner | Delete instance banner |
ConfigAPI | ApiV1ConfigInstanceBannerPickPost | Post /api/v1/config/instance-banner/pick | Update instance banner |
ConfigAPI | DelCustomConfig | Delete /api/v1/config/custom | Delete instance runtime configuration |
ConfigAPI | GetAbout | Get /api/v1/config/about | Get instance "About" information |
ConfigAPI | GetConfig | Get /api/v1/config | Get instance public configuration |
ConfigAPI | GetCustomConfig | Get /api/v1/config/custom | Get instance runtime configuration |
ConfigAPI | PutCustomConfig | Put /api/v1/config/custom | Set instance runtime configuration |
HomepageAPI | ApiV1CustomPagesHomepageInstanceGet | Get /api/v1/custom-pages/homepage/instance | Get instance custom homepage |
HomepageAPI | ApiV1CustomPagesHomepageInstancePut | Put /api/v1/custom-pages/homepage/instance | Set instance custom homepage |
InstanceFollowsAPI | ApiV1ServerFollowersGet | Get /api/v1/server/followers | List instances following the server |
InstanceFollowsAPI | ApiV1ServerFollowersNameWithHostAcceptPost | Post /api/v1/server/followers/{nameWithHost}/accept | Accept a pending follower to your server |
InstanceFollowsAPI | ApiV1ServerFollowersNameWithHostDelete | Delete /api/v1/server/followers/{nameWithHost} | Remove or reject a follower to your server |
InstanceFollowsAPI | ApiV1ServerFollowersNameWithHostRejectPost | Post /api/v1/server/followers/{nameWithHost}/reject | Reject a pending follower to your server |
InstanceFollowsAPI | ApiV1ServerFollowingGet | Get /api/v1/server/following | List instances followed by the server |
InstanceFollowsAPI | ApiV1ServerFollowingHostOrHandleDelete | Delete /api/v1/server/following/{hostOrHandle} | Unfollow an actor (PeerTube instance, channel or account) |
InstanceFollowsAPI | ApiV1ServerFollowingPost | Post /api/v1/server/following | Follow a list of actors (PeerTube instance, channel or account) |
InstanceRedundancyAPI | ApiV1ServerRedundancyHostPut | Put /api/v1/server/redundancy/{host} | Update a server redundancy policy |
JobAPI | ApiV1JobsPausePost | Post /api/v1/jobs/pause | Pause job queue |
JobAPI | ApiV1JobsResumePost | Post /api/v1/jobs/resume | Resume job queue |
JobAPI | GetJobs | Get /api/v1/jobs/{state} | List instance jobs |
LiveVideosAPI | AddLive | Post /api/v1/videos/live | Create a live |
LiveVideosAPI | ApiV1VideosIdLiveSessionGet | Get /api/v1/videos/{id}/live-session | Get live session of a replay |
LiveVideosAPI | ApiV1VideosLiveIdSessionsGet | Get /api/v1/videos/live/{id}/sessions | List live sessions |
LiveVideosAPI | GetLiveId | Get /api/v1/videos/live/{id} | Get information about a live |
LiveVideosAPI | UpdateLiveId | Put /api/v1/videos/live/{id} | Update information about a live |
LogsAPI | GetInstanceAuditLogs | Get /api/v1/server/audit-logs | Get instance audit logs |
LogsAPI | GetInstanceLogs | Get /api/v1/server/logs | Get instance logs |
LogsAPI | SendClientLog | Post /api/v1/server/logs/client | Send client log |
MyHistoryAPI | ApiV1UsersMeHistoryVideosGet | Get /api/v1/users/me/history/videos | List watched videos history |
MyHistoryAPI | ApiV1UsersMeHistoryVideosRemovePost | Post /api/v1/users/me/history/videos/remove | Clear video history |
MyHistoryAPI | ApiV1UsersMeHistoryVideosVideoIdDelete | Delete /api/v1/users/me/history/videos/{videoId} | Delete history element |
MyNotificationsAPI | ApiV1UsersMeNotificationSettingsPut | Put /api/v1/users/me/notification-settings | Update my notification settings |
MyNotificationsAPI | ApiV1UsersMeNotificationsGet | Get /api/v1/users/me/notifications | List my notifications |
MyNotificationsAPI | ApiV1UsersMeNotificationsReadAllPost | Post /api/v1/users/me/notifications/read-all | Mark all my notification as read |
MyNotificationsAPI | ApiV1UsersMeNotificationsReadPost | Post /api/v1/users/me/notifications/read | Mark notifications as read by their id |
MySubscriptionsAPI | ApiV1UsersMeSubscriptionsExistGet | Get /api/v1/users/me/subscriptions/exist | Get if subscriptions exist for my user |
MySubscriptionsAPI | ApiV1UsersMeSubscriptionsGet | Get /api/v1/users/me/subscriptions | Get my user subscriptions |
MySubscriptionsAPI | ApiV1UsersMeSubscriptionsPost | Post /api/v1/users/me/subscriptions | Add subscription to my user |
MySubscriptionsAPI | ApiV1UsersMeSubscriptionsSubscriptionHandleDelete | Delete /api/v1/users/me/subscriptions/{subscriptionHandle} | Delete subscription of my user |
MySubscriptionsAPI | ApiV1UsersMeSubscriptionsSubscriptionHandleGet | Get /api/v1/users/me/subscriptions/{subscriptionHandle} | Get subscription of my user |
MySubscriptionsAPI | ApiV1UsersMeSubscriptionsVideosGet | Get /api/v1/users/me/subscriptions/videos | List videos of subscriptions of my user |
MyUserAPI | ApiV1UsersMeAvatarDelete | Delete /api/v1/users/me/avatar | Delete my avatar |
MyUserAPI | ApiV1UsersMeAvatarPickPost | Post /api/v1/users/me/avatar/pick | Update my user avatar |
MyUserAPI | ApiV1UsersMeVideoQuotaUsedGet | Get /api/v1/users/me/video-quota-used | Get my user used quota |
MyUserAPI | ApiV1UsersMeVideosGet | Get /api/v1/users/me/videos | List videos of my user |
MyUserAPI | ApiV1UsersMeVideosImportsGet | Get /api/v1/users/me/videos/imports | Get video imports of my user |
MyUserAPI | ApiV1UsersMeVideosVideoIdRatingGet | Get /api/v1/users/me/videos/{videoId}/rating | Get rate of my user for a video |
MyUserAPI | GetUserInfo | Get /api/v1/users/me | Get my user information |
MyUserAPI | PutUserInfo | Put /api/v1/users/me | Update my user information |
OverviewVideosAPI | GetOverviewVideos | Get /api/v1/overviews/videos | Get overview of videos |
PluginsAPI | AddPlugin | Post /api/v1/plugins/install | Install a plugin |
PluginsAPI | ApiV1PluginsNpmNamePublicSettingsGet | Get /api/v1/plugins/{npmName}/public-settings | Get a plugin's public settings |
PluginsAPI | ApiV1PluginsNpmNameRegisteredSettingsGet | Get /api/v1/plugins/{npmName}/registered-settings | Get a plugin's registered settings |
PluginsAPI | ApiV1PluginsNpmNameSettingsPut | Put /api/v1/plugins/{npmName}/settings | Set a plugin's settings |
PluginsAPI | GetAvailablePlugins | Get /api/v1/plugins/available | List available plugins |
PluginsAPI | GetPlugin | Get /api/v1/plugins/{npmName} | Get a plugin |
PluginsAPI | GetPlugins | Get /api/v1/plugins | List plugins |
PluginsAPI | UninstallPlugin | Post /api/v1/plugins/uninstall | Uninstall a plugin |
PluginsAPI | UpdatePlugin | Post /api/v1/plugins/update | Update a plugin |
RegisterAPI | AcceptRegistration | Post /api/v1/users/registrations/{registrationId}/accept | Accept registration |
RegisterAPI | DeleteRegistration | Delete /api/v1/users/registrations/{registrationId} | Delete registration |
RegisterAPI | ListRegistrations | Get /api/v1/users/registrations | List registrations |
RegisterAPI | RegisterUser | Post /api/v1/users/register | Register a user |
RegisterAPI | RejectRegistration | Post /api/v1/users/registrations/{registrationId}/reject | Reject registration |
RegisterAPI | RequestRegistration | Post /api/v1/users/registrations/request | Request registration |
RegisterAPI | ResendEmailToVerifyRegistration | Post /api/v1/users/registrations/ask-send-verify-email | Resend verification link to registration email |
RegisterAPI | VerifyRegistrationEmail | Post /api/v1/users/registrations/{registrationId}/verify-email | Verify a registration email |
RunnerJobsAPI | ApiV1RunnersJobsGet | Get /api/v1/runners/jobs | List jobs |
RunnerJobsAPI | ApiV1RunnersJobsJobUUIDAbortPost | Post /api/v1/runners/jobs/{jobUUID}/abort | Abort job |
RunnerJobsAPI | ApiV1RunnersJobsJobUUIDAcceptPost | Post /api/v1/runners/jobs/{jobUUID}/accept | Accept job |
RunnerJobsAPI | ApiV1RunnersJobsJobUUIDCancelGet | Get /api/v1/runners/jobs/{jobUUID}/cancel | Cancel a job |
RunnerJobsAPI | ApiV1RunnersJobsJobUUIDDelete | Delete /api/v1/runners/jobs/{jobUUID} | Delete a job |
RunnerJobsAPI | ApiV1RunnersJobsJobUUIDErrorPost | Post /api/v1/runners/jobs/{jobUUID}/error | Post job error |
RunnerJobsAPI | ApiV1RunnersJobsJobUUIDSuccessPost | Post /api/v1/runners/jobs/{jobUUID}/success | Post job success |
RunnerJobsAPI | ApiV1RunnersJobsJobUUIDUpdatePost | Post /api/v1/runners/jobs/{jobUUID}/update | Update job |
RunnerJobsAPI | ApiV1RunnersJobsRequestPost | Post /api/v1/runners/jobs/request | Request a new job |
RunnerRegistrationTokenAPI | ApiV1RunnersRegistrationTokensGeneratePost | Post /api/v1/runners/registration-tokens/generate | Generate registration token |
RunnerRegistrationTokenAPI | ApiV1RunnersRegistrationTokensGet | Get /api/v1/runners/registration-tokens | List registration tokens |
RunnerRegistrationTokenAPI | ApiV1RunnersRegistrationTokensRegistrationTokenIdDelete | Delete /api/v1/runners/registration-tokens/{registrationTokenId} | Remove registration token |
RunnersAPI | ApiV1RunnersGet | Get /api/v1/runners | List runners |
RunnersAPI | ApiV1RunnersRegisterPost | Post /api/v1/runners/register | Register a new runner |
RunnersAPI | ApiV1RunnersRunnerIdDelete | Delete /api/v1/runners/{runnerId} | Delete a runner |
RunnersAPI | ApiV1RunnersUnregisterPost | Post /api/v1/runners/unregister | Unregister a runner |
SearchAPI | SearchChannels | Get /api/v1/search/video-channels | Search channels |
SearchAPI | SearchPlaylists | Get /api/v1/search/video-playlists | Search playlists |
SearchAPI | SearchVideos | Get /api/v1/search/videos | Search videos |
ServerBlocksAPI | ApiV1ServerBlocklistServersGet | Get /api/v1/server/blocklist/servers | List server blocks |
ServerBlocksAPI | ApiV1ServerBlocklistServersHostDelete | Delete /api/v1/server/blocklist/servers/{host} | Unblock a server by its domain |
ServerBlocksAPI | ApiV1ServerBlocklistServersPost | Post /api/v1/server/blocklist/servers | Block a server |
SessionAPI | GetOAuthClient | Get /api/v1/oauth-clients/local | Login prerequisite |
SessionAPI | GetOAuthToken | Post /api/v1/users/token | Login |
SessionAPI | RevokeOAuthToken | Post /api/v1/users/revoke-token | Logout |
StaticVideoFilesAPI | StaticStreamingPlaylistsHlsFilenameGet | Get /static/streaming-playlists/hls/{filename} | Get public HLS video file |
StaticVideoFilesAPI | StaticStreamingPlaylistsHlsPrivateFilenameGet | Get /static/streaming-playlists/hls/private/{filename} | Get private HLS video file |
StaticVideoFilesAPI | StaticWebVideosFilenameGet | Get /static/web-videos/{filename} | Get public Web Video file |
StaticVideoFilesAPI | StaticWebVideosPrivateFilenameGet | Get /static/web-videos/private/{filename} | Get private Web Video file |
StatsAPI | ApiV1MetricsPlaybackPost | Post /api/v1/metrics/playback | Create playback metrics |
StatsAPI | GetInstanceStats | Get /api/v1/server/stats | Get instance stats |
UserExportsAPI | DeleteUserExport | Delete /api/v1/users/{userId}/exports/{id} | Delete a user export |
UserExportsAPI | ListUserExports | Get /api/v1/users/{userId}/exports | List user exports |
UserExportsAPI | RequestUserExport | Post /api/v1/users/{userId}/exports/request | Request user export |
UserImportsAPI | GetLatestUserImport | Get /api/v1/users/{userId}/imports/latest | Get latest user import |
UsersAPI | AddUser | Post /api/v1/users | Create a user |
UsersAPI | ConfirmTwoFactorRequest | Post /api/v1/users/{id}/two-factor/confirm-request | Confirm two factor auth |
UsersAPI | DelUser | Delete /api/v1/users/{id} | Delete a user |
UsersAPI | DisableTwoFactor | Post /api/v1/users/{id}/two-factor/disable | Disable two factor auth |
UsersAPI | GetUser | Get /api/v1/users/{id} | Get a user |
UsersAPI | GetUsers | Get /api/v1/users | List users |
UsersAPI | PutUser | Put /api/v1/users/{id} | Update a user |
UsersAPI | RequestTwoFactor | Post /api/v1/users/{id}/two-factor/request | Request two factor auth |
UsersAPI | ResendEmailToVerifyUser | Post /api/v1/users/ask-send-verify-email | Resend user verification link |
UsersAPI | VerifyUser | Post /api/v1/users/{id}/verify-email | Verify a user |
VideoAPI | AddView | Post /api/v1/videos/{id}/views | Notify user is watching a video |
VideoAPI | ApiV1VideosIdStudioEditPost | Post /api/v1/videos/{id}/studio/edit | Create a studio task |
VideoAPI | ApiV1VideosIdWatchingPut | Put /api/v1/videos/{id}/watching | Set watching progress of a video |
VideoAPI | DelVideo | Delete /api/v1/videos/{id} | Delete a video |
VideoAPI | DeleteVideoSourceFile | Delete /api/v1/videos/{id}/source/file | Delete video source file |
VideoAPI | GetCategories | Get /api/v1/videos/categories | List available video categories |
VideoAPI | GetLanguages | Get /api/v1/videos/languages | List available video languages |
VideoAPI | GetLicences | Get /api/v1/videos/licences | List available video licences |
VideoAPI | GetVideo | Get /api/v1/videos/{id} | Get a video |
VideoAPI | GetVideoDesc | Get /api/v1/videos/{id}/description | Get complete video description |
VideoAPI | GetVideoPrivacyPolicies | Get /api/v1/videos/privacies | List available video privacy policies |
VideoAPI | GetVideoSource | Get /api/v1/videos/{id}/source | Get video source file metadata |
VideoAPI | GetVideos | Get /api/v1/videos | List videos |
VideoAPI | ListVideoStoryboards | Get /api/v1/videos/{id}/storyboards | List storyboards of a video |
VideoAPI | PutVideo | Put /api/v1/videos/{id} | Update a video |
VideoAPI | RequestVideoToken | Post /api/v1/videos/{id}/token | Request video token |
VideoAPI | UploadLegacy | Post /api/v1/videos/upload | Upload a video |
VideoAPI | UploadResumable | Put /api/v1/videos/upload-resumable | Send chunk for the resumable upload of a video |
VideoAPI | UploadResumableCancel | Delete /api/v1/videos/upload-resumable | Cancel the resumable upload of a video, deleting any data uploaded so far |
VideoAPI | UploadResumableInit | Post /api/v1/videos/upload-resumable | Initialize the resumable upload of a video |
VideoBlocksAPI | AddVideoBlock | Post /api/v1/videos/{id}/blacklist | Block a video |
VideoBlocksAPI | DelVideoBlock | Delete /api/v1/videos/{id}/blacklist | Unblock a video by its id |
VideoBlocksAPI | GetVideoBlocks | Get /api/v1/videos/blacklist | List video blocks |
VideoCaptionsAPI | AddVideoCaption | Put /api/v1/videos/{id}/captions/{captionLanguage} | Add or replace a video caption |
VideoCaptionsAPI | DelVideoCaption | Delete /api/v1/videos/{id}/captions/{captionLanguage} | Delete a video caption |
VideoCaptionsAPI | GenerateVideoCaption | Post /api/v1/videos/{id}/captions/generate | Generate a video caption |
VideoCaptionsAPI | GetVideoCaptions | Get /api/v1/videos/{id}/captions | List captions of a video |
VideoChannelsAPI | AddVideoChannel | Post /api/v1/video-channels | Create a video channel |
VideoChannelsAPI | ApiV1VideoChannelsChannelHandleAvatarDelete | Delete /api/v1/video-channels/{channelHandle}/avatar | Delete channel avatar |
VideoChannelsAPI | ApiV1VideoChannelsChannelHandleAvatarPickPost | Post /api/v1/video-channels/{channelHandle}/avatar/pick | Update channel avatar |
VideoChannelsAPI | ApiV1VideoChannelsChannelHandleBannerDelete | Delete /api/v1/video-channels/{channelHandle}/banner | Delete channel banner |
VideoChannelsAPI | ApiV1VideoChannelsChannelHandleBannerPickPost | Post /api/v1/video-channels/{channelHandle}/banner/pick | Update channel banner |
VideoChannelsAPI | ApiV1VideoChannelsChannelHandleImportVideosPost | Post /api/v1/video-channels/{channelHandle}/import-videos | Import videos in channel |
VideoChannelsAPI | ApiV1VideoChannelsChannelHandleVideoPlaylistsGet | Get /api/v1/video-channels/{channelHandle}/video-playlists | List playlists of a channel |
VideoChannelsAPI | DelVideoChannel | Delete /api/v1/video-channels/{channelHandle} | Delete a video channel |
VideoChannelsAPI | GetVideoChannel | Get /api/v1/video-channels/{channelHandle} | Get a video channel |
VideoChannelsAPI | GetVideoChannelFollowers | Get /api/v1/video-channels/{channelHandle}/followers | List followers of a video channel |
VideoChannelsAPI | GetVideoChannelVideos | Get /api/v1/video-channels/{channelHandle}/videos | List videos of a video channel |
VideoChannelsAPI | GetVideoChannels | Get /api/v1/video-channels | List video channels |
VideoChannelsAPI | PutVideoChannel | Put /api/v1/video-channels/{channelHandle} | Update a video channel |
VideoChaptersAPI | GetVideoChapters | Get /api/v1/videos/{id}/chapters | Get chapters of a video |
VideoChaptersAPI | ReplaceVideoChapters | Put /api/v1/videos/{id}/chapters | Replace video chapters |
VideoCommentsAPI | ApiV1UsersMeVideosCommentsGet | Get /api/v1/users/me/videos/comments | List comments on user's videos |
VideoCommentsAPI | ApiV1VideosCommentsGet | Get /api/v1/videos/comments | List instance comments |
VideoCommentsAPI | ApiV1VideosIdCommentThreadsGet | Get /api/v1/videos/{id}/comment-threads | List threads of a video |
VideoCommentsAPI | ApiV1VideosIdCommentThreadsPost | Post /api/v1/videos/{id}/comment-threads | Create a thread |
VideoCommentsAPI | ApiV1VideosIdCommentThreadsThreadIdGet | Get /api/v1/videos/{id}/comment-threads/{threadId} | Get a thread |
VideoCommentsAPI | ApiV1VideosIdCommentsCommentIdApprovePost | Post /api/v1/videos/{id}/comments/{commentId}/approve | Approve a comment |
VideoCommentsAPI | ApiV1VideosIdCommentsCommentIdDelete | Delete /api/v1/videos/{id}/comments/{commentId} | Delete a comment or a reply |
VideoCommentsAPI | ApiV1VideosIdCommentsCommentIdPost | Post /api/v1/videos/{id}/comments/{commentId} | Reply to a thread of a video |
VideoDownloadAPI | DownloadVideosGenerateVideoIdGet | Get /download/videos/generate/:videoId | Download video file |
VideoFeedsAPI | GetSyndicatedComments | Get /feeds/video-comments.{format} | Comments on videos feeds |
VideoFeedsAPI | GetSyndicatedSubscriptionVideos | Get /feeds/subscriptions.{format} | Videos of subscriptions feeds |
VideoFeedsAPI | GetSyndicatedVideos | Get /feeds/videos.{format} | Common videos feeds |
VideoFeedsAPI | GetVideosPodcastFeed | Get /feeds/podcast/videos.xml | Videos podcast feed |
VideoFilesAPI | DelVideoHLS | Delete /api/v1/videos/{id}/hls | Delete video HLS files |
VideoFilesAPI | DelVideoWebVideos | Delete /api/v1/videos/{id}/web-videos | Delete video Web Video files |
VideoImportsAPI | ApiV1VideosImportsIdCancelPost | Post /api/v1/videos/imports/{id}/cancel | Cancel video import |
VideoImportsAPI | ApiV1VideosImportsIdDelete | Delete /api/v1/videos/imports/{id} | Delete video import |
VideoImportsAPI | ImportVideo | Post /api/v1/videos/imports | Import a video |
VideoMirroringAPI | DelMirroredVideo | Delete /api/v1/server/redundancy/videos/{redundancyId} | Delete a mirror done on a video |
VideoMirroringAPI | GetMirroredVideos | Get /api/v1/server/redundancy/videos | List videos being mirrored |
VideoMirroringAPI | PutMirroredVideo | Post /api/v1/server/redundancy/videos | Mirror a video |
VideoOwnershipChangeAPI | ApiV1VideosIdGiveOwnershipPost | Post /api/v1/videos/{id}/give-ownership | Request ownership change |
VideoOwnershipChangeAPI | ApiV1VideosOwnershipGet | Get /api/v1/videos/ownership | List video ownership changes |
VideoOwnershipChangeAPI | ApiV1VideosOwnershipIdAcceptPost | Post /api/v1/videos/ownership/{id}/accept | Accept ownership change request |
VideoOwnershipChangeAPI | ApiV1VideosOwnershipIdRefusePost | Post /api/v1/videos/ownership/{id}/refuse | Refuse ownership change request |
VideoPasswordsAPI | ApiV1VideosIdPasswordsGet | Get /api/v1/videos/{id}/passwords | List video passwords |
VideoPasswordsAPI | ApiV1VideosIdPasswordsPut | Put /api/v1/videos/{id}/passwords | Update video passwords |
VideoPasswordsAPI | ApiV1VideosIdPasswordsVideoPasswordIdDelete | Delete /api/v1/videos/{id}/passwords/{videoPasswordId} | Delete a video password |
VideoPlaylistsAPI | AddPlaylist | Post /api/v1/video-playlists | Create a video playlist |
VideoPlaylistsAPI | AddVideoPlaylistVideo | Post /api/v1/video-playlists/{playlistId}/videos | Add a video in a playlist |
VideoPlaylistsAPI | ApiV1UsersMeVideoPlaylistsVideosExistGet | Get /api/v1/users/me/video-playlists/videos-exist | Check video exists in my playlists |
VideoPlaylistsAPI | ApiV1VideoPlaylistsPlaylistIdDelete | Delete /api/v1/video-playlists/{playlistId} | Delete a video playlist |
VideoPlaylistsAPI | ApiV1VideoPlaylistsPlaylistIdGet | Get /api/v1/video-playlists/{playlistId} | Get a video playlist |
VideoPlaylistsAPI | ApiV1VideoPlaylistsPlaylistIdPut | Put /api/v1/video-playlists/{playlistId} | Update a video playlist |
VideoPlaylistsAPI | DelVideoPlaylistVideo | Delete /api/v1/video-playlists/{playlistId}/videos/{playlistElementId} | Delete an element from a playlist |
VideoPlaylistsAPI | GetPlaylistPrivacyPolicies | Get /api/v1/video-playlists/privacies | List available playlist privacy policies |
VideoPlaylistsAPI | GetPlaylists | Get /api/v1/video-playlists | List video playlists |
VideoPlaylistsAPI | GetVideoPlaylistVideos | Get /api/v1/video-playlists/{playlistId}/videos | List videos of a playlist |
VideoPlaylistsAPI | PutVideoPlaylistVideo | Put /api/v1/video-playlists/{playlistId}/videos/{playlistElementId} | Update a playlist element |
VideoPlaylistsAPI | ReorderVideoPlaylist | Post /api/v1/video-playlists/{playlistId}/videos/reorder | Reorder a playlist |
VideoRatesAPI | ApiV1VideosIdRatePut | Put /api/v1/videos/{id}/rate | Like/dislike a video |
VideoStatsAPI | ApiV1VideosIdStatsOverallGet | Get /api/v1/videos/{id}/stats/overall | Get overall stats of a video |
VideoStatsAPI | ApiV1VideosIdStatsRetentionGet | Get /api/v1/videos/{id}/stats/retention | Get retention stats of a video |
VideoStatsAPI | ApiV1VideosIdStatsTimeseriesMetricGet | Get /api/v1/videos/{id}/stats/timeseries/{metric} | Get timeserie stats of a video |
VideoTranscodingAPI | CreateVideoTranscoding | Post /api/v1/videos/{id}/transcoding | Create a transcoding job |
WatchedWordsAPI | ApiV1WatchedWordsAccountsAccountNameListsGet | Get /api/v1/watched-words/accounts/{accountName}/lists | List account watched words |
WatchedWordsAPI | ApiV1WatchedWordsAccountsAccountNameListsListIdDelete | Delete /api/v1/watched-words/accounts/{accountName}/lists/{listId} | Delete account watched words |
WatchedWordsAPI | ApiV1WatchedWordsAccountsAccountNameListsListIdPut | Put /api/v1/watched-words/accounts/{accountName}/lists/{listId} | Update account watched words |
WatchedWordsAPI | ApiV1WatchedWordsAccountsAccountNameListsPost | Post /api/v1/watched-words/accounts/{accountName}/lists | Add account watched words |
WatchedWordsAPI | ApiV1WatchedWordsServerListsGet | Get /api/v1/watched-words/server/lists | List server watched words |
WatchedWordsAPI | ApiV1WatchedWordsServerListsListIdDelete | Delete /api/v1/watched-words/server/lists/{listId} | Delete server watched words |
WatchedWordsAPI | ApiV1WatchedWordsServerListsListIdPut | Put /api/v1/watched-words/server/lists/{listId} | Update server watched words |
WatchedWordsAPI | ApiV1WatchedWordsServerListsPost | Post /api/v1/watched-words/server/lists | Add server watched words |
Documentation For Models
- Abuse
- AbuseMessage
- AbuseStateConstant
- AbuseStateSet
- Account
- AccountSummary
- Actor
- ActorImage
- ActorInfo
- AddIntroOptions
- AddPlaylist200Response
- AddPlaylist200ResponseVideoPlaylist
- AddPluginRequest
- AddPluginRequestOneOf
- AddPluginRequestOneOf1
- AddUser
- AddUserResponse
- AddUserResponseUser
- AddVideoChannel200Response
- AddVideoChannelSync200Response
- AddVideoPlaylistVideo200Response
- AddVideoPlaylistVideo200ResponseVideoPlaylistElement
- AddVideoPlaylistVideoRequest
- AddVideoPlaylistVideoRequestVideoId
- ApiV1AbusesAbuseIdMessagesGet200Response
- ApiV1AbusesAbuseIdMessagesPostRequest
- ApiV1AbusesAbuseIdPutRequest
- ApiV1AbusesPost200Response
- ApiV1AbusesPost200ResponseAbuse
- ApiV1AbusesPostRequest
- ApiV1AbusesPostRequestAccount
- ApiV1AbusesPostRequestComment
- ApiV1AbusesPostRequestVideo
- ApiV1AutomaticTagsPoliciesAccountsAccountNameCommentsPutRequest
- ApiV1CustomPagesHomepageInstancePutRequest
- ApiV1PluginsNpmNameSettingsPutRequest
- ApiV1RunnersGet200Response
- ApiV1RunnersJobsGet200Response
- ApiV1RunnersJobsJobUUIDAbortPostRequest
- ApiV1RunnersJobsJobUUIDAcceptPost200Response
- ApiV1RunnersJobsJobUUIDAcceptPost200ResponseJob
- ApiV1RunnersJobsJobUUIDErrorPostRequest
- ApiV1RunnersJobsJobUUIDSuccessPostRequest
- ApiV1RunnersJobsJobUUIDSuccessPostRequestPayload
- ApiV1RunnersJobsJobUUIDUpdatePostRequest
- ApiV1RunnersJobsJobUUIDUpdatePostRequestPayload
- ApiV1RunnersJobsRequestPost200Response
- ApiV1RunnersJobsRequestPost200ResponseAvailableJobsInner
- ApiV1RunnersJobsRequestPostRequest
- ApiV1RunnersRegisterPost200Response
- ApiV1RunnersRegisterPostRequest
- ApiV1RunnersRegistrationTokensGet200Response
- ApiV1RunnersUnregisterPostRequest
- ApiV1ServerBlocklistAccountsPostRequest
- ApiV1ServerBlocklistServersPostRequest
- ApiV1ServerFollowingPostRequest
- ApiV1ServerRedundancyHostPutRequest
- ApiV1UsersMeAvatarPickPost200Response
- ApiV1UsersMeNotificationSettingsPutRequest
- ApiV1UsersMeNotificationsReadPostRequest
- ApiV1UsersMeSubscriptionsPostRequest
- ApiV1UsersMeVideoPlaylistsVideosExistGet200Response
- ApiV1UsersMeVideoPlaylistsVideosExistGet200ResponseVideoIdInner
- ApiV1UsersMeVideoQuotaUsedGet200Response
- ApiV1UsersMeVideosCommentsGet200Response
- ApiV1VideoChannelsChannelHandleBannerPickPost200Response
- ApiV1VideoChannelsChannelHandleVideoPlaylistsGet200Response
- ApiV1VideosIdCommentThreadsPostRequest
- ApiV1VideosIdPasswordsPutRequest
- ApiV1VideosIdRatePutRequest
- ApiV1VideosLiveIdSessionsGet200Response
- ApiV1VideosOwnershipIdAcceptPostIdParameter
- ApiV1WatchedWordsAccountsAccountNameListsGet200Response
- ApiV1WatchedWordsAccountsAccountNameListsPost200Response
- ApiV1WatchedWordsAccountsAccountNameListsPostRequest
- AutomaticTagAvailable
- AutomaticTagAvailableAvailableInner
- BlockStatus
- BlockStatusAccountsValue
- BlockStatusHostsValue
- CategoryOverview
- ChannelOverview
- CommentAutoTagPolicies
- CommentThreadPostResponse
- CommentThreadResponse
- ConfirmTwoFactorRequestRequest
- CreateVideoTranscodingRequest
- CustomHomepage
- CutOptions
- FileRedundancyInformation
- FileStorage
- Follow
- GenerateVideoCaptionRequest
- GetAccountFollowers200Response
- GetAccountVideosCategoryOneOfParameter
- GetAccountVideosLanguageOneOfParameter
- GetAccountVideosLicenceOneOfParameter
- GetAccountVideosTagsAllOfParameter
- GetAccountVideosTagsOneOfParameter
- GetAccounts200Response
- GetJobs200Response
- GetLatestUserImport200Response
- GetLatestUserImport200ResponseState
- GetMeVideoRating
- GetMyAbuses200Response
- GetOAuthToken200Response
- GetUser200Response
- GetVideoBlocks200Response
- GetVideoCaptions200Response
- ImportVideosInChannelCreate
- Job
- ListRegistrations200Response
- ListUserExports200Response
- ListUserExports200ResponseState
- ListVideoStoryboards200Response
- LiveVideoLatencyMode
- LiveVideoReplaySettings
- LiveVideoResponse
- LiveVideoSessionResponse
- LiveVideoSessionResponseReplayVideo
- LiveVideoUpdate
- MRSSGroupContent
- MRSSPeerLink
- NSFWPolicy
- Notification
- NotificationActorFollow
- NotificationActorFollowFollowing
- NotificationComment
- NotificationListResponse
- NotificationVideo
- NotificationVideoAbuse
- NotificationVideoImport
- OAuthClient
- OverviewVideosResponse
- PlaybackMetricCreate
- PlaylistElement
- Plugin
- PluginResponse
- PutMirroredVideoRequest
- PutVideoPlaylistVideoRequest
- RegisterUser
- RegisterUserChannel
- ReorderVideoPlaylistRequest
- ReplaceVideoChaptersRequest
- ReplaceVideoChaptersRequestChaptersInner
- RequestTwoFactorRequest
- RequestTwoFactorResponse
- RequestTwoFactorResponseOtpRequest
- RequestUserExport200Response
- RequestUserExport200ResponseExport
- RequestUserExportRequest
- ResendEmailToVerifyRegistrationRequest
- ResendEmailToVerifyUserRequest
- Runner
- RunnerJob
- RunnerJobAdmin
- RunnerJobParent
- RunnerJobPayload
- RunnerJobRunner
- RunnerJobState
- RunnerJobStateConstant
- RunnerJobType
- RunnerRegistrationToken
- SendClientLog
- ServerConfig
- ServerConfigAbout
- ServerConfigAboutInstance
- ServerConfigAutoBlacklist
- ServerConfigAutoBlacklistVideos
- ServerConfigAvatar
- ServerConfigAvatarFile
- ServerConfigAvatarFileSize
- ServerConfigCustom
- ServerConfigCustomAdmin
- ServerConfigCustomCache
- ServerConfigCustomCachePreviews
- ServerConfigCustomFollowers
- ServerConfigCustomFollowersInstance
- ServerConfigCustomImport
- ServerConfigCustomInstance
- ServerConfigCustomServices
- ServerConfigCustomServicesTwitter
- ServerConfigCustomSignup
- ServerConfigCustomTheme
- ServerConfigCustomTranscoding
- ServerConfigCustomTranscodingHls
- ServerConfigCustomTranscodingOriginalFile
- ServerConfigCustomTranscodingResolutions
- ServerConfigCustomTranscodingWebVideos
- ServerConfigCustomUser
- ServerConfigEmail
- ServerConfigExport
- ServerConfigExportUsers
- ServerConfigFollowings
- ServerConfigFollowingsInstance
- ServerConfigFollowingsInstanceAutoFollowIndex
- ServerConfigImport
- ServerConfigImportVideos
- ServerConfigInstance
- ServerConfigInstanceCustomizations
- ServerConfigInstanceSocial
- ServerConfigInstanceSupport
- ServerConfigOpenTelemetry
- ServerConfigOpenTelemetryMetrics
- ServerConfigPlugin
- ServerConfigSearch
- ServerConfigSearchRemoteUri
- ServerConfigSignup
- ServerConfigTranscoding
- ServerConfigTrending
- ServerConfigTrendingVideos
- ServerConfigUser
- ServerConfigVideo
- ServerConfigVideoCaption
- ServerConfigVideoCaptionFile
- ServerConfigVideoFile
- ServerConfigVideoImage
- ServerConfigViews
- ServerConfigViewsViews
- ServerConfigViewsViewsWatchingInterval
- ServerStats
- ServerStatsVideosRedundancyInner
- Storyboard
- TagOverview
- UninstallPluginRequest
- UpdateMe
- UpdateUser
- User
- UserAdminFlags
- UserExportState
- UserImportResumable
- UserImportState
- UserRegistration
- UserRegistrationAcceptOrReject
- UserRegistrationRequest
- UserRegistrationState
- UserRegistrationUser
- UserRole
- UserViewingVideo
- UserWithStats
- VODAudioMergeTranscoding
- VODAudioMergeTranscoding1
- VODAudioMergeTranscoding1Input
- VODHLSTranscoding
- VODHLSTranscoding1
- VODWebVideoTranscoding
- VODWebVideoTranscoding1
- VODWebVideoTranscoding1Input
- VODWebVideoTranscoding1Output
- VerifyRegistrationEmailRequest
- VerifyUserRequest
- Video
- VideoBlacklist
- VideoCaption
- VideoChannel
- VideoChannelCreate
- VideoChannelEdit
- VideoChannelList
- VideoChannelListDataInner
- VideoChannelSummary
- VideoChannelSync
- VideoChannelSyncCreate
- VideoChannelSyncList
- VideoChannelSyncState
- VideoChannelUpdate
- VideoChapters
- VideoComment
- VideoCommentForOwnerOrAdmin
- VideoCommentThreadTree
- VideoCommentsForXMLInner
- VideoCommentsPolicyConstant
- VideoCommentsPolicySet
- VideoConstantNumberCategory
- VideoConstantNumberLicence
- VideoConstantStringLanguage
- VideoDetails
- VideoFile
- VideoImport
- VideoImportStateConstant
- VideoImportsList
- VideoInfo
- VideoListResponse
- VideoPassword
- VideoPasswordList
- VideoPlaylist
- VideoPlaylistPrivacyConstant
- VideoPlaylistPrivacySet
- VideoPlaylistTypeConstant
- VideoPlaylistTypeSet
- VideoPrivacyConstant
- VideoPrivacySet
- VideoRating
- VideoRedundancy
- VideoRedundancyRedundancies
- VideoReplaceSourceRequestResumable
- VideoResolutionConstant
- VideoScheduledUpdate
- VideoSource
- VideoStateConstant
- VideoStatsOverall
- VideoStatsOverallCountriesInner
- VideoStatsRetention
- VideoStatsRetentionDataInner
- VideoStatsTimeserie
- VideoStatsTimeserieDataInner
- VideoStreamingPlaylists
- VideoStreamingPlaylistsHLS
- VideoStreamingPlaylistsHLSRedundanciesInner
- VideoTokenResponse
- VideoTokenResponseFiles
- VideoUploadRequestCommon
- VideoUploadRequestResumable
- VideoUploadResponse
- VideoUploadResponseVideo
- VideoUserHistory
- VideosForXMLInner
- VideosForXMLInnerEnclosure
- VideosForXMLInnerMediaCommunity
- VideosForXMLInnerMediaCommunityMediaStatistics
- VideosForXMLInnerMediaEmbed
- VideosForXMLInnerMediaGroupInner
- VideosForXMLInnerMediaPlayer
- VideosForXMLInnerMediaThumbnail
- WatchedWordsLists
Documentation For Authorization
Authentication schemes defined for the API:
OAuth2
- Type: OAuth
- Flow: password
- Authorization URL:
- Scopes:
- admin: Admin scope
- moderator: Moderator scope
- user: User scope
Example
auth := context.WithValue(context.Background(), peertube_api_sdk_go.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
import "golang.org/x/oauth2"
/* Perform OAuth2 round trip request and obtain a token */
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, peertube_api_sdk_go.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)
Documentation for Utility Methods
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime