Commit 184bd803 authored by Rigel Kent's avatar Rigel Kent
Browse files

Minor update kotlin

parent 99c18c11
......@@ -30,6 +30,10 @@ All URIs are relative to *https://peertube2.cpy.re/api/v1*. Change it when insta
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AbusesApi* | [**abusesAbuseIdDelete**](docs/AbusesApi.md#abusesabuseiddelete) | **DELETE** /abuses/{abuseId} | Delete an abuse
*AbusesApi* | [**abusesAbuseIdPut**](docs/AbusesApi.md#abusesabuseidput) | **PUT** /abuses/{abuseId} | Update an abuse
*AbusesApi* | [**abusesGet**](docs/AbusesApi.md#abusesget) | **GET** /abuses | List abuses
*AbusesApi* | [**abusesPost**](docs/AbusesApi.md#abusespost) | **POST** /abuses | Report an abuse
*AccountBlocksApi* | [**blocklistAccountsAccountNameDelete**](docs/AccountBlocksApi.md#blocklistaccountsaccountnamedelete) | **DELETE** /blocklist/accounts/{accountName} | Unblock an account by its handle
*AccountBlocksApi* | [**blocklistAccountsGet**](docs/AccountBlocksApi.md#blocklistaccountsget) | **GET** /blocklist/accounts | List account blocks
*AccountBlocksApi* | [**blocklistAccountsPost**](docs/AccountBlocksApi.md#blocklistaccountspost) | **POST** /blocklist/accounts | Block an account
......@@ -103,10 +107,6 @@ Class | Method | HTTP request | Description
*VideoApi* | [**videosLicencesGet**](docs/VideoApi.md#videoslicencesget) | **GET** /videos/licences | List available video licences
*VideoApi* | [**videosPrivaciesGet**](docs/VideoApi.md#videosprivaciesget) | **GET** /videos/privacies | List available video privacies
*VideoApi* | [**videosUploadPost**](docs/VideoApi.md#videosuploadpost) | **POST** /videos/upload | Upload a video
*VideoAbusesApi* | [**videosAbuseGet**](docs/VideoAbusesApi.md#videosabuseget) | **GET** /videos/abuse | List video abuses
*VideoAbusesApi* | [**videosIdAbuseAbuseIdDelete**](docs/VideoAbusesApi.md#videosidabuseabuseiddelete) | **DELETE** /videos/{id}/abuse/{abuseId} | Delete an abuse
*VideoAbusesApi* | [**videosIdAbuseAbuseIdPut**](docs/VideoAbusesApi.md#videosidabuseabuseidput) | **PUT** /videos/{id}/abuse/{abuseId} | Update an abuse
*VideoAbusesApi* | [**videosIdAbusePost**](docs/VideoAbusesApi.md#videosidabusepost) | **POST** /videos/{id}/abuse | Report an abuse
*VideoBlocksApi* | [**videosBlacklistGet**](docs/VideoBlocksApi.md#videosblacklistget) | **GET** /videos/blacklist | List video blocks
*VideoBlocksApi* | [**videosIdBlacklistDelete**](docs/VideoBlocksApi.md#videosidblacklistdelete) | **DELETE** /videos/{id}/blacklist | Unblock a video by its id
*VideoBlocksApi* | [**videosIdBlacklistPost**](docs/VideoBlocksApi.md#videosidblacklistpost) | **POST** /videos/{id}/blacklist | Block a video
......@@ -151,12 +151,16 @@ Class | Method | HTTP request | Description
*VideosApi* | [**usersMeVideosImportsGet**](docs/VideosApi.md#usersmevideosimportsget) | **GET** /users/me/videos/imports | Get video imports of my user
*VideosApi* | [**videoPlaylistsIdVideosGet**](docs/VideosApi.md#videoplaylistsidvideosget) | **GET** /video-playlists/{id}/videos | List videos of a playlist
*VideosApi* | [**videoPlaylistsIdVideosPost**](docs/VideosApi.md#videoplaylistsidvideospost) | **POST** /video-playlists/{id}/videos | Add a video in a playlist
*VideosApi* | [**videosIdAbusePost**](docs/VideosApi.md#videosidabusepost) | **POST** /videos/{id}/abuse | Report an abuse
<a name="documentation-for-models"></a>
## Documentation for Models
- [org.peertube.client.models.AbuseStateConstant](docs/AbuseStateConstant.md)
- [org.peertube.client.models.AbuseStateSet](docs/AbuseStateSet.md)
- [org.peertube.client.models.AbusesAccount](docs/AbusesAccount.md)
- [org.peertube.client.models.AbusesComment](docs/AbusesComment.md)
- [org.peertube.client.models.AbusesVideo](docs/AbusesVideo.md)
- [org.peertube.client.models.Account](docs/Account.md)
- [org.peertube.client.models.AccountAllOf](docs/AccountAllOf.md)
- [org.peertube.client.models.AccountSummary](docs/AccountSummary.md)
......@@ -275,8 +279,6 @@ Class | Method | HTTP request | Description
- [org.peertube.client.models.UserWatchingVideo](docs/UserWatchingVideo.md)
- [org.peertube.client.models.Video](docs/Video.md)
- [org.peertube.client.models.VideoAbuse](docs/VideoAbuse.md)
- [org.peertube.client.models.VideoAbuseStateConstant](docs/VideoAbuseStateConstant.md)
- [org.peertube.client.models.VideoAbuseStateSet](docs/VideoAbuseStateSet.md)
- [org.peertube.client.models.VideoAbuseVideo](docs/VideoAbuseVideo.md)
- [org.peertube.client.models.VideoBlacklist](docs/VideoBlacklist.md)
- [org.peertube.client.models.VideoCaption](docs/VideoCaption.md)
......
......@@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**state** | [**VideoAbuseStateSet**](VideoAbuseStateSet.md) | | [optional]
**state** | [**AbuseStateSet**](AbuseStateSet.md) | | [optional]
**moderationComment** | **kotlin.String** | Update the report comment visible only to the moderation team | [optional]
......
......@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**newVideoFromSubscription** | [**NotificationSettingValue**](NotificationSettingValue.md) | | [optional]
**newCommentOnMyVideo** | [**NotificationSettingValue**](NotificationSettingValue.md) | | [optional]
**videoAbuseAsModerator** | [**NotificationSettingValue**](NotificationSettingValue.md) | | [optional]
**abuseAsModerator** | [**NotificationSettingValue**](NotificationSettingValue.md) | | [optional]
**videoAutoBlacklistAsModerator** | [**NotificationSettingValue**](NotificationSettingValue.md) | | [optional]
**blacklistOnMyVideo** | [**NotificationSettingValue**](NotificationSettingValue.md) | | [optional]
**myVideoPublished** | [**NotificationSettingValue**](NotificationSettingValue.md) | | [optional]
......
......@@ -6,8 +6,9 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**reason** | **kotlin.String** | Reason why the user reports this video |
**predefinedReasons** | [**inline**](#kotlin.Array&lt;PredefinedReasonsEnum&gt;) | Reason categories that help triage reports | [optional]
**startAt** | **kotlin.Int** | Timestamp in the video that marks the beginning of the report | [optional]
**endAt** | **kotlin.Int** | Timestamp in the video that marks the ending of the report | [optional]
**video** | [**AbusesVideo**](AbusesVideo.md) | | [optional]
**comment** | [**AbusesComment**](AbusesComment.md) | | [optional]
**account** | [**AbusesAccount**](AbusesAccount.md) | | [optional]
<a name="kotlin.Array<PredefinedReasonsEnum>"></a>
......
......@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **kotlin.Int** | | [optional]
**type** | **kotlin.Int** | Notification type, following the &#x60;UserNotificationType&#x60; enum: - &#x60;1&#x60; NEW_VIDEO_FROM_SUBSCRIPTION - &#x60;2&#x60; NEW_COMMENT_ON_MY_VIDEO - &#x60;3&#x60; NEW_VIDEO_ABUSE_FOR_MODERATORS - &#x60;4&#x60; BLACKLIST_ON_MY_VIDEO - &#x60;5&#x60; UNBLACKLIST_ON_MY_VIDEO - &#x60;6&#x60; MY_VIDEO_PUBLISHED - &#x60;7&#x60; MY_VIDEO_IMPORT_SUCCESS - &#x60;8&#x60; MY_VIDEO_IMPORT_ERROR - &#x60;9&#x60; NEW_USER_REGISTRATION - &#x60;10&#x60; NEW_FOLLOW - &#x60;11&#x60; COMMENT_MENTION - &#x60;12&#x60; VIDEO_AUTO_BLACKLIST_FOR_MODERATORS - &#x60;13&#x60; NEW_INSTANCE_FOLLOWER - &#x60;14&#x60; AUTO_INSTANCE_FOLLOWING | [optional]
**type** | **kotlin.Int** | Notification type, following the &#x60;UserNotificationType&#x60; enum: - &#x60;1&#x60; NEW_VIDEO_FROM_SUBSCRIPTION - &#x60;2&#x60; NEW_COMMENT_ON_MY_VIDEO - &#x60;3&#x60; NEW_ABUSE_FOR_MODERATORS - &#x60;4&#x60; BLACKLIST_ON_MY_VIDEO - &#x60;5&#x60; UNBLACKLIST_ON_MY_VIDEO - &#x60;6&#x60; MY_VIDEO_PUBLISHED - &#x60;7&#x60; MY_VIDEO_IMPORT_SUCCESS - &#x60;8&#x60; MY_VIDEO_IMPORT_ERROR - &#x60;9&#x60; NEW_USER_REGISTRATION - &#x60;10&#x60; NEW_FOLLOW - &#x60;11&#x60; COMMENT_MENTION - &#x60;12&#x60; VIDEO_AUTO_BLACKLIST_FOR_MODERATORS - &#x60;13&#x60; NEW_INSTANCE_FOLLOWER - &#x60;14&#x60; AUTO_INSTANCE_FOLLOWING | [optional]
**read** | **kotlin.Boolean** | | [optional]
**video** | [**VideoInfo**](VideoInfo.md) | | [optional]
**videoImport** | [**NotificationVideoImport**](NotificationVideoImport.md) | | [optional]
......
......@@ -17,9 +17,9 @@ Name | Type | Description | Notes
**videoQuota** | **kotlin.Int** | The user video quota | [optional]
**videoQuotaDaily** | **kotlin.Int** | The user daily video quota | [optional]
**videosCount** | **kotlin.Int** | | [optional]
**videoAbusesCount** | **kotlin.Int** | | [optional]
**videoAbusesAcceptedCount** | **kotlin.Int** | | [optional]
**videoAbusesCreatedCount** | **kotlin.Int** | | [optional]
**abusesCount** | **kotlin.Int** | | [optional]
**abusesAcceptedCount** | **kotlin.Int** | | [optional]
**abusesCreatedCount** | **kotlin.Int** | | [optional]
**videoCommentsCount** | **kotlin.Int** | | [optional]
**noInstanceConfigWarningModal** | **kotlin.Boolean** | | [optional]
**noWelcomeModal** | **kotlin.Boolean** | | [optional]
......
......@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**reason** | **kotlin.String** | | [optional]
**predefinedReasons** | [**inline**](#kotlin.Array&lt;PredefinedReasonsEnum&gt;) | | [optional]
**reporterAccount** | [**Account**](Account.md) | | [optional]
**state** | [**VideoAbuseStateConstant**](VideoAbuseStateConstant.md) | | [optional]
**state** | [**AbuseStateConstant**](AbuseStateConstant.md) | | [optional]
**moderationComment** | **kotlin.String** | | [optional]
**video** | [**VideoAbuseVideo**](VideoAbuseVideo.md) | | [optional]
**createdAt** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional]
......
......@@ -9,7 +9,6 @@ Method | HTTP request | Description
[**usersMeVideosImportsGet**](VideosApi.md#usersMeVideosImportsGet) | **GET** /users/me/videos/imports | Get video imports of my user
[**videoPlaylistsIdVideosGet**](VideosApi.md#videoPlaylistsIdVideosGet) | **GET** /video-playlists/{id}/videos | List videos of a playlist
[**videoPlaylistsIdVideosPost**](VideosApi.md#videoPlaylistsIdVideosPost) | **POST** /video-playlists/{id}/videos | Add a video in a playlist
[**videosIdAbusePost**](VideosApi.md#videosIdAbusePost) | **POST** /videos/{id}/abuse | Report an abuse
<a name="usersMeSubscriptionsVideosGet"></a>
......@@ -275,51 +274,3 @@ Configure OAuth2:
- **Content-Type**: application/json
- **Accept**: application/json
<a name="videosIdAbusePost"></a>
# **videosIdAbusePost**
> videosIdAbusePost(id, inlineObject9)
Report an abuse
### Example
```kotlin
// Import classes:
//import org.peertube.client.infrastructure.*
//import org.peertube.client.models.*
val apiInstance = VideosApi()
val id : OneOfLessThanIntegerCommaUUIDGreaterThan = // OneOfLessThanIntegerCommaUUIDGreaterThan | The object id or uuid
val inlineObject9 : InlineObject9 = // InlineObject9 |
try {
apiInstance.videosIdAbusePost(id, inlineObject9)
} catch (e: ClientException) {
println("4xx response calling VideosApi#videosIdAbusePost")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling VideosApi#videosIdAbusePost")
e.printStackTrace()
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | [**OneOfLessThanIntegerCommaUUIDGreaterThan**](.md)| The object id or uuid |
**inlineObject9** | [**InlineObject9**](InlineObject9.md)| |
### Return type
null (empty response body)
### Authorization
Configure OAuth2:
ApiClient.accessToken = ""
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
......@@ -2,7 +2,7 @@
* PeerTube
* # 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](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO) which generates a client SDK in the language of your choice - we generate some client SDKs automatically: - [Python](https://framagit.org/framasoft/peertube/clients/python) - [Go](https://framagit.org/framasoft/peertube/clients/go) - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin) See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) 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](https://docs.joinpeertube.org/#/admin-managing-users?id=roles) 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 } ```
*
* The version of the OpenAPI document: 2.3.0-rc.1
* The version of the OpenAPI document: 2.3.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -12,7 +12,6 @@
package org.peertube.client.apis
import org.peertube.client.models.InlineObject14
import org.peertube.client.models.InlineObject9
import org.peertube.client.models.InlineResponse2006
import org.peertube.client.models.OneOfLessThanIntegerCommaArrayGreaterThan
import org.peertube.client.models.OneOfLessThanIntegerCommaUUIDGreaterThan
......@@ -317,45 +316,4 @@ class VideosApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath)
}
}
/**
* Report an abuse
*
* @param id The object id or uuid
* @param inlineObject9
* @return void
* @throws UnsupportedOperationException If the API returns an informational or redirection response
* @throws ClientException If the API returns a client error response
* @throws ServerException If the API returns a server error response
*/
@Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class)
fun videosIdAbusePost(id: OneOfLessThanIntegerCommaUUIDGreaterThan, inlineObject9: InlineObject9) : Unit {
val localVariableBody: kotlin.Any? = inlineObject9
val localVariableQuery: MultiValueMap = mutableMapOf()
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
val localVariableConfig = RequestConfig(
RequestMethod.POST,
"/videos/{id}/abuse".replace("{"+"id"+"}", "$id"),
query = localVariableQuery,
headers = localVariableHeaders
)
val localVarResponse = request<Any?>(
localVariableConfig,
localVariableBody
)
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> {
val localVarError = localVarResponse as ClientError<*>
throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
}
ResponseType.ServerError -> {
val localVarError = localVarResponse as ServerError<*>
throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
}
}
}
}
......@@ -2,7 +2,7 @@
* PeerTube
* # 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](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO) which generates a client SDK in the language of your choice - we generate some client SDKs automatically: - [Python](https://framagit.org/framasoft/peertube/clients/python) - [Go](https://framagit.org/framasoft/peertube/clients/go) - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin) See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) 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](https://docs.joinpeertube.org/#/admin-managing-users?id=roles) 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 } ```
*
* The version of the OpenAPI document: 2.3.0-rc.1
* The version of the OpenAPI document: 2.3.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -2,7 +2,7 @@
* PeerTube
* # 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](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO) which generates a client SDK in the language of your choice - we generate some client SDKs automatically: - [Python](https://framagit.org/framasoft/peertube/clients/python) - [Go](https://framagit.org/framasoft/peertube/clients/go) - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin) See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) 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](https://docs.joinpeertube.org/#/admin-managing-users?id=roles) 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 } ```
*
* The version of the OpenAPI document: 2.3.0-rc.1
* The version of the OpenAPI document: 2.3.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -2,7 +2,7 @@
* PeerTube
* # 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](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO) which generates a client SDK in the language of your choice - we generate some client SDKs automatically: - [Python](https://framagit.org/framasoft/peertube/clients/python) - [Go](https://framagit.org/framasoft/peertube/clients/go) - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin) See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) 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](https://docs.joinpeertube.org/#/admin-managing-users?id=roles) 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 } ```
*
* The version of the OpenAPI document: 2.3.0-rc.1
* The version of the OpenAPI document: 2.3.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -2,7 +2,7 @@
* PeerTube
* # 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](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO) which generates a client SDK in the language of your choice - we generate some client SDKs automatically: - [Python](https://framagit.org/framasoft/peertube/clients/python) - [Go](https://framagit.org/framasoft/peertube/clients/go) - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin) See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) 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](https://docs.joinpeertube.org/#/admin-managing-users?id=roles) 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 } ```
*
* The version of the OpenAPI document: 2.3.0-rc.1
* The version of the OpenAPI document: 2.3.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -2,7 +2,7 @@
* PeerTube
* # 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](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO) which generates a client SDK in the language of your choice - we generate some client SDKs automatically: - [Python](https://framagit.org/framasoft/peertube/clients/python) - [Go](https://framagit.org/framasoft/peertube/clients/go) - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin) See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) 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](https://docs.joinpeertube.org/#/admin-managing-users?id=roles) 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 } ```
*
* The version of the OpenAPI document: 2.3.0-rc.1
* The version of the OpenAPI document: 2.3.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -11,7 +11,7 @@
*/
package org.peertube.client.models
import org.peertube.client.models.VideoAbuseStateSet
import org.peertube.client.models.AbuseStateSet
import com.squareup.moshi.Json
/**
......@@ -22,7 +22,7 @@ import com.squareup.moshi.Json
data class InlineObject10 (
@Json(name = "state")
val state: VideoAbuseStateSet? = null,
val state: AbuseStateSet? = null,
/* Update the report comment visible only to the moderation team */
@Json(name = "moderationComment")
val moderationComment: kotlin.String? = null
......
......@@ -18,7 +18,7 @@ import com.squareup.moshi.Json
*
* @param newVideoFromSubscription
* @param newCommentOnMyVideo
* @param videoAbuseAsModerator
* @param abuseAsModerator
* @param videoAutoBlacklistAsModerator
* @param blacklistOnMyVideo
* @param myVideoPublished
......@@ -35,8 +35,8 @@ data class InlineObject3 (
val newVideoFromSubscription: NotificationSettingValue? = null,
@Json(name = "newCommentOnMyVideo")
val newCommentOnMyVideo: NotificationSettingValue? = null,
@Json(name = "videoAbuseAsModerator")
val videoAbuseAsModerator: NotificationSettingValue? = null,
@Json(name = "abuseAsModerator")
val abuseAsModerator: NotificationSettingValue? = null,
@Json(name = "videoAutoBlacklistAsModerator")
val videoAutoBlacklistAsModerator: NotificationSettingValue? = null,
@Json(name = "blacklistOnMyVideo")
......
......@@ -11,14 +11,18 @@
*/
package org.peertube.client.models
import org.peertube.client.models.AbusesAccount
import org.peertube.client.models.AbusesComment
import org.peertube.client.models.AbusesVideo
import com.squareup.moshi.Json
/**
*
* @param reason Reason why the user reports this video
* @param predefinedReasons Reason categories that help triage reports
* @param startAt Timestamp in the video that marks the beginning of the report
* @param endAt Timestamp in the video that marks the ending of the report
* @param video
* @param comment
* @param account
*/
data class InlineObject9 (
......@@ -28,12 +32,12 @@ data class InlineObject9 (
/* Reason categories that help triage reports */
@Json(name = "predefinedReasons")
val predefinedReasons: kotlin.Array<InlineObject9.PredefinedReasons>? = null,
/* Timestamp in the video that marks the beginning of the report */
@Json(name = "startAt")
val startAt: kotlin.Int? = null,
/* Timestamp in the video that marks the ending of the report */
@Json(name = "endAt")
val endAt: kotlin.Int? = null
@Json(name = "video")
val video: AbusesVideo? = null,
@Json(name = "comment")
val comment: AbusesComment? = null,
@Json(name = "account")
val account: AbusesAccount? = null
) {
/**
......
......@@ -22,7 +22,7 @@ import com.squareup.moshi.Json
/**
*
* @param id
* @param type Notification type, following the `UserNotificationType` enum: - `1` NEW_VIDEO_FROM_SUBSCRIPTION - `2` NEW_COMMENT_ON_MY_VIDEO - `3` NEW_VIDEO_ABUSE_FOR_MODERATORS - `4` BLACKLIST_ON_MY_VIDEO - `5` UNBLACKLIST_ON_MY_VIDEO - `6` MY_VIDEO_PUBLISHED - `7` MY_VIDEO_IMPORT_SUCCESS - `8` MY_VIDEO_IMPORT_ERROR - `9` NEW_USER_REGISTRATION - `10` NEW_FOLLOW - `11` COMMENT_MENTION - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS - `13` NEW_INSTANCE_FOLLOWER - `14` AUTO_INSTANCE_FOLLOWING
* @param type Notification type, following the `UserNotificationType` enum: - `1` NEW_VIDEO_FROM_SUBSCRIPTION - `2` NEW_COMMENT_ON_MY_VIDEO - `3` NEW_ABUSE_FOR_MODERATORS - `4` BLACKLIST_ON_MY_VIDEO - `5` UNBLACKLIST_ON_MY_VIDEO - `6` MY_VIDEO_PUBLISHED - `7` MY_VIDEO_IMPORT_SUCCESS - `8` MY_VIDEO_IMPORT_ERROR - `9` NEW_USER_REGISTRATION - `10` NEW_FOLLOW - `11` COMMENT_MENTION - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS - `13` NEW_INSTANCE_FOLLOWER - `14` AUTO_INSTANCE_FOLLOWING
* @param read
* @param video
* @param videoImport
......@@ -38,7 +38,7 @@ import com.squareup.moshi.Json
data class Notification (
@Json(name = "id")
val id: kotlin.Int? = null,
/* Notification type, following the `UserNotificationType` enum: - `1` NEW_VIDEO_FROM_SUBSCRIPTION - `2` NEW_COMMENT_ON_MY_VIDEO - `3` NEW_VIDEO_ABUSE_FOR_MODERATORS - `4` BLACKLIST_ON_MY_VIDEO - `5` UNBLACKLIST_ON_MY_VIDEO - `6` MY_VIDEO_PUBLISHED - `7` MY_VIDEO_IMPORT_SUCCESS - `8` MY_VIDEO_IMPORT_ERROR - `9` NEW_USER_REGISTRATION - `10` NEW_FOLLOW - `11` COMMENT_MENTION - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS - `13` NEW_INSTANCE_FOLLOWER - `14` AUTO_INSTANCE_FOLLOWING */
/* Notification type, following the `UserNotificationType` enum: - `1` NEW_VIDEO_FROM_SUBSCRIPTION - `2` NEW_COMMENT_ON_MY_VIDEO - `3` NEW_ABUSE_FOR_MODERATORS - `4` BLACKLIST_ON_MY_VIDEO - `5` UNBLACKLIST_ON_MY_VIDEO - `6` MY_VIDEO_PUBLISHED - `7` MY_VIDEO_IMPORT_SUCCESS - `8` MY_VIDEO_IMPORT_ERROR - `9` NEW_USER_REGISTRATION - `10` NEW_FOLLOW - `11` COMMENT_MENTION - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS - `13` NEW_INSTANCE_FOLLOWER - `14` AUTO_INSTANCE_FOLLOWING */
@Json(name = "type")
val type: kotlin.Int? = null,
@Json(name = "read")
......
......@@ -32,9 +32,9 @@ import com.squareup.moshi.Json
* @param videoQuota The user video quota
* @param videoQuotaDaily The user daily video quota
* @param videosCount
* @param videoAbusesCount
* @param videoAbusesAcceptedCount
* @param videoAbusesCreatedCount
* @param abusesCount
* @param abusesAcceptedCount
* @param abusesCreatedCount
* @param videoCommentsCount
* @param noInstanceConfigWarningModal
* @param noWelcomeModal
......@@ -80,12 +80,12 @@ data class User (
val videoQuotaDaily: kotlin.Int? = null,
@Json(name = "videosCount")
val videosCount: kotlin.Int? = null,
@Json(name = "videoAbusesCount")
val videoAbusesCount: kotlin.Int? = null,
@Json(name = "videoAbusesAcceptedCount")
val videoAbusesAcceptedCount: kotlin.Int? = null,
@Json(name = "videoAbusesCreatedCount")
val videoAbusesCreatedCount: kotlin.Int? = null,
@Json(name = "abusesCount")
val abusesCount: kotlin.Int? = null,
@Json(name = "abusesAcceptedCount")
val abusesAcceptedCount: kotlin.Int? = null,
@Json(name = "abusesCreatedCount")
val abusesCreatedCount: kotlin.Int? = null,
@Json(name = "videoCommentsCount")
val videoCommentsCount: kotlin.Int? = null,
@Json(name = "noInstanceConfigWarningModal")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment