OCaml bindings to the Peertube ActivityPub video sharing API

Fix OpenAPI codegen to resolve $ref path parameters

The code generator was ignoring parameters that use $ref references
(e.g., $ref: '#/components/parameters/idOrUUID'). This caused path
template parameters like {id} to not be substituted in the generated
code.

Changes:
- Add param_name_from_ref to extract parameter name from $ref string
- Add resolve_parameter to look up referenced parameters in components
- Update analyze_operation to accept spec and path_item_params
- Merge path_item parameters with operation parameters
- Add explicit type annotation for path_item to fix type inference

The peertube library is regenerated with this fix, so get_video and
similar endpoints now correctly accept their path parameters.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+2182 -825
+1 -10
dune.inc
··· 1 - ; Generated rules for OpenAPI code regeneration 2 - ; Run: dune build @gen --auto-promote 3 - 4 - (rule 5 - (alias gen) 6 - (mode (promote (until-clean))) 7 - (targets peertube.ml peertube.mli) 8 - (deps peertube-openapi.yaml) 9 - (action 10 - (run openapi-gen generate -o . -n peertube %{deps}))) 1 + ; No spec path provided - regeneration rules not generated
+1187 -504
peertube.ml
··· 271 271 272 272 (** Send chunk for the resumable upload of a video 273 273 274 - Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the upload of a video *) 275 - let upload_resumable client () = 274 + Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the upload of a video 275 + @param upload_id Created session id to proceed with. If you didn't send chunks in the last hour, it is 276 + not valid anymore and you need to initialize a new upload. 277 + 278 + *) 279 + let upload_resumable ~upload_id client () = 276 280 let op_name = "upload_resumable" in 277 281 let url_path = "/api/v1/videos/upload-resumable" in 278 - let query = "" in 282 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"upload_id" ~value:upload_id]) in 279 283 let url = client.base_url ^ url_path ^ query in 280 284 let response = 281 285 try Requests.put client.session url ··· 315 319 316 320 (** Request video token 317 321 318 - Request special tokens that expire quickly to use them in some context (like accessing private static files) *) 319 - let request_video_token client () = 322 + Request special tokens that expire quickly to use them in some context (like accessing private static files) 323 + @param id The object id, uuid or short uuid 324 + *) 325 + let request_video_token ~id client () = 320 326 let op_name = "request_video_token" in 321 - let url_path = "/api/v1/videos/{id}/token" in 327 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/token" in 322 328 let query = "" in 323 329 let url = client.base_url ^ url_path ^ query in 324 330 let response = ··· 421 427 end 422 428 423 429 (** Get user agent stats of a video 430 + @param id The object id, uuid or short uuid 424 431 @param start_date Filter stats by start date 425 432 @param end_date Filter stats by end date 426 433 *) 427 - let get_api_v1_videos_stats_user_agent ?start_date ?end_date client () = 434 + let get_api_v1_videos_stats_user_agent ~id ?start_date ?end_date client () = 428 435 let op_name = "get_api_v1_videos_stats_user_agent" in 429 - let url_path = "/api/v1/videos/{id}/stats/user-agent" in 436 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/stats/user-agent" in 430 437 let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"startDate" ~value:start_date; Openapi.Runtime.Query.optional ~key:"endDate" ~value:end_date]) in 431 438 let url = client.base_url ^ url_path ^ query in 432 439 let response = ··· 466 473 end 467 474 468 475 (** Get timeserie stats of a video 476 + @param id The object id, uuid or short uuid 469 477 @param metric The metric to get 470 478 @param start_date Filter stats by start date 471 479 @param end_date Filter stats by end date 472 480 *) 473 - let get_api_v1_videos_stats_timeseries ~metric ?start_date ?end_date client () = 481 + let get_api_v1_videos_stats_timeseries ~id ~metric ?start_date ?end_date client () = 474 482 let op_name = "get_api_v1_videos_stats_timeseries" in 475 - let url_path = Openapi.Runtime.Path.render ~params:[("metric", metric)] "/api/v1/videos/{id}/stats/timeseries/{metric}" in 483 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id); ("metric", metric)] "/api/v1/videos/{id}/stats/timeseries/{metric}" in 476 484 let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"startDate" ~value:start_date; Openapi.Runtime.Query.optional ~key:"endDate" ~value:end_date]) in 477 485 let url = client.base_url ^ url_path ^ query in 478 486 let response = ··· 511 519 |> Jsont.Object.finish 512 520 end 513 521 514 - (** Get retention stats of a video *) 515 - let get_api_v1_videos_stats_retention client () = 522 + (** Get retention stats of a video 523 + @param id The object id, uuid or short uuid 524 + *) 525 + let get_api_v1_videos_stats_retention ~id client () = 516 526 let op_name = "get_api_v1_videos_stats_retention" in 517 - let url_path = "/api/v1/videos/{id}/stats/retention" in 527 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/stats/retention" in 518 528 let query = "" in 519 529 let url = client.base_url ^ url_path ^ query in 520 530 let response = ··· 572 582 end 573 583 574 584 (** Get overall stats of a video 585 + @param id The object id, uuid or short uuid 575 586 @param start_date Filter stats by start date 576 587 @param end_date Filter stats by end date 577 588 *) 578 - let get_api_v1_videos_stats_overall ?start_date ?end_date client () = 589 + let get_api_v1_videos_stats_overall ~id ?start_date ?end_date client () = 579 590 let op_name = "get_api_v1_videos_stats_overall" in 580 - let url_path = "/api/v1/videos/{id}/stats/overall" in 591 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/stats/overall" in 581 592 let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"startDate" ~value:start_date; Openapi.Runtime.Query.optional ~key:"endDate" ~value:end_date]) in 582 593 let url = client.base_url ^ url_path ^ query in 583 594 let response = ··· 671 682 672 683 (** Get video source file metadata 673 684 674 - Get metadata and download link of original video file *) 675 - let get_video_source client () = 685 + Get metadata and download link of original video file 686 + @param id The object id, uuid or short uuid 687 + *) 688 + let get_video_source ~id client () = 676 689 let op_name = "get_video_source" in 677 - let url_path = "/api/v1/videos/{id}/source" in 690 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/source" in 678 691 let query = "" in 679 692 let url = client.base_url ^ url_path ^ query in 680 693 let response = ··· 1016 1029 let v () = Jsont.Null ((), Jsont.Meta.none) 1017 1030 end 1018 1031 1019 - (** Get a video *) 1020 - let get_video client () = 1032 + (** Get a video 1033 + @param id The object id, uuid or short uuid 1034 + *) 1035 + let get_video ~id client () = 1021 1036 let op_name = "get_video" in 1022 - let url_path = "/api/v1/videos/{id}" in 1037 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}" in 1023 1038 let query = "" in 1024 1039 let url = client.base_url ^ url_path ^ query in 1025 1040 let response = ··· 1111 1126 1112 1127 (** Get chapters of a video 1113 1128 1114 - **PeerTube >= 6.0** *) 1115 - let get_video_chapters client () = 1129 + **PeerTube >= 6.0** 1130 + @param id The object id, uuid or short uuid 1131 + *) 1132 + let get_video_chapters ~id client () = 1116 1133 let op_name = "get_video_chapters" in 1117 - let url_path = "/api/v1/videos/{id}/chapters" in 1134 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/chapters" in 1118 1135 let query = "" in 1119 1136 let url = client.base_url ^ url_path ^ query in 1120 1137 let response = ··· 1156 1173 |> Jsont.Object.finish 1157 1174 end 1158 1175 1159 - (** List the synchronizations of video channels of an account *) 1160 - let get_api_v1_accounts_video_channel_syncs client () = 1176 + (** List the synchronizations of video channels of an account 1177 + @param name The username or handle of the account 1178 + @param start Offset used to paginate results 1179 + @param count Number of items to return 1180 + @param sort Sort column 1181 + @param include_collaborations **PeerTube >= 8.0** Include objects from collaborated channels 1182 + *) 1183 + let get_api_v1_accounts_video_channel_syncs ~name ?start ?count ?sort ?include_collaborations client () = 1161 1184 let op_name = "get_api_v1_accounts_video_channel_syncs" in 1162 - let url_path = "/api/v1/accounts/{name}/video-channel-syncs" in 1163 - let query = "" in 1185 + let url_path = Openapi.Runtime.Path.render ~params:[("name", name)] "/api/v1/accounts/{name}/video-channel-syncs" in 1186 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"includeCollaborations" ~value:include_collaborations]) in 1164 1187 let url = client.base_url ^ url_path ^ query in 1165 1188 let response = 1166 1189 try Requests.get client.session url ··· 1202 1225 end 1203 1226 1204 1227 (** List video channels of an account 1228 + @param name The username or handle of the account 1205 1229 @param with_stats include daily view statistics for the last 30 days and total views (only if authenticated as the account user) 1230 + @param start Offset used to paginate results 1231 + @param count Number of items to return 1232 + @param search Plain text search, applied to various parts of the model depending on endpoint 1233 + @param sort Sort column 1234 + @param include_collaborations **PeerTube >= 8.0** Include objects from collaborated channels 1206 1235 *) 1207 - let get_api_v1_accounts_video_channels ?with_stats client () = 1236 + let get_api_v1_accounts_video_channels ~name ?with_stats ?start ?count ?search ?sort ?include_collaborations client () = 1208 1237 let op_name = "get_api_v1_accounts_video_channels" in 1209 - let url_path = "/api/v1/accounts/{name}/video-channels" in 1210 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"withStats" ~value:with_stats]) in 1238 + let url_path = Openapi.Runtime.Path.render ~params:[("name", name)] "/api/v1/accounts/{name}/video-channels" in 1239 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"withStats" ~value:with_stats; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"includeCollaborations" ~value:include_collaborations]) in 1211 1240 let url = client.base_url ^ url_path ^ query in 1212 1241 let response = 1213 1242 try Requests.get client.session url ··· 1229 1258 (** Search channels 1230 1259 @param search 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. 1231 1260 1261 + @param start Offset used to paginate results 1262 + @param count Number of items to return 1263 + @param search_target If the administrator enabled search index support, you can override the default search target. 1264 + 1265 + **Warning**: If you choose to make an index search, PeerTube will get results from a third party service. It means the instance may not yet know the objects you fetched. If you want to load video/channel information: 1266 + * If the current user has the ability to make a remote URI search (this information is available in the config endpoint), 1267 + then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. 1268 + After that, you can use the classic REST API endpoints to fetch the complete object or interact with it 1269 + * If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch 1270 + the data from the origin instance API 1271 + 1272 + @param sort Sort column 1273 + @param host Find elements owned by this host 1274 + @param handles Find elements with these handles 1232 1275 *) 1233 - let search_channels ~search client () = 1276 + let search_channels ~search ?start ?count ?search_target ?sort ?host ?handles client () = 1234 1277 let op_name = "search_channels" in 1235 1278 let url_path = "/api/v1/search/video-channels" in 1236 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"search" ~value:search]) in 1279 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"searchTarget" ~value:search_target; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"host" ~value:host; Openapi.Runtime.Query.optional ~key:"handles" ~value:handles]) in 1237 1280 let url = client.base_url ^ url_path ^ query in 1238 1281 let response = 1239 1282 try Requests.get client.session url ··· 1252 1295 body = Requests.Response.text response; 1253 1296 }) 1254 1297 1255 - (** List my user subscriptions *) 1256 - let get_api_v1_users_me_subscriptions client () = 1298 + (** List my user subscriptions 1299 + @param start Offset used to paginate results 1300 + @param count Number of items to return 1301 + *) 1302 + let get_api_v1_users_me_subscriptions ?start ?count ?sort client () = 1257 1303 let op_name = "get_api_v1_users_me_subscriptions" in 1258 1304 let url_path = "/api/v1/users/me/subscriptions" in 1259 - let query = "" in 1305 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 1260 1306 let url = client.base_url ^ url_path ^ query in 1261 1307 let response = 1262 1308 try Requests.get client.session url ··· 1275 1321 body = Requests.Response.text response; 1276 1322 }) 1277 1323 1278 - (** List video channels *) 1279 - let get_video_channels client () = 1324 + (** List video channels 1325 + @param start Offset used to paginate results 1326 + @param count Number of items to return 1327 + @param sort Sort column 1328 + *) 1329 + let get_video_channels ?start ?count ?sort client () = 1280 1330 let op_name = "get_video_channels" in 1281 1331 let url_path = "/api/v1/video-channels" in 1282 - let query = "" in 1332 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 1283 1333 let url = client.base_url ^ url_path ^ query in 1284 1334 let response = 1285 1335 try Requests.get client.session url ··· 1397 1447 let v () = Jsont.Null ((), Jsont.Meta.none) 1398 1448 end 1399 1449 1400 - (** Get subscription of my user *) 1401 - let get_api_v1_users_me_subscriptions client () = 1450 + (** Get subscription of my user 1451 + @param subscription_handle The subscription handle 1452 + *) 1453 + let get_api_v1_users_me_subscriptions ~subscription_handle client () = 1402 1454 let op_name = "get_api_v1_users_me_subscriptions" in 1403 - let url_path = "/api/v1/users/me/subscriptions/{subscriptionHandle}" in 1455 + let url_path = Openapi.Runtime.Path.render ~params:[("subscriptionHandle", subscription_handle)] "/api/v1/users/me/subscriptions/{subscriptionHandle}" in 1404 1456 let query = "" in 1405 1457 let url = client.base_url ^ url_path ^ query in 1406 1458 let response = ··· 1420 1472 body = Requests.Response.text response; 1421 1473 }) 1422 1474 1423 - (** Get a video channel *) 1424 - let get_video_channel client () = 1475 + (** Get a video channel 1476 + @param channel_handle The video channel handle 1477 + *) 1478 + let get_video_channel ~channel_handle client () = 1425 1479 let op_name = "get_video_channel" in 1426 - let url_path = "/api/v1/video-channels/{channelHandle}" in 1480 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}" in 1427 1481 let query = "" in 1428 1482 let url = client.base_url ^ url_path ^ query in 1429 1483 let response = ··· 2396 2450 2397 2451 (** Request two factor auth 2398 2452 2399 - Request two factor authentication for a user *) 2400 - let request_two_factor client () = 2453 + Request two factor authentication for a user 2454 + @param id Entity id 2455 + *) 2456 + let request_two_factor ~id client () = 2401 2457 let op_name = "request_two_factor" in 2402 - let url_path = "/api/v1/users/{id}/two-factor/request" in 2458 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/users/{id}/two-factor/request" in 2403 2459 let query = "" in 2404 2460 let url = client.base_url ^ url_path ^ query in 2405 2461 let response = ··· 2504 2560 |> Jsont.Object.finish 2505 2561 end 2506 2562 2507 - (** List plugins *) 2508 - let get_plugins ?plugin_type ?uninstalled client () = 2563 + (** List plugins 2564 + @param start Offset used to paginate results 2565 + @param count Number of items to return 2566 + @param sort Sort column 2567 + *) 2568 + let get_plugins ?plugin_type ?uninstalled ?start ?count ?sort client () = 2509 2569 let op_name = "get_plugins" in 2510 2570 let url_path = "/api/v1/plugins" in 2511 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"pluginType" ~value:plugin_type; Openapi.Runtime.Query.optional ~key:"uninstalled" ~value:uninstalled]) in 2571 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"pluginType" ~value:plugin_type; Openapi.Runtime.Query.optional ~key:"uninstalled" ~value:uninstalled; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 2512 2572 let url = client.base_url ^ url_path ^ query in 2513 2573 let response = 2514 2574 try Requests.get client.session url ··· 2527 2587 body = Requests.Response.text response; 2528 2588 }) 2529 2589 2530 - (** List available plugins *) 2531 - let get_available_plugins ?search ?plugin_type ?current_peer_tube_engine client () = 2590 + (** List available plugins 2591 + @param start Offset used to paginate results 2592 + @param count Number of items to return 2593 + @param sort Sort column 2594 + *) 2595 + let get_available_plugins ?search ?plugin_type ?current_peer_tube_engine ?start ?count ?sort client () = 2532 2596 let op_name = "get_available_plugins" in 2533 2597 let url_path = "/api/v1/plugins/available" in 2534 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"pluginType" ~value:plugin_type; Openapi.Runtime.Query.optional ~key:"currentPeerTubeEngine" ~value:current_peer_tube_engine]) in 2598 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"pluginType" ~value:plugin_type; Openapi.Runtime.Query.optional ~key:"currentPeerTubeEngine" ~value:current_peer_tube_engine; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 2535 2599 let url = client.base_url ^ url_path ^ query in 2536 2600 let response = 2537 2601 try Requests.get client.session url ··· 2550 2614 body = Requests.Response.text response; 2551 2615 }) 2552 2616 2553 - (** Get a plugin *) 2554 - let get_plugin client () = 2617 + (** Get a plugin 2618 + @param npm_name name of the plugin/theme on npmjs.com or in its package.json 2619 + *) 2620 + let get_plugin ~npm_name client () = 2555 2621 let op_name = "get_plugin" in 2556 - let url_path = "/api/v1/plugins/{npmName}" in 2622 + let url_path = Openapi.Runtime.Path.render ~params:[("npmName", npm_name)] "/api/v1/plugins/{npmName}" in 2557 2623 let query = "" in 2558 2624 let url = client.base_url ^ url_path ^ query in 2559 2625 let response = ··· 2673 2739 (** Get video player settings 2674 2740 2675 2741 Get player settings for a specific video. Returns video-specific settings merged with channel player settings. 2742 + @param id The object id, uuid or short uuid 2676 2743 @param raw Return raw settings without merging channel defaults 2677 2744 *) 2678 - let get_video_player_settings ?raw client () = 2745 + let get_video_player_settings ~id ?raw client () = 2679 2746 let op_name = "get_video_player_settings" in 2680 - let url_path = "/api/v1/player-settings/videos/{id}" in 2747 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/player-settings/videos/{id}" in 2681 2748 let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"raw" ~value:raw]) in 2682 2749 let url = client.base_url ^ url_path ^ query in 2683 2750 let response = ··· 2699 2766 2700 2767 (** Update video player settings 2701 2768 2702 - Update player settings for a specific video *) 2703 - let update_video_player_settings ~body client () = 2769 + Update player settings for a specific video 2770 + @param id The object id, uuid or short uuid 2771 + *) 2772 + let update_video_player_settings ~id ~body client () = 2704 2773 let op_name = "update_video_player_settings" in 2705 - let url_path = "/api/v1/player-settings/videos/{id}" in 2774 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/player-settings/videos/{id}" in 2706 2775 let query = "" in 2707 2776 let url = client.base_url ^ url_path ^ query in 2708 2777 let response = ··· 2790 2859 (** Get channel player settings 2791 2860 2792 2861 Get player settings for a video channel. 2862 + @param channel_handle The video channel handle 2793 2863 @param raw Return raw settings without applying instance defaults 2794 2864 *) 2795 - let get_channel_player_settings ?raw client () = 2865 + let get_channel_player_settings ~channel_handle ?raw client () = 2796 2866 let op_name = "get_channel_player_settings" in 2797 - let url_path = "/api/v1/player-settings/video-channels/{channelHandle}" in 2867 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/player-settings/video-channels/{channelHandle}" in 2798 2868 let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"raw" ~value:raw]) in 2799 2869 let url = client.base_url ^ url_path ^ query in 2800 2870 let response = ··· 2816 2886 2817 2887 (** Update channel player settings 2818 2888 2819 - Update default player settings for a video channel. *) 2820 - let update_channel_player_settings ~body client () = 2889 + Update default player settings for a video channel. 2890 + @param channel_handle The video channel handle 2891 + *) 2892 + let update_channel_player_settings ~channel_handle ~body client () = 2821 2893 let op_name = "update_channel_player_settings" in 2822 - let url_path = "/api/v1/player-settings/video-channels/{channelHandle}" in 2894 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/player-settings/video-channels/{channelHandle}" in 2823 2895 let query = "" in 2824 2896 let url = client.base_url ^ url_path ^ query in 2825 2897 let response = ··· 3446 3518 3447 3519 (** Get live session of a replay 3448 3520 3449 - If the video is a replay of a live, you can find the associated live session using this endpoint *) 3450 - let get_api_v1_videos_live_session client () = 3521 + If the video is a replay of a live, you can find the associated live session using this endpoint 3522 + @param id The object id, uuid or short uuid 3523 + *) 3524 + let get_api_v1_videos_live_session ~id client () = 3451 3525 let op_name = "get_api_v1_videos_live_session" in 3452 - let url_path = "/api/v1/videos/{id}/live-session" in 3526 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/live-session" in 3453 3527 let query = "" in 3454 3528 let url = client.base_url ^ url_path ^ query in 3455 3529 let response = ··· 3566 3640 |> Jsont.Object.finish 3567 3641 end 3568 3642 3569 - (** Get information about a live *) 3570 - let get_live_id client () = 3643 + (** Get information about a live 3644 + @param id The object id, uuid or short uuid 3645 + *) 3646 + let get_live_id ~id client () = 3571 3647 let op_name = "get_live_id" in 3572 - let url_path = "/api/v1/videos/live/{id}" in 3648 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/live/{id}" in 3573 3649 let query = "" in 3574 3650 let url = client.base_url ^ url_path ^ query in 3575 3651 let response = ··· 3685 3761 3686 3762 (** List videos being mirrored 3687 3763 @param target direction of the mirror 3764 + @param start Offset used to paginate results 3765 + @param count Number of items to return 3766 + @param sort Sort abuses by criteria 3688 3767 *) 3689 - let get_mirrored_videos ~target client () = 3768 + let get_mirrored_videos ~target ?start ?count ?sort client () = 3690 3769 let op_name = "get_mirrored_videos" in 3691 3770 let url_path = "/api/v1/server/redundancy/videos" in 3692 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"target" ~value:target]) in 3771 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"target" ~value:target; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 3693 3772 let url = client.base_url ^ url_path ^ query in 3694 3773 let response = 3695 3774 try Requests.get client.session url ··· 3824 3903 end 3825 3904 3826 3905 (** Get video imports of my user 3906 + @param id Entity id 3907 + @param start Offset used to paginate results 3908 + @param count Number of items to return 3909 + @param sort Sort column 3910 + @param include_collaborations **PeerTube >= 8.0** Include objects from collaborated channels 3827 3911 @param video_id Filter on import video ID 3828 3912 @param target_url Filter on import target URL 3829 3913 @param video_channel_sync_id Filter on imports created by a specific channel synchronization 3830 3914 @param search Search in video names 3831 3915 *) 3832 - let get_api_v1_users_me_videos_imports ?video_id ?target_url ?video_channel_sync_id ?search client () = 3916 + let get_api_v1_users_me_videos_imports ~id ?start ?count ?sort ?include_collaborations ?video_id ?target_url ?video_channel_sync_id ?search client () = 3833 3917 let op_name = "get_api_v1_users_me_videos_imports" in 3834 - let url_path = "/api/v1/users/me/videos/imports" in 3835 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"videoId" ~value:video_id; Openapi.Runtime.Query.optional ~key:"targetUrl" ~value:target_url; Openapi.Runtime.Query.optional ~key:"videoChannelSyncId" ~value:video_channel_sync_id; Openapi.Runtime.Query.optional ~key:"search" ~value:search]) in 3918 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/users/me/videos/imports" in 3919 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"includeCollaborations" ~value:include_collaborations; Openapi.Runtime.Query.optional ~key:"videoId" ~value:video_id; Openapi.Runtime.Query.optional ~key:"targetUrl" ~value:target_url; Openapi.Runtime.Query.optional ~key:"videoChannelSyncId" ~value:video_channel_sync_id; Openapi.Runtime.Query.optional ~key:"search" ~value:search]) in 3836 3920 let url = client.base_url ^ url_path ^ query in 3837 3921 let response = 3838 3922 try Requests.get client.session url ··· 3917 4001 @param search_video_channel only list reports of a specific video channel 3918 4002 @param video_is only list deleted or blocklisted videos 3919 4003 @param filter only list account, comment or video reports 4004 + @param start Offset used to paginate results 4005 + @param count Number of items to return 4006 + @param sort Sort abuses by criteria 3920 4007 *) 3921 - let get_abuses ?id ?predefined_reason ?search ?state ?search_reporter ?search_reportee ?search_video ?search_video_channel ?video_is ?filter client () = 4008 + let get_abuses ?id ?predefined_reason ?search ?state ?search_reporter ?search_reportee ?search_video ?search_video_channel ?video_is ?filter ?start ?count ?sort client () = 3922 4009 let op_name = "get_abuses" in 3923 4010 let url_path = "/api/v1/abuses" in 3924 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"id" ~value:id; Openapi.Runtime.Query.optional ~key:"predefinedReason" ~value:predefined_reason; Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"state" ~value:state; Openapi.Runtime.Query.optional ~key:"searchReporter" ~value:search_reporter; Openapi.Runtime.Query.optional ~key:"searchReportee" ~value:search_reportee; Openapi.Runtime.Query.optional ~key:"searchVideo" ~value:search_video; Openapi.Runtime.Query.optional ~key:"searchVideoChannel" ~value:search_video_channel; Openapi.Runtime.Query.optional ~key:"videoIs" ~value:video_is; Openapi.Runtime.Query.optional ~key:"filter" ~value:filter]) in 4011 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"id" ~value:id; Openapi.Runtime.Query.optional ~key:"predefinedReason" ~value:predefined_reason; Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"state" ~value:state; Openapi.Runtime.Query.optional ~key:"searchReporter" ~value:search_reporter; Openapi.Runtime.Query.optional ~key:"searchReportee" ~value:search_reportee; Openapi.Runtime.Query.optional ~key:"searchVideo" ~value:search_video; Openapi.Runtime.Query.optional ~key:"searchVideoChannel" ~value:search_video_channel; Openapi.Runtime.Query.optional ~key:"videoIs" ~value:video_is; Openapi.Runtime.Query.optional ~key:"filter" ~value:filter; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 3925 4012 let url = client.base_url ^ url_path ^ query in 3926 4013 let response = 3927 4014 try Requests.get client.session url ··· 3963 4050 body = Requests.Response.text response; 3964 4051 }) 3965 4052 3966 - (** Update an abuse *) 3967 - let put_api_v1_abuses client () = 4053 + (** Update an abuse 4054 + @param abuse_id Abuse id 4055 + *) 4056 + let put_api_v1_abuses ~abuse_id client () = 3968 4057 let op_name = "put_api_v1_abuses" in 3969 - let url_path = "/api/v1/abuses/{abuseId}" in 4058 + let url_path = Openapi.Runtime.Path.render ~params:[("abuseId", abuse_id)] "/api/v1/abuses/{abuseId}" in 3970 4059 let query = "" in 3971 4060 let url = client.base_url ^ url_path ^ query in 3972 4061 let response = ··· 3986 4075 body = Requests.Response.text response; 3987 4076 }) 3988 4077 3989 - (** Delete an abuse *) 3990 - let delete_api_v1_abuses client () = 4078 + (** Delete an abuse 4079 + @param abuse_id Abuse id 4080 + *) 4081 + let delete_api_v1_abuses ~abuse_id client () = 3991 4082 let op_name = "delete_api_v1_abuses" in 3992 - let url_path = "/api/v1/abuses/{abuseId}" in 4083 + let url_path = Openapi.Runtime.Path.render ~params:[("abuseId", abuse_id)] "/api/v1/abuses/{abuseId}" in 3993 4084 let query = "" in 3994 4085 let url = client.base_url ^ url_path ^ query in 3995 4086 let response = ··· 4009 4100 body = Requests.Response.text response; 4010 4101 }) 4011 4102 4012 - (** List messages of an abuse *) 4013 - let get_api_v1_abuses_messages client () = 4103 + (** List messages of an abuse 4104 + @param abuse_id Abuse id 4105 + *) 4106 + let get_api_v1_abuses_messages ~abuse_id client () = 4014 4107 let op_name = "get_api_v1_abuses_messages" in 4015 - let url_path = "/api/v1/abuses/{abuseId}/messages" in 4108 + let url_path = Openapi.Runtime.Path.render ~params:[("abuseId", abuse_id)] "/api/v1/abuses/{abuseId}/messages" in 4016 4109 let query = "" in 4017 4110 let url = client.base_url ^ url_path ^ query in 4018 4111 let response = ··· 4032 4125 body = Requests.Response.text response; 4033 4126 }) 4034 4127 4035 - (** Add message to an abuse *) 4036 - let post_api_v1_abuses_messages client () = 4128 + (** Add message to an abuse 4129 + @param abuse_id Abuse id 4130 + *) 4131 + let post_api_v1_abuses_messages ~abuse_id client () = 4037 4132 let op_name = "post_api_v1_abuses_messages" in 4038 - let url_path = "/api/v1/abuses/{abuseId}/messages" in 4133 + let url_path = Openapi.Runtime.Path.render ~params:[("abuseId", abuse_id)] "/api/v1/abuses/{abuseId}/messages" in 4039 4134 let query = "" in 4040 4135 let url = client.base_url ^ url_path ^ query in 4041 4136 let response = ··· 4055 4150 body = Requests.Response.text response; 4056 4151 }) 4057 4152 4058 - (** Delete an abuse message *) 4059 - let delete_api_v1_abuses_messages client () = 4153 + (** Delete an abuse message 4154 + @param abuse_id Abuse id 4155 + @param abuse_message_id Abuse message id 4156 + *) 4157 + let delete_api_v1_abuses_messages ~abuse_id ~abuse_message_id client () = 4060 4158 let op_name = "delete_api_v1_abuses_messages" in 4061 - let url_path = "/api/v1/abuses/{abuseId}/messages/{abuseMessageId}" in 4159 + let url_path = Openapi.Runtime.Path.render ~params:[("abuseId", abuse_id); ("abuseMessageId", abuse_message_id)] "/api/v1/abuses/{abuseId}/messages/{abuseMessageId}" in 4062 4160 let query = "" in 4063 4161 let url = client.base_url ^ url_path ^ query in 4064 4162 let response = ··· 4078 4176 body = Requests.Response.text response; 4079 4177 }) 4080 4178 4081 - (** List accounts *) 4082 - let get_accounts client () = 4179 + (** List accounts 4180 + @param start Offset used to paginate results 4181 + @param count Number of items to return 4182 + @param sort Sort column 4183 + *) 4184 + let get_accounts ?start ?count ?sort client () = 4083 4185 let op_name = "get_accounts" in 4084 4186 let url_path = "/api/v1/accounts" in 4085 - let query = "" in 4187 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 4086 4188 let url = client.base_url ^ url_path ^ query in 4087 4189 let response = 4088 4190 try Requests.get client.session url ··· 4101 4203 body = Requests.Response.text response; 4102 4204 }) 4103 4205 4104 - (** List followers of an account *) 4105 - let get_account_followers client () = 4206 + (** List followers of an account 4207 + @param name The username or handle of the account 4208 + @param start Offset used to paginate results 4209 + @param count Number of items to return 4210 + @param sort Sort followers by criteria 4211 + @param search Plain text search, applied to various parts of the model depending on endpoint 4212 + *) 4213 + let get_account_followers ~name ?start ?count ?sort ?search client () = 4106 4214 let op_name = "get_account_followers" in 4107 - let url_path = "/api/v1/accounts/{name}/followers" in 4108 - let query = "" in 4215 + let url_path = Openapi.Runtime.Path.render ~params:[("name", name)] "/api/v1/accounts/{name}/followers" in 4216 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"search" ~value:search]) in 4109 4217 let url = client.base_url ^ url_path ^ query in 4110 4218 let response = 4111 4219 try Requests.get client.session url ··· 4125 4233 }) 4126 4234 4127 4235 (** List playlists of an account 4236 + @param name The username or handle of the account 4237 + @param start Offset used to paginate results 4238 + @param count Number of items to return 4239 + @param sort Sort column 4240 + @param search Plain text search, applied to various parts of the model depending on endpoint 4241 + @param include_collaborations **PeerTube >= 8.0** Include objects from collaborated channels 4128 4242 @param channel_name_one_of **PeerTube >= 8.0** Filter on playlists that are published on a channel with one of these names 4129 4243 *) 4130 - let get_api_v1_accounts_video_playlists ?channel_name_one_of client () = 4244 + let get_api_v1_accounts_video_playlists ~name ?start ?count ?sort ?search ?playlist_type ?include_collaborations ?channel_name_one_of client () = 4131 4245 let op_name = "get_api_v1_accounts_video_playlists" in 4132 - let url_path = "/api/v1/accounts/{name}/video-playlists" in 4133 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"channelNameOneOf" ~value:channel_name_one_of]) in 4246 + let url_path = Openapi.Runtime.Path.render ~params:[("name", name)] "/api/v1/accounts/{name}/video-playlists" in 4247 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"playlistType" ~value:playlist_type; Openapi.Runtime.Query.optional ~key:"includeCollaborations" ~value:include_collaborations; Openapi.Runtime.Query.optional ~key:"channelNameOneOf" ~value:channel_name_one_of]) in 4134 4248 let url = client.base_url ^ url_path ^ query in 4135 4249 let response = 4136 4250 try Requests.get client.session url ··· 4340 4454 }) 4341 4455 4342 4456 (** Delete instance logo *) 4343 - let delete_api_v1_config_instance_logo_logo_type client () = 4457 + let delete_api_v1_config_instance_logo_logo_type ~logo_type client () = 4344 4458 let op_name = "delete_api_v1_config_instance_logo_logo_type" in 4345 - let url_path = "/api/v1/config/instance-logo/:logoType" in 4459 + let url_path = Openapi.Runtime.Path.render ~params:[("logoType", logo_type)] "/api/v1/config/instance-logo/:logoType" in 4346 4460 let query = "" in 4347 4461 let url = client.base_url ^ url_path ^ query in 4348 4462 let response = ··· 4363 4477 }) 4364 4478 4365 4479 (** Update instance logo *) 4366 - let post_api_v1_config_instance_logo_logo_type_pick client () = 4480 + let post_api_v1_config_instance_logo_logo_type_pick ~logo_type client () = 4367 4481 let op_name = "post_api_v1_config_instance_logo_logo_type_pick" in 4368 - let url_path = "/api/v1/config/instance-logo/:logoType/pick" in 4482 + let url_path = Openapi.Runtime.Path.render ~params:[("logoType", logo_type)] "/api/v1/config/instance-logo/:logoType/pick" in 4369 4483 let query = "" in 4370 4484 let url = client.base_url ^ url_path ^ query in 4371 4485 let response = ··· 4456 4570 4457 4571 (** List instance jobs 4458 4572 @param state The state of the job ('' for for no filter) 4573 + @param job_type job type 4574 + @param start Offset used to paginate results 4575 + @param count Number of items to return 4576 + @param sort Sort column 4459 4577 *) 4460 - let get_jobs ~state client () = 4578 + let get_jobs ~state ?job_type ?start ?count ?sort client () = 4461 4579 let op_name = "get_jobs" in 4462 4580 let url_path = Openapi.Runtime.Path.render ~params:[("state", state)] "/api/v1/jobs/{state}" in 4463 - let query = "" in 4581 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"jobType" ~value:job_type; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 4464 4582 let url = client.base_url ^ url_path ^ query in 4465 4583 let response = 4466 4584 try Requests.get client.session url ··· 4573 4691 body = Requests.Response.text response; 4574 4692 }) 4575 4693 4576 - (** Get a plugin's public settings *) 4577 - let get_api_v1_plugins_public_settings client () = 4694 + (** Get a plugin's public settings 4695 + @param npm_name name of the plugin/theme on npmjs.com or in its package.json 4696 + *) 4697 + let get_api_v1_plugins_public_settings ~npm_name client () = 4578 4698 let op_name = "get_api_v1_plugins_public_settings" in 4579 - let url_path = "/api/v1/plugins/{npmName}/public-settings" in 4699 + let url_path = Openapi.Runtime.Path.render ~params:[("npmName", npm_name)] "/api/v1/plugins/{npmName}/public-settings" in 4580 4700 let query = "" in 4581 4701 let url = client.base_url ^ url_path ^ query in 4582 4702 let response = ··· 4596 4716 body = Requests.Response.text response; 4597 4717 }) 4598 4718 4599 - (** Get a plugin's registered settings *) 4600 - let get_api_v1_plugins_registered_settings client () = 4719 + (** Get a plugin's registered settings 4720 + @param npm_name name of the plugin/theme on npmjs.com or in its package.json 4721 + *) 4722 + let get_api_v1_plugins_registered_settings ~npm_name client () = 4601 4723 let op_name = "get_api_v1_plugins_registered_settings" in 4602 - let url_path = "/api/v1/plugins/{npmName}/registered-settings" in 4724 + let url_path = Openapi.Runtime.Path.render ~params:[("npmName", npm_name)] "/api/v1/plugins/{npmName}/registered-settings" in 4603 4725 let query = "" in 4604 4726 let url = client.base_url ^ url_path ^ query in 4605 4727 let response = ··· 4619 4741 body = Requests.Response.text response; 4620 4742 }) 4621 4743 4622 - (** Set a plugin's settings *) 4623 - let put_api_v1_plugins_settings client () = 4744 + (** Set a plugin's settings 4745 + @param npm_name name of the plugin/theme on npmjs.com or in its package.json 4746 + *) 4747 + let put_api_v1_plugins_settings ~npm_name client () = 4624 4748 let op_name = "put_api_v1_plugins_settings" in 4625 - let url_path = "/api/v1/plugins/{npmName}/settings" in 4749 + let url_path = Openapi.Runtime.Path.render ~params:[("npmName", npm_name)] "/api/v1/plugins/{npmName}/settings" in 4626 4750 let query = "" in 4627 4751 let url = client.base_url ^ url_path ^ query in 4628 4752 let response = ··· 4642 4766 body = Requests.Response.text response; 4643 4767 }) 4644 4768 4645 - (** List runners *) 4646 - let get_api_v1_runners client () = 4769 + (** List runners 4770 + @param start Offset used to paginate results 4771 + @param count Number of items to return 4772 + @param sort Sort runners by criteria 4773 + *) 4774 + let get_api_v1_runners ?start ?count ?sort client () = 4647 4775 let op_name = "get_api_v1_runners" in 4648 4776 let url_path = "/api/v1/runners" in 4649 - let query = "" in 4777 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 4650 4778 let url = client.base_url ^ url_path ^ query in 4651 4779 let response = 4652 4780 try Requests.get client.session url ··· 4665 4793 body = Requests.Response.text response; 4666 4794 }) 4667 4795 4668 - (** List jobs *) 4669 - let get_api_v1_runners_jobs ?state_one_of client () = 4796 + (** List jobs 4797 + @param start Offset used to paginate results 4798 + @param count Number of items to return 4799 + @param sort Sort runner jobs by criteria 4800 + @param search Plain text search, applied to various parts of the model depending on endpoint 4801 + *) 4802 + let get_api_v1_runners_jobs ?start ?count ?sort ?search ?state_one_of client () = 4670 4803 let op_name = "get_api_v1_runners_jobs" in 4671 4804 let url_path = "/api/v1/runners/jobs" in 4672 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"stateOneOf" ~value:state_one_of]) in 4805 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"stateOneOf" ~value:state_one_of]) in 4673 4806 let url = client.base_url ^ url_path ^ query in 4674 4807 let response = 4675 4808 try Requests.get client.session url ··· 4716 4849 (** Delete a job 4717 4850 4718 4851 The endpoint will first cancel the job if needed, and then remove it from the database. Children jobs will also be removed *) 4719 - let delete_api_v1_runners_jobs client () = 4852 + let delete_api_v1_runners_jobs ~job_uuid client () = 4720 4853 let op_name = "delete_api_v1_runners_jobs" in 4721 - let url_path = "/api/v1/runners/jobs/{jobUUID}" in 4854 + let url_path = Openapi.Runtime.Path.render ~params:[("jobUUID", job_uuid)] "/api/v1/runners/jobs/{jobUUID}" in 4722 4855 let query = "" in 4723 4856 let url = client.base_url ^ url_path ^ query in 4724 4857 let response = ··· 4741 4874 (** Abort job 4742 4875 4743 4876 API used by PeerTube runners *) 4744 - let post_api_v1_runners_jobs_abort client () = 4877 + let post_api_v1_runners_jobs_abort ~job_uuid client () = 4745 4878 let op_name = "post_api_v1_runners_jobs_abort" in 4746 - let url_path = "/api/v1/runners/jobs/{jobUUID}/abort" in 4879 + let url_path = Openapi.Runtime.Path.render ~params:[("jobUUID", job_uuid)] "/api/v1/runners/jobs/{jobUUID}/abort" in 4747 4880 let query = "" in 4748 4881 let url = client.base_url ^ url_path ^ query in 4749 4882 let response = ··· 4766 4899 (** Accept job 4767 4900 4768 4901 API used by PeerTube runners *) 4769 - let post_api_v1_runners_jobs_accept client () = 4902 + let post_api_v1_runners_jobs_accept ~job_uuid client () = 4770 4903 let op_name = "post_api_v1_runners_jobs_accept" in 4771 - let url_path = "/api/v1/runners/jobs/{jobUUID}/accept" in 4904 + let url_path = Openapi.Runtime.Path.render ~params:[("jobUUID", job_uuid)] "/api/v1/runners/jobs/{jobUUID}/accept" in 4772 4905 let query = "" in 4773 4906 let url = client.base_url ^ url_path ^ query in 4774 4907 let response = ··· 4789 4922 }) 4790 4923 4791 4924 (** Cancel a job *) 4792 - let get_api_v1_runners_jobs_cancel client () = 4925 + let get_api_v1_runners_jobs_cancel ~job_uuid client () = 4793 4926 let op_name = "get_api_v1_runners_jobs_cancel" in 4794 - let url_path = "/api/v1/runners/jobs/{jobUUID}/cancel" in 4927 + let url_path = Openapi.Runtime.Path.render ~params:[("jobUUID", job_uuid)] "/api/v1/runners/jobs/{jobUUID}/cancel" in 4795 4928 let query = "" in 4796 4929 let url = client.base_url ^ url_path ^ query in 4797 4930 let response = ··· 4814 4947 (** Post job error 4815 4948 4816 4949 API used by PeerTube runners *) 4817 - let post_api_v1_runners_jobs_error client () = 4950 + let post_api_v1_runners_jobs_error ~job_uuid client () = 4818 4951 let op_name = "post_api_v1_runners_jobs_error" in 4819 - let url_path = "/api/v1/runners/jobs/{jobUUID}/error" in 4952 + let url_path = Openapi.Runtime.Path.render ~params:[("jobUUID", job_uuid)] "/api/v1/runners/jobs/{jobUUID}/error" in 4820 4953 let query = "" in 4821 4954 let url = client.base_url ^ url_path ^ query in 4822 4955 let response = ··· 4839 4972 (** Post job success 4840 4973 4841 4974 API used by PeerTube runners *) 4842 - let post_api_v1_runners_jobs_success client () = 4975 + let post_api_v1_runners_jobs_success ~job_uuid client () = 4843 4976 let op_name = "post_api_v1_runners_jobs_success" in 4844 - let url_path = "/api/v1/runners/jobs/{jobUUID}/success" in 4977 + let url_path = Openapi.Runtime.Path.render ~params:[("jobUUID", job_uuid)] "/api/v1/runners/jobs/{jobUUID}/success" in 4845 4978 let query = "" in 4846 4979 let url = client.base_url ^ url_path ^ query in 4847 4980 let response = ··· 4864 4997 (** Update job 4865 4998 4866 4999 API used by PeerTube runners *) 4867 - let post_api_v1_runners_jobs_update client () = 5000 + let post_api_v1_runners_jobs_update ~job_uuid client () = 4868 5001 let op_name = "post_api_v1_runners_jobs_update" in 4869 - let url_path = "/api/v1/runners/jobs/{jobUUID}/update" in 5002 + let url_path = Openapi.Runtime.Path.render ~params:[("jobUUID", job_uuid)] "/api/v1/runners/jobs/{jobUUID}/update" in 4870 5003 let query = "" in 4871 5004 let url = client.base_url ^ url_path ^ query in 4872 5005 let response = ··· 4911 5044 body = Requests.Response.text response; 4912 5045 }) 4913 5046 4914 - (** List registration tokens *) 4915 - let get_api_v1_runners_registration_tokens client () = 5047 + (** List registration tokens 5048 + @param start Offset used to paginate results 5049 + @param count Number of items to return 5050 + @param sort Sort registration tokens by criteria 5051 + *) 5052 + let get_api_v1_runners_registration_tokens ?start ?count ?sort client () = 4916 5053 let op_name = "get_api_v1_runners_registration_tokens" in 4917 5054 let url_path = "/api/v1/runners/registration-tokens" in 4918 - let query = "" in 5055 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 4919 5056 let url = client.base_url ^ url_path ^ query in 4920 5057 let response = 4921 5058 try Requests.get client.session url ··· 4962 5099 (** Remove registration token 4963 5100 4964 5101 Remove a registration token. Runners that used this token for their registration are automatically removed. *) 4965 - let delete_api_v1_runners_registration_tokens client () = 5102 + let delete_api_v1_runners_registration_tokens ~registration_token_id client () = 4966 5103 let op_name = "delete_api_v1_runners_registration_tokens" in 4967 - let url_path = "/api/v1/runners/registration-tokens/{registrationTokenId}" in 5104 + let url_path = Openapi.Runtime.Path.render ~params:[("registrationTokenId", registration_token_id)] "/api/v1/runners/registration-tokens/{registrationTokenId}" in 4968 5105 let query = "" in 4969 5106 let url = client.base_url ^ url_path ^ query in 4970 5107 let response = ··· 5010 5147 }) 5011 5148 5012 5149 (** Delete a runner *) 5013 - let delete_api_v1_runners client () = 5150 + let delete_api_v1_runners ~runner_id client () = 5014 5151 let op_name = "delete_api_v1_runners" in 5015 - let url_path = "/api/v1/runners/{runnerId}" in 5152 + let url_path = Openapi.Runtime.Path.render ~params:[("runnerId", runner_id)] "/api/v1/runners/{runnerId}" in 5016 5153 let query = "" in 5017 5154 let url = client.base_url ^ url_path ^ query in 5018 5155 let response = ··· 5035 5172 (** Search playlists 5036 5173 @param search 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 playlist information and interact with it. 5037 5174 5175 + @param start Offset used to paginate results 5176 + @param count Number of items to return 5177 + @param search_target If the administrator enabled search index support, you can override the default search target. 5178 + 5179 + **Warning**: If you choose to make an index search, PeerTube will get results from a third party service. It means the instance may not yet know the objects you fetched. If you want to load video/channel information: 5180 + * If the current user has the ability to make a remote URI search (this information is available in the config endpoint), 5181 + then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. 5182 + After that, you can use the classic REST API endpoints to fetch the complete object or interact with it 5183 + * If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch 5184 + the data from the origin instance API 5185 + 5186 + @param sort Sort column 5187 + @param host Find elements owned by this host 5188 + @param uuids Find elements with specific UUIDs 5038 5189 *) 5039 - let search_playlists ~search client () = 5190 + let search_playlists ~search ?start ?count ?search_target ?sort ?host ?uuids client () = 5040 5191 let op_name = "search_playlists" in 5041 5192 let url_path = "/api/v1/search/video-playlists" in 5042 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"search" ~value:search]) in 5193 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"searchTarget" ~value:search_target; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"host" ~value:host; Openapi.Runtime.Query.optional ~key:"uuids" ~value:uuids]) in 5043 5194 let url = client.base_url ^ url_path ^ query in 5044 5195 let response = 5045 5196 try Requests.get client.session url ··· 5081 5232 body = Requests.Response.text response; 5082 5233 }) 5083 5234 5084 - (** List account blocks *) 5085 - let get_api_v1_server_blocklist_accounts client () = 5235 + (** List account blocks 5236 + @param start Offset used to paginate results 5237 + @param count Number of items to return 5238 + @param sort Sort column 5239 + *) 5240 + let get_api_v1_server_blocklist_accounts ?start ?count ?sort client () = 5086 5241 let op_name = "get_api_v1_server_blocklist_accounts" in 5087 5242 let url_path = "/api/v1/server/blocklist/accounts" in 5088 - let query = "" in 5243 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 5089 5244 let url = client.base_url ^ url_path ^ query in 5090 5245 let response = 5091 5246 try Requests.get client.session url ··· 5152 5307 body = Requests.Response.text response; 5153 5308 }) 5154 5309 5155 - (** List server blocks *) 5156 - let get_api_v1_server_blocklist_servers client () = 5310 + (** List server blocks 5311 + @param start Offset used to paginate results 5312 + @param count Number of items to return 5313 + @param sort Sort column 5314 + *) 5315 + let get_api_v1_server_blocklist_servers ?start ?count ?sort client () = 5157 5316 let op_name = "get_api_v1_server_blocklist_servers" in 5158 5317 let url_path = "/api/v1/server/blocklist/servers" in 5159 - let query = "" in 5318 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 5160 5319 let url = client.base_url ^ url_path ^ query in 5161 5320 let response = 5162 5321 try Requests.get client.session url ··· 5223 5382 body = Requests.Response.text response; 5224 5383 }) 5225 5384 5226 - (** List instances following the server *) 5227 - let get_api_v1_server_followers client () = 5385 + (** List instances following the server 5386 + @param start Offset used to paginate results 5387 + @param count Number of items to return 5388 + @param sort Sort column 5389 + *) 5390 + let get_api_v1_server_followers ?state ?actor_type ?start ?count ?sort client () = 5228 5391 let op_name = "get_api_v1_server_followers" in 5229 5392 let url_path = "/api/v1/server/followers" in 5230 - let query = "" in 5393 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"state" ~value:state; Openapi.Runtime.Query.optional ~key:"actorType" ~value:actor_type; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 5231 5394 let url = client.base_url ^ url_path ^ query in 5232 5395 let response = 5233 5396 try Requests.get client.session url ··· 5321 5484 body = Requests.Response.text response; 5322 5485 }) 5323 5486 5324 - (** List instances followed by the server *) 5325 - let get_api_v1_server_following client () = 5487 + (** List instances followed by the server 5488 + @param start Offset used to paginate results 5489 + @param count Number of items to return 5490 + @param sort Sort column 5491 + *) 5492 + let get_api_v1_server_following ?state ?actor_type ?start ?count ?sort client () = 5326 5493 let op_name = "get_api_v1_server_following" in 5327 5494 let url_path = "/api/v1/server/following" in 5328 - let query = "" in 5495 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"state" ~value:state; Openapi.Runtime.Query.optional ~key:"actorType" ~value:actor_type; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 5329 5496 let url = client.base_url ^ url_path ^ query in 5330 5497 let response = 5331 5498 try Requests.get client.session url ··· 5584 5751 5585 5752 (** List my abuses 5586 5753 @param id only list the report with this id 5754 + @param sort Sort abuses by criteria 5755 + @param start Offset used to paginate results 5756 + @param count Number of items to return 5587 5757 *) 5588 - let get_my_abuses ?id ?state client () = 5758 + let get_my_abuses ?id ?state ?sort ?start ?count client () = 5589 5759 let op_name = "get_my_abuses" in 5590 5760 let url_path = "/api/v1/users/me/abuses" in 5591 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"id" ~value:id; Openapi.Runtime.Query.optional ~key:"state" ~value:state]) in 5761 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"id" ~value:id; Openapi.Runtime.Query.optional ~key:"state" ~value:state; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count]) in 5592 5762 let url = client.base_url ^ url_path ^ query in 5593 5763 let response = 5594 5764 try Requests.get client.session url ··· 5816 5986 body = Requests.Response.text response; 5817 5987 }) 5818 5988 5819 - (** Get if subscriptions exist for my user *) 5820 - let get_api_v1_users_me_subscriptions_exist client () = 5989 + (** Get if subscriptions exist for my user 5990 + @param uris list of uris to check if each is part of the user subscriptions 5991 + *) 5992 + let get_api_v1_users_me_subscriptions_exist ~uris client () = 5821 5993 let op_name = "get_api_v1_users_me_subscriptions_exist" in 5822 5994 let url_path = "/api/v1/users/me/subscriptions/exist" in 5823 - let query = "" in 5995 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"uris" ~value:uris]) in 5824 5996 let url = client.base_url ^ url_path ^ query in 5825 5997 let response = 5826 5998 try Requests.get client.session url ··· 5839 6011 body = Requests.Response.text response; 5840 6012 }) 5841 6013 5842 - (** Delete subscription of my user *) 5843 - let delete_api_v1_users_me_subscriptions client () = 6014 + (** Delete subscription of my user 6015 + @param subscription_handle The subscription handle 6016 + *) 6017 + let delete_api_v1_users_me_subscriptions ~subscription_handle client () = 5844 6018 let op_name = "delete_api_v1_users_me_subscriptions" in 5845 - let url_path = "/api/v1/users/me/subscriptions/{subscriptionHandle}" in 6019 + let url_path = Openapi.Runtime.Path.render ~params:[("subscriptionHandle", subscription_handle)] "/api/v1/users/me/subscriptions/{subscriptionHandle}" in 5846 6020 let query = "" in 5847 6021 let url = client.base_url ^ url_path ^ query in 5848 6022 let response = ··· 5912 6086 5913 6087 (** List comments on user's videos 5914 6088 5915 - **PeerTube >= 6.2** *) 5916 - let get_api_v1_users_me_videos_comments client () = 6089 + **PeerTube >= 6.2** 6090 + @param search Plain text search, applied to various parts of the model depending on endpoint 6091 + @param search_account Filter comments by searching on the account 6092 + @param search_video Filter comments by searching on the video 6093 + @param video_id Limit results on this specific video 6094 + @param video_channel_id Limit results on this specific video channel 6095 + @param auto_tag_one_of **PeerTube >= 6.2** filter on comments that contain one of these automatic tags 6096 + @param is_held_for_review only display comments that are held for review 6097 + @param include_collaborations **PeerTube >= 8.0** Include objects from collaborated channels 6098 + *) 6099 + let get_api_v1_users_me_videos_comments ?search ?search_account ?search_video ?video_id ?video_channel_id ?auto_tag_one_of ?is_held_for_review ?include_collaborations client () = 5917 6100 let op_name = "get_api_v1_users_me_videos_comments" in 5918 6101 let url_path = "/api/v1/users/me/videos/comments" in 5919 - let query = "" in 6102 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"searchAccount" ~value:search_account; Openapi.Runtime.Query.optional ~key:"searchVideo" ~value:search_video; Openapi.Runtime.Query.optional ~key:"videoId" ~value:video_id; Openapi.Runtime.Query.optional ~key:"videoChannelId" ~value:video_channel_id; Openapi.Runtime.Query.optional ~key:"autoTagOneOf" ~value:auto_tag_one_of; Openapi.Runtime.Query.optional ~key:"isHeldForReview" ~value:is_held_for_review; Openapi.Runtime.Query.optional ~key:"includeCollaborations" ~value:include_collaborations]) in 5920 6103 let url = client.base_url ^ url_path ^ query in 5921 6104 let response = 5922 6105 try Requests.get client.session url ··· 5960 6143 body = Requests.Response.text response; 5961 6144 }) 5962 6145 5963 - (** List registrations *) 5964 - let list_registrations ?search ?sort client () = 6146 + (** List registrations 6147 + @param start Offset used to paginate results 6148 + @param count Number of items to return 6149 + *) 6150 + let list_registrations ?start ?count ?search ?sort client () = 5965 6151 let op_name = "list_registrations" in 5966 6152 let url_path = "/api/v1/users/registrations" in 5967 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 6153 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 5968 6154 let url = client.base_url ^ url_path ^ query in 5969 6155 let response = 5970 6156 try Requests.get client.session url ··· 6008 6194 6009 6195 (** Delete registration 6010 6196 6011 - Delete the registration entry. It will not remove the user associated with this registration (if any) *) 6012 - let delete_registration client () = 6197 + Delete the registration entry. It will not remove the user associated with this registration (if any) 6198 + @param registration_id Registration ID 6199 + *) 6200 + let delete_registration ~registration_id client () = 6013 6201 let op_name = "delete_registration" in 6014 - let url_path = "/api/v1/users/registrations/{registrationId}" in 6202 + let url_path = Openapi.Runtime.Path.render ~params:[("registrationId", registration_id)] "/api/v1/users/registrations/{registrationId}" in 6015 6203 let query = "" in 6016 6204 let url = client.base_url ^ url_path ^ query in 6017 6205 let response = ··· 6031 6219 body = Requests.Response.text response; 6032 6220 }) 6033 6221 6034 - (** Accept registration *) 6035 - let accept_registration ~body client () = 6222 + (** Accept registration 6223 + @param registration_id Registration ID 6224 + *) 6225 + let accept_registration ~registration_id ~body client () = 6036 6226 let op_name = "accept_registration" in 6037 - let url_path = "/api/v1/users/registrations/{registrationId}/accept" in 6227 + let url_path = Openapi.Runtime.Path.render ~params:[("registrationId", registration_id)] "/api/v1/users/registrations/{registrationId}/accept" in 6038 6228 let query = "" in 6039 6229 let url = client.base_url ^ url_path ^ query in 6040 6230 let response = ··· 6054 6244 body = Requests.Response.text response; 6055 6245 }) 6056 6246 6057 - (** Reject registration *) 6058 - let reject_registration ~body client () = 6247 + (** Reject registration 6248 + @param registration_id Registration ID 6249 + *) 6250 + let reject_registration ~registration_id ~body client () = 6059 6251 let op_name = "reject_registration" in 6060 - let url_path = "/api/v1/users/registrations/{registrationId}/reject" in 6252 + let url_path = Openapi.Runtime.Path.render ~params:[("registrationId", registration_id)] "/api/v1/users/registrations/{registrationId}/reject" in 6061 6253 let query = "" in 6062 6254 let url = client.base_url ^ url_path ^ query in 6063 6255 let response = ··· 6081 6273 6082 6274 Following a user registration request, the user will receive an email asking to click a link 6083 6275 containing a secret. 6084 - *) 6085 - let verify_registration_email client () = 6276 + 6277 + @param registration_id Registration ID 6278 + *) 6279 + let verify_registration_email ~registration_id client () = 6086 6280 let op_name = "verify_registration_email" in 6087 - let url_path = "/api/v1/users/registrations/{registrationId}/verify-email" in 6281 + let url_path = Openapi.Runtime.Path.render ~params:[("registrationId", registration_id)] "/api/v1/users/registrations/{registrationId}/verify-email" in 6088 6282 let query = "" in 6089 6283 let url = client.base_url ^ url_path ^ query in 6090 6284 let response = ··· 6155 6349 }) 6156 6350 6157 6351 (** Get a user 6352 + @param id Entity id 6158 6353 @param with_stats include statistics about the user (only available as a moderator/admin) 6159 6354 *) 6160 - let get_user ?with_stats client () = 6355 + let get_user ~id ?with_stats client () = 6161 6356 let op_name = "get_user" in 6162 - let url_path = "/api/v1/users/{id}" in 6357 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/users/{id}" in 6163 6358 let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"withStats" ~value:with_stats]) in 6164 6359 let url = client.base_url ^ url_path ^ query in 6165 6360 let response = ··· 6179 6374 body = Requests.Response.text response; 6180 6375 }) 6181 6376 6182 - (** Update a user *) 6183 - let put_user ~body client () = 6377 + (** Update a user 6378 + @param id Entity id 6379 + *) 6380 + let put_user ~id ~body client () = 6184 6381 let op_name = "put_user" in 6185 - let url_path = "/api/v1/users/{id}" in 6382 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/users/{id}" in 6186 6383 let query = "" in 6187 6384 let url = client.base_url ^ url_path ^ query in 6188 6385 let response = ··· 6202 6399 body = Requests.Response.text response; 6203 6400 }) 6204 6401 6205 - (** Delete a user *) 6206 - let del_user client () = 6402 + (** Delete a user 6403 + @param id Entity id 6404 + *) 6405 + let del_user ~id client () = 6207 6406 let op_name = "del_user" in 6208 - let url_path = "/api/v1/users/{id}" in 6407 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/users/{id}" in 6209 6408 let query = "" in 6210 6409 let url = client.base_url ^ url_path ^ query in 6211 6410 let response = ··· 6225 6424 body = Requests.Response.text response; 6226 6425 }) 6227 6426 6228 - (** Reset password *) 6229 - let post_api_v1_users_reset_password client () = 6427 + (** Reset password 6428 + @param id Entity id 6429 + *) 6430 + let post_api_v1_users_reset_password ~id client () = 6230 6431 let op_name = "post_api_v1_users_reset_password" in 6231 - let url_path = "/api/v1/users/{id}/reset-password" in 6432 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/users/{id}/reset-password" in 6232 6433 let query = "" in 6233 6434 let url = client.base_url ^ url_path ^ query in 6234 6435 let response = ··· 6248 6449 body = Requests.Response.text response; 6249 6450 }) 6250 6451 6251 - (** List token sessions *) 6252 - let get_api_v1_users_token_sessions client () = 6452 + (** List token sessions 6453 + @param id Entity id 6454 + *) 6455 + let get_api_v1_users_token_sessions ~id client () = 6253 6456 let op_name = "get_api_v1_users_token_sessions" in 6254 - let url_path = "/api/v1/users/{id}/token-sessions" in 6457 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/users/{id}/token-sessions" in 6255 6458 let query = "" in 6256 6459 let url = client.base_url ^ url_path ^ query in 6257 6460 let response = ··· 6271 6474 body = Requests.Response.text response; 6272 6475 }) 6273 6476 6274 - (** List token sessions *) 6275 - let get_api_v1_users_token_sessions_revoke client () = 6477 + (** List token sessions 6478 + @param id Entity id 6479 + @param token_session_id Token session Id 6480 + *) 6481 + let get_api_v1_users_token_sessions_revoke ~id ~token_session_id client () = 6276 6482 let op_name = "get_api_v1_users_token_sessions_revoke" in 6277 - let url_path = "/api/v1/users/{id}/token-sessions/{tokenSessionId}/revoke" in 6483 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id); ("tokenSessionId", token_session_id)] "/api/v1/users/{id}/token-sessions/{tokenSessionId}/revoke" in 6278 6484 let query = "" in 6279 6485 let url = client.base_url ^ url_path ^ query in 6280 6486 let response = ··· 6296 6502 6297 6503 (** Confirm two factor auth 6298 6504 6299 - Confirm a two factor authentication request *) 6300 - let confirm_two_factor_request client () = 6505 + Confirm a two factor authentication request 6506 + @param id Entity id 6507 + *) 6508 + let confirm_two_factor_request ~id client () = 6301 6509 let op_name = "confirm_two_factor_request" in 6302 - let url_path = "/api/v1/users/{id}/two-factor/confirm-request" in 6510 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/users/{id}/two-factor/confirm-request" in 6303 6511 let query = "" in 6304 6512 let url = client.base_url ^ url_path ^ query in 6305 6513 let response = ··· 6321 6529 6322 6530 (** Disable two factor auth 6323 6531 6324 - Disable two factor authentication of a user *) 6325 - let disable_two_factor client () = 6532 + Disable two factor authentication of a user 6533 + @param id Entity id 6534 + *) 6535 + let disable_two_factor ~id client () = 6326 6536 let op_name = "disable_two_factor" in 6327 - let url_path = "/api/v1/users/{id}/two-factor/disable" in 6537 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/users/{id}/two-factor/disable" in 6328 6538 let query = "" in 6329 6539 let url = client.base_url ^ url_path ^ query in 6330 6540 let response = ··· 6349 6559 Following a user registration, the new user will receive an email asking to click a link 6350 6560 containing a secret. 6351 6561 This endpoint can also be used to verify a new email set in the user account. 6352 - *) 6353 - let verify_user client () = 6562 + 6563 + @param id Entity id 6564 + *) 6565 + let verify_user ~id client () = 6354 6566 let op_name = "verify_user" in 6355 - let url_path = "/api/v1/users/{id}/verify-email" in 6567 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/users/{id}/verify-email" in 6356 6568 let query = "" in 6357 6569 let url = client.base_url ^ url_path ^ query in 6358 6570 let response = ··· 6374 6586 6375 6587 (** List user exports 6376 6588 6377 - **PeerTube >= 6.1** *) 6378 - let list_user_exports client () = 6589 + **PeerTube >= 6.1** 6590 + @param user_id User id 6591 + *) 6592 + let list_user_exports ~user_id client () = 6379 6593 let op_name = "list_user_exports" in 6380 - let url_path = "/api/v1/users/{userId}/exports" in 6594 + let url_path = Openapi.Runtime.Path.render ~params:[("userId", user_id)] "/api/v1/users/{userId}/exports" in 6381 6595 let query = "" in 6382 6596 let url = client.base_url ^ url_path ^ query in 6383 6597 let response = ··· 6399 6613 6400 6614 (** Request user export 6401 6615 6402 - Request an archive of user data. An email is sent when the archive is ready. *) 6403 - let request_user_export client () = 6616 + Request an archive of user data. An email is sent when the archive is ready. 6617 + @param user_id User id 6618 + *) 6619 + let request_user_export ~user_id client () = 6404 6620 let op_name = "request_user_export" in 6405 - let url_path = "/api/v1/users/{userId}/exports/request" in 6621 + let url_path = Openapi.Runtime.Path.render ~params:[("userId", user_id)] "/api/v1/users/{userId}/exports/request" in 6406 6622 let query = "" in 6407 6623 let url = client.base_url ^ url_path ^ query in 6408 6624 let response = ··· 6424 6640 6425 6641 (** Delete a user export 6426 6642 6427 - **PeerTube >= 6.1** *) 6428 - let delete_user_export client () = 6643 + **PeerTube >= 6.1** 6644 + @param user_id User id 6645 + @param id Entity id 6646 + *) 6647 + let delete_user_export ~user_id ~id client () = 6429 6648 let op_name = "delete_user_export" in 6430 - let url_path = "/api/v1/users/{userId}/exports/{id}" in 6649 + let url_path = Openapi.Runtime.Path.render ~params:[("userId", user_id); ("id", id)] "/api/v1/users/{userId}/exports/{id}" in 6431 6650 let query = "" in 6432 6651 let url = client.base_url ^ url_path ^ query in 6433 6652 let response = ··· 6449 6668 6450 6669 (** Initialize the resumable user import 6451 6670 6452 - **PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the import of the archive *) 6453 - let user_import_resumable_init ~body client () = 6671 + **PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the import of the archive 6672 + @param user_id User id 6673 + *) 6674 + let user_import_resumable_init ~user_id ~body client () = 6454 6675 let op_name = "user_import_resumable_init" in 6455 - let url_path = "/api/v1/users/{userId}/imports/import-resumable" in 6676 + let url_path = Openapi.Runtime.Path.render ~params:[("userId", user_id)] "/api/v1/users/{userId}/imports/import-resumable" in 6456 6677 let query = "" in 6457 6678 let url = client.base_url ^ url_path ^ query in 6458 6679 let response = ··· 6474 6695 6475 6696 (** Send chunk for the resumable user import 6476 6697 6477 - **PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the import of the archive *) 6478 - let user_import_resumable client () = 6698 + **PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the import of the archive 6699 + @param user_id User id 6700 + @param upload_id Created session id to proceed with. If you didn't send chunks in the last hour, it is 6701 + not valid anymore and you need to initialize a new upload. 6702 + 6703 + *) 6704 + let user_import_resumable ~user_id ~upload_id client () = 6479 6705 let op_name = "user_import_resumable" in 6480 - let url_path = "/api/v1/users/{userId}/imports/import-resumable" in 6481 - let query = "" in 6706 + let url_path = Openapi.Runtime.Path.render ~params:[("userId", user_id)] "/api/v1/users/{userId}/imports/import-resumable" in 6707 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"upload_id" ~value:upload_id]) in 6482 6708 let url = client.base_url ^ url_path ^ query in 6483 6709 let response = 6484 6710 try Requests.put client.session url ··· 6499 6725 6500 6726 (** Cancel the resumable user import 6501 6727 6502 - **PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the resumable user import *) 6503 - let user_import_resumable_cancel client () = 6728 + **PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the resumable user import 6729 + @param user_id User id 6730 + @param upload_id Created session id to proceed with. If you didn't send chunks in the last hour, it is 6731 + not valid anymore and you need to initialize a new upload. 6732 + 6733 + *) 6734 + let user_import_resumable_cancel ~user_id ~upload_id client () = 6504 6735 let op_name = "user_import_resumable_cancel" in 6505 - let url_path = "/api/v1/users/{userId}/imports/import-resumable" in 6506 - let query = "" in 6736 + let url_path = Openapi.Runtime.Path.render ~params:[("userId", user_id)] "/api/v1/users/{userId}/imports/import-resumable" in 6737 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"upload_id" ~value:upload_id]) in 6507 6738 let url = client.base_url ^ url_path ^ query in 6508 6739 let response = 6509 6740 try Requests.delete client.session url ··· 6524 6755 6525 6756 (** Get latest user import 6526 6757 6527 - **PeerTube >= 6.1** *) 6528 - let get_latest_user_import client () = 6758 + **PeerTube >= 6.1** 6759 + @param user_id User id 6760 + *) 6761 + let get_latest_user_import ~user_id client () = 6529 6762 let op_name = "get_latest_user_import" in 6530 - let url_path = "/api/v1/users/{userId}/imports/latest" in 6763 + let url_path = Openapi.Runtime.Path.render ~params:[("userId", user_id)] "/api/v1/users/{userId}/imports/latest" in 6531 6764 let query = "" in 6532 6765 let url = client.base_url ^ url_path ^ query in 6533 6766 let response = ··· 6570 6803 body = Requests.Response.text response; 6571 6804 }) 6572 6805 6573 - (** Delete a video channel synchronization *) 6574 - let del_video_channel_sync client () = 6806 + (** Delete a video channel synchronization 6807 + @param channel_sync_id Channel Sync id 6808 + *) 6809 + let del_video_channel_sync ~channel_sync_id client () = 6575 6810 let op_name = "del_video_channel_sync" in 6576 - let url_path = "/api/v1/video-channel-syncs/{channelSyncId}" in 6811 + let url_path = Openapi.Runtime.Path.render ~params:[("channelSyncId", channel_sync_id)] "/api/v1/video-channel-syncs/{channelSyncId}" in 6577 6812 let query = "" in 6578 6813 let url = client.base_url ^ url_path ^ query in 6579 6814 let response = ··· 6593 6828 body = Requests.Response.text response; 6594 6829 }) 6595 6830 6596 - (** Triggers the channel synchronization job, fetching all the videos from the remote channel *) 6597 - let trigger_video_channel_sync client () = 6831 + (** Triggers the channel synchronization job, fetching all the videos from the remote channel 6832 + @param channel_sync_id Channel Sync id 6833 + *) 6834 + let trigger_video_channel_sync ~channel_sync_id client () = 6598 6835 let op_name = "trigger_video_channel_sync" in 6599 - let url_path = "/api/v1/video-channel-syncs/{channelSyncId}/sync" in 6836 + let url_path = Openapi.Runtime.Path.render ~params:[("channelSyncId", channel_sync_id)] "/api/v1/video-channel-syncs/{channelSyncId}/sync" in 6600 6837 let query = "" in 6601 6838 let url = client.base_url ^ url_path ^ query in 6602 6839 let response = ··· 6639 6876 body = Requests.Response.text response; 6640 6877 }) 6641 6878 6642 - (** Update a video channel *) 6643 - let put_video_channel ~body client () = 6879 + (** Update a video channel 6880 + @param channel_handle The video channel handle 6881 + *) 6882 + let put_video_channel ~channel_handle ~body client () = 6644 6883 let op_name = "put_video_channel" in 6645 - let url_path = "/api/v1/video-channels/{channelHandle}" in 6884 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}" in 6646 6885 let query = "" in 6647 6886 let url = client.base_url ^ url_path ^ query in 6648 6887 let response = ··· 6662 6901 body = Requests.Response.text response; 6663 6902 }) 6664 6903 6665 - (** Delete a video channel *) 6666 - let del_video_channel client () = 6904 + (** Delete a video channel 6905 + @param channel_handle The video channel handle 6906 + *) 6907 + let del_video_channel ~channel_handle client () = 6667 6908 let op_name = "del_video_channel" in 6668 - let url_path = "/api/v1/video-channels/{channelHandle}" in 6909 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}" in 6669 6910 let query = "" in 6670 6911 let url = client.base_url ^ url_path ^ query in 6671 6912 let response = ··· 6685 6926 body = Requests.Response.text response; 6686 6927 }) 6687 6928 6688 - (** Delete channel avatar *) 6689 - let delete_api_v1_video_channels_avatar client () = 6929 + (** Delete channel avatar 6930 + @param channel_handle The video channel handle 6931 + *) 6932 + let delete_api_v1_video_channels_avatar ~channel_handle client () = 6690 6933 let op_name = "delete_api_v1_video_channels_avatar" in 6691 - let url_path = "/api/v1/video-channels/{channelHandle}/avatar" in 6934 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}/avatar" in 6692 6935 let query = "" in 6693 6936 let url = client.base_url ^ url_path ^ query in 6694 6937 let response = ··· 6708 6951 body = Requests.Response.text response; 6709 6952 }) 6710 6953 6711 - (** Update channel avatar *) 6712 - let post_api_v1_video_channels_avatar_pick client () = 6954 + (** Update channel avatar 6955 + @param channel_handle The video channel handle 6956 + *) 6957 + let post_api_v1_video_channels_avatar_pick ~channel_handle client () = 6713 6958 let op_name = "post_api_v1_video_channels_avatar_pick" in 6714 - let url_path = "/api/v1/video-channels/{channelHandle}/avatar/pick" in 6959 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}/avatar/pick" in 6715 6960 let query = "" in 6716 6961 let url = client.base_url ^ url_path ^ query in 6717 6962 let response = ··· 6731 6976 body = Requests.Response.text response; 6732 6977 }) 6733 6978 6734 - (** Delete channel banner *) 6735 - let delete_api_v1_video_channels_banner client () = 6979 + (** Delete channel banner 6980 + @param channel_handle The video channel handle 6981 + *) 6982 + let delete_api_v1_video_channels_banner ~channel_handle client () = 6736 6983 let op_name = "delete_api_v1_video_channels_banner" in 6737 - let url_path = "/api/v1/video-channels/{channelHandle}/banner" in 6984 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}/banner" in 6738 6985 let query = "" in 6739 6986 let url = client.base_url ^ url_path ^ query in 6740 6987 let response = ··· 6754 7001 body = Requests.Response.text response; 6755 7002 }) 6756 7003 6757 - (** Update channel banner *) 6758 - let post_api_v1_video_channels_banner_pick client () = 7004 + (** Update channel banner 7005 + @param channel_handle The video channel handle 7006 + *) 7007 + let post_api_v1_video_channels_banner_pick ~channel_handle client () = 6759 7008 let op_name = "post_api_v1_video_channels_banner_pick" in 6760 - let url_path = "/api/v1/video-channels/{channelHandle}/banner/pick" in 7009 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}/banner/pick" in 6761 7010 let query = "" in 6762 7011 let url = client.base_url ^ url_path ^ query in 6763 7012 let response = ··· 6779 7028 6780 7029 (** *List channel collaborators 6781 7030 6782 - **PeerTube >= 8.0** *) 6783 - let list_video_channel_collaborators client () = 7031 + **PeerTube >= 8.0** 7032 + @param channel_handle The video channel handle 7033 + *) 7034 + let list_video_channel_collaborators ~channel_handle client () = 6784 7035 let op_name = "list_video_channel_collaborators" in 6785 - let url_path = "/api/v1/video-channels/{channelHandle}/collaborators" in 7036 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}/collaborators" in 6786 7037 let query = "" in 6787 7038 let url = client.base_url ^ url_path ^ query in 6788 7039 let response = ··· 6804 7055 6805 7056 (** Invite a collaborator 6806 7057 6807 - **PeerTube >= 8.0** Invite a local user to collaborate on the specified video channel. *) 6808 - let invite_video_channel_collaborator client () = 7058 + **PeerTube >= 8.0** Invite a local user to collaborate on the specified video channel. 7059 + @param channel_handle The video channel handle 7060 + *) 7061 + let invite_video_channel_collaborator ~channel_handle client () = 6809 7062 let op_name = "invite_video_channel_collaborator" in 6810 - let url_path = "/api/v1/video-channels/{channelHandle}/collaborators/invite" in 7063 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}/collaborators/invite" in 6811 7064 let query = "" in 6812 7065 let url = client.base_url ^ url_path ^ query in 6813 7066 let response = ··· 6829 7082 6830 7083 (** Remove a channel collaborator 6831 7084 6832 - **PeerTube >= 8.0** Only the channel owner or the collaborator themselves can remove a collaborator from a channel *) 6833 - let remove_video_channel_collaborator client () = 7085 + **PeerTube >= 8.0** Only the channel owner or the collaborator themselves can remove a collaborator from a channel 7086 + @param channel_handle The video channel handle 7087 + @param collaborator_id The collaborator id 7088 + *) 7089 + let remove_video_channel_collaborator ~channel_handle ~collaborator_id client () = 6834 7090 let op_name = "remove_video_channel_collaborator" in 6835 - let url_path = "/api/v1/video-channels/{channelHandle}/collaborators/{collaboratorId}" in 7091 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle); ("collaboratorId", collaborator_id)] "/api/v1/video-channels/{channelHandle}/collaborators/{collaboratorId}" in 6836 7092 let query = "" in 6837 7093 let url = client.base_url ^ url_path ^ query in 6838 7094 let response = ··· 6854 7110 6855 7111 (** Accept a collaboration invitation 6856 7112 6857 - **PeerTube >= 8.0** *) 6858 - let accept_video_channel_collaborator client () = 7113 + **PeerTube >= 8.0** 7114 + @param channel_handle The video channel handle 7115 + @param collaborator_id The collaborator id 7116 + *) 7117 + let accept_video_channel_collaborator ~channel_handle ~collaborator_id client () = 6859 7118 let op_name = "accept_video_channel_collaborator" in 6860 - let url_path = "/api/v1/video-channels/{channelHandle}/collaborators/{collaboratorId}/accept" in 7119 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle); ("collaboratorId", collaborator_id)] "/api/v1/video-channels/{channelHandle}/collaborators/{collaboratorId}/accept" in 6861 7120 let query = "" in 6862 7121 let url = client.base_url ^ url_path ^ query in 6863 7122 let response = ··· 6879 7138 6880 7139 (** Reject a collaboration invitation 6881 7140 6882 - **PeerTube >= 8.0** *) 6883 - let reject_video_channel_collaborator client () = 7141 + **PeerTube >= 8.0** 7142 + @param channel_handle The video channel handle 7143 + @param collaborator_id The collaborator id 7144 + *) 7145 + let reject_video_channel_collaborator ~channel_handle ~collaborator_id client () = 6884 7146 let op_name = "reject_video_channel_collaborator" in 6885 - let url_path = "/api/v1/video-channels/{channelHandle}/collaborators/{collaboratorId}/reject" in 7147 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle); ("collaboratorId", collaborator_id)] "/api/v1/video-channels/{channelHandle}/collaborators/{collaboratorId}/reject" in 6886 7148 let query = "" in 6887 7149 let url = client.base_url ^ url_path ^ query in 6888 7150 let response = ··· 6902 7164 body = Requests.Response.text response; 6903 7165 }) 6904 7166 6905 - (** List followers of a video channel *) 6906 - let get_video_channel_followers client () = 7167 + (** List followers of a video channel 7168 + @param channel_handle The video channel handle 7169 + @param start Offset used to paginate results 7170 + @param count Number of items to return 7171 + @param sort Sort followers by criteria 7172 + @param search Plain text search, applied to various parts of the model depending on endpoint 7173 + *) 7174 + let get_video_channel_followers ~channel_handle ?start ?count ?sort ?search client () = 6907 7175 let op_name = "get_video_channel_followers" in 6908 - let url_path = "/api/v1/video-channels/{channelHandle}/followers" in 6909 - let query = "" in 7176 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}/followers" in 7177 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"search" ~value:search]) in 6910 7178 let url = client.base_url ^ url_path ^ query in 6911 7179 let response = 6912 7180 try Requests.get client.session url ··· 6927 7195 6928 7196 (** Import videos in channel 6929 7197 6930 - Import a remote channel/playlist videos into a channel *) 6931 - let post_api_v1_video_channels_import_videos ~body client () = 7198 + Import a remote channel/playlist videos into a channel 7199 + @param channel_handle The video channel handle 7200 + *) 7201 + let post_api_v1_video_channels_import_videos ~channel_handle ~body client () = 6932 7202 let op_name = "post_api_v1_video_channels_import_videos" in 6933 - let url_path = "/api/v1/video-channels/{channelHandle}/import-videos" in 7203 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}/import-videos" in 6934 7204 let query = "" in 6935 7205 let url = client.base_url ^ url_path ^ query in 6936 7206 let response = ··· 6950 7220 body = Requests.Response.text response; 6951 7221 }) 6952 7222 6953 - (** List playlists of a channel *) 6954 - let get_api_v1_video_channels_video_playlists client () = 7223 + (** List playlists of a channel 7224 + @param channel_handle The video channel handle 7225 + @param start Offset used to paginate results 7226 + @param count Number of items to return 7227 + @param sort Sort column 7228 + *) 7229 + let get_api_v1_video_channels_video_playlists ~channel_handle ?start ?count ?sort ?playlist_type client () = 6955 7230 let op_name = "get_api_v1_video_channels_video_playlists" in 6956 - let url_path = "/api/v1/video-channels/{channelHandle}/video-playlists" in 6957 - let query = "" in 7231 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}/video-playlists" in 7232 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"playlistType" ~value:playlist_type]) in 6958 7233 let url = client.base_url ^ url_path ^ query in 6959 7234 let response = 6960 7235 try Requests.get client.session url ··· 6973 7248 body = Requests.Response.text response; 6974 7249 }) 6975 7250 6976 - (** Reorder channel playlists *) 6977 - let reorder_video_playlists_of_channel client () = 7251 + (** Reorder channel playlists 7252 + @param channel_handle The video channel handle 7253 + *) 7254 + let reorder_video_playlists_of_channel ~channel_handle client () = 6978 7255 let op_name = "reorder_video_playlists_of_channel" in 6979 - let url_path = "/api/v1/video-channels/{channelHandle}/video-playlists/reorder" in 7256 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}/video-playlists/reorder" in 6980 7257 let query = "" in 6981 7258 let url = client.base_url ^ url_path ^ query in 6982 7259 let response = ··· 6996 7273 body = Requests.Response.text response; 6997 7274 }) 6998 7275 6999 - (** List video playlists *) 7000 - let get_playlists client () = 7276 + (** List video playlists 7277 + @param start Offset used to paginate results 7278 + @param count Number of items to return 7279 + @param sort Sort column 7280 + *) 7281 + let get_playlists ?start ?count ?sort ?playlist_type client () = 7001 7282 let op_name = "get_playlists" in 7002 7283 let url_path = "/api/v1/video-playlists" in 7003 - let query = "" in 7284 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"playlistType" ~value:playlist_type]) in 7004 7285 let url = client.base_url ^ url_path ^ query in 7005 7286 let response = 7006 7287 try Requests.get client.session url ··· 7069 7350 7070 7351 (** Update a video playlist 7071 7352 7072 - If the video playlist is set as public, the playlist must have a assigned channel. *) 7073 - let put_api_v1_video_playlists client () = 7353 + If the video playlist is set as public, the playlist must have a assigned channel. 7354 + @param playlist_id Playlist id 7355 + *) 7356 + let put_api_v1_video_playlists ~playlist_id client () = 7074 7357 let op_name = "put_api_v1_video_playlists" in 7075 - let url_path = "/api/v1/video-playlists/{playlistId}" in 7358 + let url_path = Openapi.Runtime.Path.render ~params:[("playlistId", playlist_id)] "/api/v1/video-playlists/{playlistId}" in 7076 7359 let query = "" in 7077 7360 let url = client.base_url ^ url_path ^ query in 7078 7361 let response = ··· 7092 7375 body = Requests.Response.text response; 7093 7376 }) 7094 7377 7095 - (** Delete a video playlist *) 7096 - let delete_api_v1_video_playlists client () = 7378 + (** Delete a video playlist 7379 + @param playlist_id Playlist id 7380 + *) 7381 + let delete_api_v1_video_playlists ~playlist_id client () = 7097 7382 let op_name = "delete_api_v1_video_playlists" in 7098 - let url_path = "/api/v1/video-playlists/{playlistId}" in 7383 + let url_path = Openapi.Runtime.Path.render ~params:[("playlistId", playlist_id)] "/api/v1/video-playlists/{playlistId}" in 7099 7384 let query = "" in 7100 7385 let url = client.base_url ^ url_path ^ query in 7101 7386 let response = ··· 7115 7400 body = Requests.Response.text response; 7116 7401 }) 7117 7402 7118 - (** List videos of a playlist *) 7119 - let get_video_playlist_videos client () = 7403 + (** List videos of a playlist 7404 + @param playlist_id Playlist id 7405 + @param start Offset used to paginate results 7406 + @param count Number of items to return 7407 + *) 7408 + let get_video_playlist_videos ~playlist_id ?start ?count client () = 7120 7409 let op_name = "get_video_playlist_videos" in 7121 - let url_path = "/api/v1/video-playlists/{playlistId}/videos" in 7122 - let query = "" in 7410 + let url_path = Openapi.Runtime.Path.render ~params:[("playlistId", playlist_id)] "/api/v1/video-playlists/{playlistId}/videos" in 7411 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count]) in 7123 7412 let url = client.base_url ^ url_path ^ query in 7124 7413 let response = 7125 7414 try Requests.get client.session url ··· 7138 7427 body = Requests.Response.text response; 7139 7428 }) 7140 7429 7141 - (** Add a video in a playlist *) 7142 - let add_video_playlist_video client () = 7430 + (** Add a video in a playlist 7431 + @param playlist_id Playlist id 7432 + *) 7433 + let add_video_playlist_video ~playlist_id client () = 7143 7434 let op_name = "add_video_playlist_video" in 7144 - let url_path = "/api/v1/video-playlists/{playlistId}/videos" in 7435 + let url_path = Openapi.Runtime.Path.render ~params:[("playlistId", playlist_id)] "/api/v1/video-playlists/{playlistId}/videos" in 7145 7436 let query = "" in 7146 7437 let url = client.base_url ^ url_path ^ query in 7147 7438 let response = ··· 7161 7452 body = Requests.Response.text response; 7162 7453 }) 7163 7454 7164 - (** Reorder playlist elements *) 7165 - let reorder_video_playlist client () = 7455 + (** Reorder playlist elements 7456 + @param playlist_id Playlist id 7457 + *) 7458 + let reorder_video_playlist ~playlist_id client () = 7166 7459 let op_name = "reorder_video_playlist" in 7167 - let url_path = "/api/v1/video-playlists/{playlistId}/videos/reorder" in 7460 + let url_path = Openapi.Runtime.Path.render ~params:[("playlistId", playlist_id)] "/api/v1/video-playlists/{playlistId}/videos/reorder" in 7168 7461 let query = "" in 7169 7462 let url = client.base_url ^ url_path ^ query in 7170 7463 let response = ··· 7184 7477 body = Requests.Response.text response; 7185 7478 }) 7186 7479 7187 - (** Update a playlist element *) 7188 - let put_video_playlist_video client () = 7480 + (** Update a playlist element 7481 + @param playlist_id Playlist id 7482 + @param playlist_element_id Playlist element id 7483 + *) 7484 + let put_video_playlist_video ~playlist_id ~playlist_element_id client () = 7189 7485 let op_name = "put_video_playlist_video" in 7190 - let url_path = "/api/v1/video-playlists/{playlistId}/videos/{playlistElementId}" in 7486 + let url_path = Openapi.Runtime.Path.render ~params:[("playlistId", playlist_id); ("playlistElementId", playlist_element_id)] "/api/v1/video-playlists/{playlistId}/videos/{playlistElementId}" in 7191 7487 let query = "" in 7192 7488 let url = client.base_url ^ url_path ^ query in 7193 7489 let response = ··· 7207 7503 body = Requests.Response.text response; 7208 7504 }) 7209 7505 7210 - (** Delete an element from a playlist *) 7211 - let del_video_playlist_video client () = 7506 + (** Delete an element from a playlist 7507 + @param playlist_id Playlist id 7508 + @param playlist_element_id Playlist element id 7509 + *) 7510 + let del_video_playlist_video ~playlist_id ~playlist_element_id client () = 7212 7511 let op_name = "del_video_playlist_video" in 7213 - let url_path = "/api/v1/video-playlists/{playlistId}/videos/{playlistElementId}" in 7512 + let url_path = Openapi.Runtime.Path.render ~params:[("playlistId", playlist_id); ("playlistElementId", playlist_element_id)] "/api/v1/video-playlists/{playlistId}/videos/{playlistElementId}" in 7214 7513 let query = "" in 7215 7514 let url = client.base_url ^ url_path ^ query in 7216 7515 let response = ··· 7236 7535 - `2`: automatic block that needs review 7237 7536 7238 7537 @param search plain search that will match with video titles, and more 7538 + @param start Offset used to paginate results 7539 + @param count Number of items to return 7540 + @param sort Sort blocklists by criteria 7239 7541 *) 7240 - let get_video_blocks ?type_ ?search client () = 7542 + let get_video_blocks ?type_ ?search ?start ?count ?sort client () = 7241 7543 let op_name = "get_video_blocks" in 7242 7544 let url_path = "/api/v1/videos/blacklist" in 7243 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"type" ~value:type_; Openapi.Runtime.Query.optional ~key:"search" ~value:search]) in 7545 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"type" ~value:type_; Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 7244 7546 let url = client.base_url ^ url_path ^ query in 7245 7547 let response = 7246 7548 try Requests.get client.session url ··· 7282 7584 body = Requests.Response.text response; 7283 7585 }) 7284 7586 7285 - (** List instance comments *) 7286 - let get_api_v1_videos_comments client () = 7587 + (** List instance comments 7588 + @param search Plain text search, applied to various parts of the model depending on endpoint 7589 + @param search_account Filter comments by searching on the account 7590 + @param search_video Filter comments by searching on the video 7591 + @param video_id Limit results on this specific video 7592 + @param video_channel_id Limit results on this specific video channel 7593 + @param auto_tag_one_of **PeerTube >= 6.2** filter on comments that contain one of these automatic tags 7594 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 7595 + @param on_local_video Display only objects of local or remote videos 7596 + *) 7597 + let get_api_v1_videos_comments ?search ?search_account ?search_video ?video_id ?video_channel_id ?auto_tag_one_of ?is_local ?on_local_video client () = 7287 7598 let op_name = "get_api_v1_videos_comments" in 7288 7599 let url_path = "/api/v1/videos/comments" in 7289 - let query = "" in 7600 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"searchAccount" ~value:search_account; Openapi.Runtime.Query.optional ~key:"searchVideo" ~value:search_video; Openapi.Runtime.Query.optional ~key:"videoId" ~value:video_id; Openapi.Runtime.Query.optional ~key:"videoChannelId" ~value:video_channel_id; Openapi.Runtime.Query.optional ~key:"autoTagOneOf" ~value:auto_tag_one_of; Openapi.Runtime.Query.optional ~key:"isLocal" ~value:is_local; Openapi.Runtime.Query.optional ~key:"onLocalVideo" ~value:on_local_video]) in 7290 7601 let url = client.base_url ^ url_path ^ query in 7291 7602 let response = 7292 7603 try Requests.get client.session url ··· 7307 7618 7308 7619 (** Delete video import 7309 7620 7310 - Delete ended video import *) 7311 - let delete_api_v1_videos_imports client () = 7621 + Delete ended video import 7622 + @param id Entity id 7623 + *) 7624 + let delete_api_v1_videos_imports ~id client () = 7312 7625 let op_name = "delete_api_v1_videos_imports" in 7313 - let url_path = "/api/v1/videos/imports/{id}" in 7626 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/imports/{id}" in 7314 7627 let query = "" in 7315 7628 let url = client.base_url ^ url_path ^ query in 7316 7629 let response = ··· 7332 7645 7333 7646 (** Cancel video import 7334 7647 7335 - Cancel a pending video import *) 7336 - let post_api_v1_videos_imports_cancel client () = 7648 + Cancel a pending video import 7649 + @param id Entity id 7650 + *) 7651 + let post_api_v1_videos_imports_cancel ~id client () = 7337 7652 let op_name = "post_api_v1_videos_imports_cancel" in 7338 - let url_path = "/api/v1/videos/imports/{id}/cancel" in 7653 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/imports/{id}/cancel" in 7339 7654 let query = "" in 7340 7655 let url = client.base_url ^ url_path ^ query in 7341 7656 let response = ··· 7357 7672 7358 7673 (** Retry video import 7359 7674 7360 - **PeerTube >= 8.0** Retry a pending video import *) 7361 - let post_api_v1_videos_imports_retry client () = 7675 + **PeerTube >= 8.0** Retry a pending video import 7676 + @param id Entity id 7677 + *) 7678 + let post_api_v1_videos_imports_retry ~id client () = 7362 7679 let op_name = "post_api_v1_videos_imports_retry" in 7363 - let url_path = "/api/v1/videos/imports/{id}/retry" in 7680 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/imports/{id}/retry" in 7364 7681 let query = "" in 7365 7682 let url = client.base_url ^ url_path ^ query in 7366 7683 let response = ··· 7426 7743 body = Requests.Response.text response; 7427 7744 }) 7428 7745 7429 - (** Update information about a live *) 7430 - let update_live_id ~body client () = 7746 + (** Update information about a live 7747 + @param id The object id, uuid or short uuid 7748 + *) 7749 + let update_live_id ~id ~body client () = 7431 7750 let op_name = "update_live_id" in 7432 - let url_path = "/api/v1/videos/live/{id}" in 7751 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/live/{id}" in 7433 7752 let query = "" in 7434 7753 let url = client.base_url ^ url_path ^ query in 7435 7754 let response = ··· 7451 7770 7452 7771 (** List live sessions 7453 7772 7454 - List all sessions created in a particular live *) 7455 - let get_api_v1_videos_live_sessions client () = 7773 + List all sessions created in a particular live 7774 + @param id The object id, uuid or short uuid 7775 + @param sort Sort column 7776 + *) 7777 + let get_api_v1_videos_live_sessions ~id ?sort client () = 7456 7778 let op_name = "get_api_v1_videos_live_sessions" in 7457 - let url_path = "/api/v1/videos/live/{id}/sessions" in 7458 - let query = "" in 7779 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/live/{id}/sessions" in 7780 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 7459 7781 let url = client.base_url ^ url_path ^ query in 7460 7782 let response = 7461 7783 try Requests.get client.session url ··· 7497 7819 body = Requests.Response.text response; 7498 7820 }) 7499 7821 7500 - (** Accept ownership change request *) 7501 - let post_api_v1_videos_ownership_accept client () = 7822 + (** Accept ownership change request 7823 + @param id The object id, uuid or short uuid 7824 + *) 7825 + let post_api_v1_videos_ownership_accept ~id client () = 7502 7826 let op_name = "post_api_v1_videos_ownership_accept" in 7503 - let url_path = "/api/v1/videos/ownership/{id}/accept" in 7827 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/ownership/{id}/accept" in 7504 7828 let query = "" in 7505 7829 let url = client.base_url ^ url_path ^ query in 7506 7830 let response = ··· 7520 7844 body = Requests.Response.text response; 7521 7845 }) 7522 7846 7523 - (** Refuse ownership change request *) 7524 - let post_api_v1_videos_ownership_refuse client () = 7847 + (** Refuse ownership change request 7848 + @param id The object id, uuid or short uuid 7849 + *) 7850 + let post_api_v1_videos_ownership_refuse ~id client () = 7525 7851 let op_name = "post_api_v1_videos_ownership_refuse" in 7526 - let url_path = "/api/v1/videos/ownership/{id}/refuse" in 7852 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/ownership/{id}/refuse" in 7527 7853 let query = "" in 7528 7854 let url = client.base_url ^ url_path ^ query in 7529 7855 let response = ··· 7593 7919 7594 7920 (** Cancel the resumable upload of a video, deleting any data uploaded so far 7595 7921 7596 - Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video *) 7597 - let upload_resumable_cancel client () = 7922 + Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video 7923 + @param upload_id Created session id to proceed with. If you didn't send chunks in the last hour, it is 7924 + not valid anymore and you need to initialize a new upload. 7925 + 7926 + *) 7927 + let upload_resumable_cancel ~upload_id client () = 7598 7928 let op_name = "upload_resumable_cancel" in 7599 7929 let url_path = "/api/v1/videos/upload-resumable" in 7600 - let query = "" in 7930 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"upload_id" ~value:upload_id]) in 7601 7931 let url = client.base_url ^ url_path ^ query in 7602 7932 let response = 7603 7933 try Requests.delete client.session url ··· 7616 7946 body = Requests.Response.text response; 7617 7947 }) 7618 7948 7619 - (** Update a video *) 7620 - let put_video client () = 7949 + (** Update a video 7950 + @param id The object id, uuid or short uuid 7951 + *) 7952 + let put_video ~id client () = 7621 7953 let op_name = "put_video" in 7622 - let url_path = "/api/v1/videos/{id}" in 7954 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}" in 7623 7955 let query = "" in 7624 7956 let url = client.base_url ^ url_path ^ query in 7625 7957 let response = ··· 7639 7971 body = Requests.Response.text response; 7640 7972 }) 7641 7973 7642 - (** Delete a video *) 7643 - let del_video client () = 7974 + (** Delete a video 7975 + @param id The object id, uuid or short uuid 7976 + *) 7977 + let del_video ~id client () = 7644 7978 let op_name = "del_video" in 7645 - let url_path = "/api/v1/videos/{id}" in 7979 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}" in 7646 7980 let query = "" in 7647 7981 let url = client.base_url ^ url_path ^ query in 7648 7982 let response = ··· 7662 7996 body = Requests.Response.text response; 7663 7997 }) 7664 7998 7665 - (** Block a video *) 7666 - let add_video_block client () = 7999 + (** Block a video 8000 + @param id The object id, uuid or short uuid 8001 + *) 8002 + let add_video_block ~id client () = 7667 8003 let op_name = "add_video_block" in 7668 - let url_path = "/api/v1/videos/{id}/blacklist" in 8004 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/blacklist" in 7669 8005 let query = "" in 7670 8006 let url = client.base_url ^ url_path ^ query in 7671 8007 let response = ··· 7685 8021 body = Requests.Response.text response; 7686 8022 }) 7687 8023 7688 - (** Unblock a video by its id *) 7689 - let del_video_block client () = 8024 + (** Unblock a video by its id 8025 + @param id The object id, uuid or short uuid 8026 + *) 8027 + let del_video_block ~id client () = 7690 8028 let op_name = "del_video_block" in 7691 - let url_path = "/api/v1/videos/{id}/blacklist" in 8029 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/blacklist" in 7692 8030 let query = "" in 7693 8031 let url = client.base_url ^ url_path ^ query in 7694 8032 let response = ··· 7708 8046 body = Requests.Response.text response; 7709 8047 }) 7710 8048 7711 - (** List captions of a video *) 7712 - let get_video_captions client () = 8049 + (** List captions of a video 8050 + @param id The object id, uuid or short uuid 8051 + *) 8052 + let get_video_captions ~id client () = 7713 8053 let op_name = "get_video_captions" in 7714 - let url_path = "/api/v1/videos/{id}/captions" in 8054 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/captions" in 7715 8055 let query = "" in 7716 8056 let url = client.base_url ^ url_path ^ query in 7717 8057 let response = ··· 7733 8073 7734 8074 (** Generate a video caption 7735 8075 7736 - **PeerTube >= 6.2** This feature has to be enabled by the administrator *) 7737 - let generate_video_caption client () = 8076 + **PeerTube >= 6.2** This feature has to be enabled by the administrator 8077 + @param id The object id, uuid or short uuid 8078 + *) 8079 + let generate_video_caption ~id client () = 7738 8080 let op_name = "generate_video_caption" in 7739 - let url_path = "/api/v1/videos/{id}/captions/generate" in 8081 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/captions/generate" in 7740 8082 let query = "" in 7741 8083 let url = client.base_url ^ url_path ^ query in 7742 8084 let response = ··· 7756 8098 body = Requests.Response.text response; 7757 8099 }) 7758 8100 7759 - (** Add or replace a video caption *) 7760 - let add_video_caption client () = 8101 + (** Add or replace a video caption 8102 + @param id The object id, uuid or short uuid 8103 + @param caption_language The caption language 8104 + *) 8105 + let add_video_caption ~id ~caption_language client () = 7761 8106 let op_name = "add_video_caption" in 7762 - let url_path = "/api/v1/videos/{id}/captions/{captionLanguage}" in 8107 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id); ("captionLanguage", caption_language)] "/api/v1/videos/{id}/captions/{captionLanguage}" in 7763 8108 let query = "" in 7764 8109 let url = client.base_url ^ url_path ^ query in 7765 8110 let response = ··· 7779 8124 body = Requests.Response.text response; 7780 8125 }) 7781 8126 7782 - (** Delete a video caption *) 7783 - let del_video_caption client () = 8127 + (** Delete a video caption 8128 + @param id The object id, uuid or short uuid 8129 + @param caption_language The caption language 8130 + *) 8131 + let del_video_caption ~id ~caption_language client () = 7784 8132 let op_name = "del_video_caption" in 7785 - let url_path = "/api/v1/videos/{id}/captions/{captionLanguage}" in 8133 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id); ("captionLanguage", caption_language)] "/api/v1/videos/{id}/captions/{captionLanguage}" in 7786 8134 let query = "" in 7787 8135 let url = client.base_url ^ url_path ^ query in 7788 8136 let response = ··· 7804 8152 7805 8153 (** Replace video chapters 7806 8154 7807 - **PeerTube >= 6.0** *) 7808 - let replace_video_chapters client () = 8155 + **PeerTube >= 6.0** 8156 + @param id The object id, uuid or short uuid 8157 + *) 8158 + let replace_video_chapters ~id client () = 7809 8159 let op_name = "replace_video_chapters" in 7810 - let url_path = "/api/v1/videos/{id}/chapters" in 8160 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/chapters" in 7811 8161 let query = "" in 7812 8162 let url = client.base_url ^ url_path ^ query in 7813 8163 let response = ··· 7827 8177 body = Requests.Response.text response; 7828 8178 }) 7829 8179 7830 - (** Delete a comment or a reply *) 7831 - let delete_api_v1_videos_comments client () = 8180 + (** Delete a comment or a reply 8181 + @param id The object id, uuid or short uuid 8182 + @param comment_id The comment id 8183 + *) 8184 + let delete_api_v1_videos_comments ~id ~comment_id client () = 7832 8185 let op_name = "delete_api_v1_videos_comments" in 7833 - let url_path = "/api/v1/videos/{id}/comments/{commentId}" in 8186 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id); ("commentId", comment_id)] "/api/v1/videos/{id}/comments/{commentId}" in 7834 8187 let query = "" in 7835 8188 let url = client.base_url ^ url_path ^ query in 7836 8189 let response = ··· 7852 8205 7853 8206 (** Approve a comment 7854 8207 7855 - **PeerTube >= 6.2** Approve a comment that requires a review *) 7856 - let post_api_v1_videos_comments_approve client () = 8208 + **PeerTube >= 6.2** Approve a comment that requires a review 8209 + @param id The object id, uuid or short uuid 8210 + @param comment_id The comment id 8211 + *) 8212 + let post_api_v1_videos_comments_approve ~id ~comment_id client () = 7857 8213 let op_name = "post_api_v1_videos_comments_approve" in 7858 - let url_path = "/api/v1/videos/{id}/comments/{commentId}/approve" in 8214 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id); ("commentId", comment_id)] "/api/v1/videos/{id}/comments/{commentId}/approve" in 7859 8215 let query = "" in 7860 8216 let url = client.base_url ^ url_path ^ query in 7861 8217 let response = ··· 7875 8231 body = Requests.Response.text response; 7876 8232 }) 7877 8233 7878 - (** Get complete video description *) 7879 - let get_video_desc client () = 8234 + (** Get complete video description 8235 + @param id The object id, uuid or short uuid 8236 + *) 8237 + let get_video_desc ~id client () = 7880 8238 let op_name = "get_video_desc" in 7881 - let url_path = "/api/v1/videos/{id}/description" in 8239 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/description" in 7882 8240 let query = "" in 7883 8241 let url = client.base_url ^ url_path ^ query in 7884 8242 let response = ··· 7898 8256 body = Requests.Response.text response; 7899 8257 }) 7900 8258 7901 - (** Request ownership change *) 7902 - let post_api_v1_videos_give_ownership client () = 8259 + (** Request ownership change 8260 + @param id The object id, uuid or short uuid 8261 + *) 8262 + let post_api_v1_videos_give_ownership ~id client () = 7903 8263 let op_name = "post_api_v1_videos_give_ownership" in 7904 - let url_path = "/api/v1/videos/{id}/give-ownership" in 8264 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/give-ownership" in 7905 8265 let query = "" in 7906 8266 let url = client.base_url ^ url_path ^ query in 7907 8267 let response = ··· 7921 8281 body = Requests.Response.text response; 7922 8282 }) 7923 8283 7924 - (** Delete video HLS files *) 7925 - let del_video_hls client () = 8284 + (** Delete video HLS files 8285 + @param id The object id, uuid or short uuid 8286 + *) 8287 + let del_video_hls ~id client () = 7926 8288 let op_name = "del_video_hls" in 7927 - let url_path = "/api/v1/videos/{id}/hls" in 8289 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/hls" in 7928 8290 let query = "" in 7929 8291 let url = client.base_url ^ url_path ^ query in 7930 8292 let response = ··· 7946 8308 7947 8309 (** List video passwords 7948 8310 7949 - **PeerTube >= 6.0** *) 7950 - let list_video_passwords client () = 8311 + **PeerTube >= 6.0** 8312 + @param id The object id, uuid or short uuid 8313 + @param start Offset used to paginate results 8314 + @param count Number of items to return 8315 + @param sort Sort column 8316 + *) 8317 + let list_video_passwords ~id ?start ?count ?sort client () = 7951 8318 let op_name = "list_video_passwords" in 7952 - let url_path = "/api/v1/videos/{id}/passwords" in 7953 - let query = "" in 8319 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/passwords" in 8320 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 7954 8321 let url = client.base_url ^ url_path ^ query in 7955 8322 let response = 7956 8323 try Requests.get client.session url ··· 7971 8338 7972 8339 (** Add a video password 7973 8340 7974 - **PeerTube >= 8.0** *) 7975 - let add_video_password client () = 8341 + **PeerTube >= 8.0** 8342 + @param id The object id, uuid or short uuid 8343 + *) 8344 + let add_video_password ~id client () = 7976 8345 let op_name = "add_video_password" in 7977 - let url_path = "/api/v1/videos/{id}/passwords" in 8346 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/passwords" in 7978 8347 let query = "" in 7979 8348 let url = client.base_url ^ url_path ^ query in 7980 8349 let response = ··· 7996 8365 7997 8366 (** Update video passwords 7998 8367 7999 - **PeerTube >= 6.0** *) 8000 - let update_video_password_list client () = 8368 + **PeerTube >= 6.0** 8369 + @param id The object id, uuid or short uuid 8370 + *) 8371 + let update_video_password_list ~id client () = 8001 8372 let op_name = "update_video_password_list" in 8002 - let url_path = "/api/v1/videos/{id}/passwords" in 8373 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/passwords" in 8003 8374 let query = "" in 8004 8375 let url = client.base_url ^ url_path ^ query in 8005 8376 let response = ··· 8021 8392 8022 8393 (** Delete a video password 8023 8394 8024 - **PeerTube >= 6.0** *) 8025 - let remove_video_password client () = 8395 + **PeerTube >= 6.0** 8396 + @param id The object id, uuid or short uuid 8397 + @param video_password_id The video password id 8398 + *) 8399 + let remove_video_password ~id ~video_password_id client () = 8026 8400 let op_name = "remove_video_password" in 8027 - let url_path = "/api/v1/videos/{id}/passwords/{videoPasswordId}" in 8401 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id); ("videoPasswordId", video_password_id)] "/api/v1/videos/{id}/passwords/{videoPasswordId}" in 8028 8402 let query = "" in 8029 8403 let url = client.base_url ^ url_path ^ query in 8030 8404 let response = ··· 8044 8418 body = Requests.Response.text response; 8045 8419 }) 8046 8420 8047 - (** Like/dislike a video *) 8048 - let put_api_v1_videos_rate client () = 8421 + (** Like/dislike a video 8422 + @param id The object id, uuid or short uuid 8423 + *) 8424 + let put_api_v1_videos_rate ~id client () = 8049 8425 let op_name = "put_api_v1_videos_rate" in 8050 - let url_path = "/api/v1/videos/{id}/rate" in 8426 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/rate" in 8051 8427 let query = "" in 8052 8428 let url = client.base_url ^ url_path ^ query in 8053 8429 let response = ··· 8067 8443 body = Requests.Response.text response; 8068 8444 }) 8069 8445 8070 - (** Delete video source file *) 8071 - let delete_video_source_file client () = 8446 + (** Delete video source file 8447 + @param id The object id, uuid or short uuid 8448 + *) 8449 + let delete_video_source_file ~id client () = 8072 8450 let op_name = "delete_video_source_file" in 8073 - let url_path = "/api/v1/videos/{id}/source/file" in 8451 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/source/file" in 8074 8452 let query = "" in 8075 8453 let url = client.base_url ^ url_path ^ query in 8076 8454 let response = ··· 8092 8470 8093 8471 (** Initialize the resumable replacement of a video 8094 8472 8095 - **PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the replacement of a video *) 8096 - let replace_video_source_resumable_init ~body client () = 8473 + **PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the replacement of a video 8474 + @param id The object id, uuid or short uuid 8475 + *) 8476 + let replace_video_source_resumable_init ~id ~body client () = 8097 8477 let op_name = "replace_video_source_resumable_init" in 8098 - let url_path = "/api/v1/videos/{id}/source/replace-resumable" in 8478 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/source/replace-resumable" in 8099 8479 let query = "" in 8100 8480 let url = client.base_url ^ url_path ^ query in 8101 8481 let response = ··· 8117 8497 8118 8498 (** Send chunk for the resumable replacement of a video 8119 8499 8120 - **PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the replacement of a video *) 8121 - let replace_video_source_resumable client () = 8500 + **PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the replacement of a video 8501 + @param id The object id, uuid or short uuid 8502 + @param upload_id Created session id to proceed with. If you didn't send chunks in the last hour, it is 8503 + not valid anymore and you need to initialize a new upload. 8504 + 8505 + *) 8506 + let replace_video_source_resumable ~id ~upload_id client () = 8122 8507 let op_name = "replace_video_source_resumable" in 8123 - let url_path = "/api/v1/videos/{id}/source/replace-resumable" in 8124 - let query = "" in 8508 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/source/replace-resumable" in 8509 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"upload_id" ~value:upload_id]) in 8125 8510 let url = client.base_url ^ url_path ^ query in 8126 8511 let response = 8127 8512 try Requests.put client.session url ··· 8142 8527 8143 8528 (** Cancel the resumable replacement of a video 8144 8529 8145 - **PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the replacement of a video *) 8146 - let replace_video_source_resumable_cancel client () = 8530 + **PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the replacement of a video 8531 + @param id The object id, uuid or short uuid 8532 + @param upload_id Created session id to proceed with. If you didn't send chunks in the last hour, it is 8533 + not valid anymore and you need to initialize a new upload. 8534 + 8535 + *) 8536 + let replace_video_source_resumable_cancel ~id ~upload_id client () = 8147 8537 let op_name = "replace_video_source_resumable_cancel" in 8148 - let url_path = "/api/v1/videos/{id}/source/replace-resumable" in 8149 - let query = "" in 8538 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/source/replace-resumable" in 8539 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"upload_id" ~value:upload_id]) in 8150 8540 let url = client.base_url ^ url_path ^ query in 8151 8541 let response = 8152 8542 try Requests.delete client.session url ··· 8167 8557 8168 8558 (** List storyboards of a video 8169 8559 8170 - **PeerTube >= 6.0** *) 8171 - let list_video_storyboards client () = 8560 + **PeerTube >= 6.0** 8561 + @param id The object id, uuid or short uuid 8562 + *) 8563 + let list_video_storyboards ~id client () = 8172 8564 let op_name = "list_video_storyboards" in 8173 - let url_path = "/api/v1/videos/{id}/storyboards" in 8565 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/storyboards" in 8174 8566 let query = "" in 8175 8567 let url = client.base_url ^ url_path ^ query in 8176 8568 let response = ··· 8192 8584 8193 8585 (** Create a studio task 8194 8586 8195 - Create a task to edit a video (cut, add intro/outro etc) *) 8196 - let post_api_v1_videos_studio_edit client () = 8587 + Create a task to edit a video (cut, add intro/outro etc) 8588 + @param id The object id, uuid or short uuid 8589 + *) 8590 + let post_api_v1_videos_studio_edit ~id client () = 8197 8591 let op_name = "post_api_v1_videos_studio_edit" in 8198 - let url_path = "/api/v1/videos/{id}/studio/edit" in 8592 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/studio/edit" in 8199 8593 let query = "" in 8200 8594 let url = client.base_url ^ url_path ^ query in 8201 8595 let response = ··· 8215 8609 body = Requests.Response.text response; 8216 8610 }) 8217 8611 8218 - (** Create a transcoding job *) 8219 - let create_video_transcoding client () = 8612 + (** Create a transcoding job 8613 + @param id The object id, uuid or short uuid 8614 + *) 8615 + let create_video_transcoding ~id client () = 8220 8616 let op_name = "create_video_transcoding" in 8221 - let url_path = "/api/v1/videos/{id}/transcoding" in 8617 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/transcoding" in 8222 8618 let query = "" in 8223 8619 let url = client.base_url ^ url_path ^ query in 8224 8620 let response = ··· 8240 8636 8241 8637 (** Notify user is watching a video 8242 8638 8243 - Call this endpoint regularly (every 5-10 seconds for example) to notify the server the user is watching the video. After a while, PeerTube will increase video's viewers counter. If the user is authenticated, PeerTube will also store the current player time. *) 8244 - let add_view ~body client () = 8639 + Call this endpoint regularly (every 5-10 seconds for example) to notify the server the user is watching the video. After a while, PeerTube will increase video's viewers counter. If the user is authenticated, PeerTube will also store the current player time. 8640 + @param id The object id, uuid or short uuid 8641 + *) 8642 + let add_view ~id ~body client () = 8245 8643 let op_name = "add_view" in 8246 - let url_path = "/api/v1/videos/{id}/views" in 8644 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/views" in 8247 8645 let query = "" in 8248 8646 let url = client.base_url ^ url_path ^ query in 8249 8647 let response = ··· 8265 8663 8266 8664 (** Delete video Web Video files 8267 8665 8268 - **PeerTube >= 6.0** *) 8269 - let del_video_web_videos client () = 8666 + **PeerTube >= 6.0** 8667 + @param id The object id, uuid or short uuid 8668 + *) 8669 + let del_video_web_videos ~id client () = 8270 8670 let op_name = "del_video_web_videos" in 8271 - let url_path = "/api/v1/videos/{id}/web-videos" in 8671 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/web-videos" in 8272 8672 let query = "" in 8273 8673 let url = client.base_url ^ url_path ^ query in 8274 8674 let response = ··· 8503 8903 Generate a mp4 container that contains at most 1 video stream and at most 1 audio stream. Mainly used to merge the HLS audio only video file and the HLS video only resolution file. 8504 8904 @param video_id The video id 8505 8905 @param video_file_ids streams of video files to mux in the output 8906 + @param video_file_token Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header. 8506 8907 *) 8507 - let get_download_videos_generate ~video_id ~video_file_ids client () = 8908 + let get_download_videos_generate ~video_id ~video_file_ids ?video_file_token client () = 8508 8909 let op_name = "get_download_videos_generate" in 8509 8910 let url_path = Openapi.Runtime.Path.render ~params:[("videoId", video_id)] "/download/videos/generate/{videoId}" in 8510 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"videoFileIds" ~value:video_file_ids]) in 8911 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"videoFileIds" ~value:video_file_ids; Openapi.Runtime.Query.optional ~key:"videoFileToken" ~value:video_file_token]) in 8511 8912 let url = client.base_url ^ url_path ^ query in 8512 8913 let response = 8513 8914 try Requests.get client.session url ··· 8555 8956 @param format format expected (we focus on making `rss` the most feature-rich ; it serves [Media RSS](https://www.rssboard.org/media-rss)) 8556 8957 @param account_id limit listing to a specific account 8557 8958 @param token private token allowing access 8959 + @param sort Sort column 8960 + @param nsfw whether to include nsfw videos, if any 8961 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 8962 + @param include_ **Only administrators and moderators can use this parameter** 8963 + 8964 + Include additional videos in results (can be combined using bitwise or operator) 8965 + - `0` NONE 8966 + - `1` NOT_PUBLISHED_STATE 8967 + - `2` BLACKLISTED 8968 + - `4` BLOCKED_OWNER 8969 + - `8` FILES 8970 + - `16` CAPTIONS 8971 + - `32` VIDEO SOURCE 8972 + 8973 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 8974 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 8975 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 8558 8976 *) 8559 - let get_syndicated_subscription_videos ~format ~account_id ~token client () = 8977 + let get_syndicated_subscription_videos ~format ~account_id ~token ?sort ?nsfw ?is_local ?include_ ?privacy_one_of ?has_hlsfiles ?has_web_video_files client () = 8560 8978 let op_name = "get_syndicated_subscription_videos" in 8561 8979 let url_path = Openapi.Runtime.Path.render ~params:[("format", format)] "/feeds/subscriptions.{format}" in 8562 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"accountId" ~value:account_id; Openapi.Runtime.Query.singleton ~key:"token" ~value:token]) in 8980 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"accountId" ~value:account_id; Openapi.Runtime.Query.singleton ~key:"token" ~value:token; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"nsfw" ~value:nsfw; Openapi.Runtime.Query.optional ~key:"isLocal" ~value:is_local; Openapi.Runtime.Query.optional ~key:"include" ~value:include_; Openapi.Runtime.Query.optional ~key:"privacyOneOf" ~value:privacy_one_of; Openapi.Runtime.Query.optional ~key:"hasHLSFiles" ~value:has_hlsfiles; Openapi.Runtime.Query.optional ~key:"hasWebVideoFiles" ~value:has_web_video_files]) in 8563 8981 let url = client.base_url ^ url_path ^ query in 8564 8982 let response = 8565 8983 try Requests.get client.session url ··· 8614 9032 @param account_name limit listing to a specific account 8615 9033 @param video_channel_id limit listing to a specific video channel 8616 9034 @param video_channel_name limit listing to a specific video channel 9035 + @param sort Sort column 9036 + @param nsfw whether to include nsfw videos, if any 9037 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 9038 + @param include_ **Only administrators and moderators can use this parameter** 9039 + 9040 + Include additional videos in results (can be combined using bitwise or operator) 9041 + - `0` NONE 9042 + - `1` NOT_PUBLISHED_STATE 9043 + - `2` BLACKLISTED 9044 + - `4` BLOCKED_OWNER 9045 + - `8` FILES 9046 + - `16` CAPTIONS 9047 + - `32` VIDEO SOURCE 9048 + 9049 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 9050 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 9051 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 8617 9052 *) 8618 - let get_syndicated_videos ~format ?account_id ?account_name ?video_channel_id ?video_channel_name client () = 9053 + let get_syndicated_videos ~format ?account_id ?account_name ?video_channel_id ?video_channel_name ?sort ?nsfw ?is_local ?include_ ?privacy_one_of ?has_hlsfiles ?has_web_video_files client () = 8619 9054 let op_name = "get_syndicated_videos" in 8620 9055 let url_path = Openapi.Runtime.Path.render ~params:[("format", format)] "/feeds/videos.{format}" in 8621 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"accountId" ~value:account_id; Openapi.Runtime.Query.optional ~key:"accountName" ~value:account_name; Openapi.Runtime.Query.optional ~key:"videoChannelId" ~value:video_channel_id; Openapi.Runtime.Query.optional ~key:"videoChannelName" ~value:video_channel_name]) in 9056 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"accountId" ~value:account_id; Openapi.Runtime.Query.optional ~key:"accountName" ~value:account_name; Openapi.Runtime.Query.optional ~key:"videoChannelId" ~value:video_channel_id; Openapi.Runtime.Query.optional ~key:"videoChannelName" ~value:video_channel_name; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"nsfw" ~value:nsfw; Openapi.Runtime.Query.optional ~key:"isLocal" ~value:is_local; Openapi.Runtime.Query.optional ~key:"include" ~value:include_; Openapi.Runtime.Query.optional ~key:"privacyOneOf" ~value:privacy_one_of; Openapi.Runtime.Query.optional ~key:"hasHLSFiles" ~value:has_hlsfiles; Openapi.Runtime.Query.optional ~key:"hasWebVideoFiles" ~value:has_web_video_files]) in 8622 9057 let url = client.base_url ^ url_path ^ query in 8623 9058 let response = 8624 9059 try Requests.get client.session url ··· 8637 9072 body = Requests.Response.text response; 8638 9073 }) 8639 9074 8640 - (** Get private HLS video file *) 8641 - let get_static_streaming_playlists_hls_private_ client () = 9075 + (** Get private HLS video file 9076 + @param filename Filename 9077 + @param video_file_token Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header. 9078 + @param reinject_video_file_token Ask the server to reinject videoFileToken in URLs in m3u8 playlist 9079 + *) 9080 + let get_static_streaming_playlists_hls_private_ ~filename ?video_file_token ?reinject_video_file_token client () = 8642 9081 let op_name = "get_static_streaming_playlists_hls_private_" in 8643 - let url_path = "/static/streaming-playlists/hls/private/{filename}" in 8644 - let query = "" in 9082 + let url_path = Openapi.Runtime.Path.render ~params:[("filename", filename)] "/static/streaming-playlists/hls/private/{filename}" in 9083 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"videoFileToken" ~value:video_file_token; Openapi.Runtime.Query.optional ~key:"reinjectVideoFileToken" ~value:reinject_video_file_token]) in 8645 9084 let url = client.base_url ^ url_path ^ query in 8646 9085 let response = 8647 9086 try Requests.get client.session url ··· 8660 9099 body = Requests.Response.text response; 8661 9100 }) 8662 9101 8663 - (** Get public HLS video file *) 8664 - let get_static_streaming_playlists_hls client () = 9102 + (** Get public HLS video file 9103 + @param filename Filename 9104 + *) 9105 + let get_static_streaming_playlists_hls ~filename client () = 8665 9106 let op_name = "get_static_streaming_playlists_hls" in 8666 - let url_path = "/static/streaming-playlists/hls/{filename}" in 9107 + let url_path = Openapi.Runtime.Path.render ~params:[("filename", filename)] "/static/streaming-playlists/hls/{filename}" in 8667 9108 let query = "" in 8668 9109 let url = client.base_url ^ url_path ^ query in 8669 9110 let response = ··· 8685 9126 8686 9127 (** Get private Web Video file 8687 9128 8688 - **PeerTube >= 6.0** *) 8689 - let get_static_web_videos_private_ client () = 9129 + **PeerTube >= 6.0** 9130 + @param filename Filename 9131 + @param video_file_token Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header. 9132 + *) 9133 + let get_static_web_videos_private_ ~filename ?video_file_token client () = 8690 9134 let op_name = "get_static_web_videos_private_" in 8691 - let url_path = "/static/web-videos/private/{filename}" in 8692 - let query = "" in 9135 + let url_path = Openapi.Runtime.Path.render ~params:[("filename", filename)] "/static/web-videos/private/{filename}" in 9136 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"videoFileToken" ~value:video_file_token]) in 8693 9137 let url = client.base_url ^ url_path ^ query in 8694 9138 let response = 8695 9139 try Requests.get client.session url ··· 8710 9154 8711 9155 (** Get public Web Video file 8712 9156 8713 - **PeerTube >= 6.0** *) 8714 - let get_static_web_videos client () = 9157 + **PeerTube >= 6.0** 9158 + @param filename Filename 9159 + *) 9160 + let get_static_web_videos ~filename client () = 8715 9161 let op_name = "get_static_web_videos" in 8716 - let url_path = "/static/web-videos/{filename}" in 9162 + let url_path = Openapi.Runtime.Path.render ~params:[("filename", filename)] "/static/web-videos/{filename}" in 8717 9163 let query = "" in 8718 9164 let url = client.base_url ^ url_path ^ query in 8719 9165 let response = ··· 9002 9448 (** List my notifications 9003 9449 @param type_one_of only list notifications of these types 9004 9450 @param unread only list unread notifications 9451 + @param start Offset used to paginate results 9452 + @param count Number of items to return 9453 + @param sort Sort column 9005 9454 *) 9006 - let get_api_v1_users_me_notifications ?type_one_of ?unread client () = 9455 + let get_api_v1_users_me_notifications ?type_one_of ?unread ?start ?count ?sort client () = 9007 9456 let op_name = "get_api_v1_users_me_notifications" in 9008 9457 let url_path = "/api/v1/users/me/notifications" in 9009 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"typeOneOf" ~value:type_one_of; Openapi.Runtime.Query.optional ~key:"unread" ~value:unread]) in 9458 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"typeOneOf" ~value:type_one_of; Openapi.Runtime.Query.optional ~key:"unread" ~value:unread; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 9010 9459 let url = client.base_url ^ url_path ^ query in 9011 9460 let response = 9012 9461 try Requests.get client.session url ··· 9368 9817 9369 9818 (** List activities of a video channel 9370 9819 9371 - **PeerTube >= 8.0** *) 9372 - let list_video_channel_activities client () = 9820 + **PeerTube >= 8.0** 9821 + @param channel_handle The video channel handle 9822 + @param start Offset used to paginate results 9823 + @param count Number of items to return 9824 + @param sort Sort column 9825 + *) 9826 + let list_video_channel_activities ~channel_handle ?start ?count ?sort client () = 9373 9827 let op_name = "list_video_channel_activities" in 9374 - let url_path = "/api/v1/video-channels/{channelHandle}/activities" in 9375 - let query = "" in 9828 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}/activities" in 9829 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 9376 9830 let url = client.base_url ^ url_path ^ query in 9377 9831 let response = 9378 9832 try Requests.get client.session url ··· 9874 10328 |> Jsont.Object.finish 9875 10329 end 9876 10330 9877 - (** Get a video playlist *) 9878 - let get_api_v1_video_playlists client () = 10331 + (** Get a video playlist 10332 + @param playlist_id Playlist id 10333 + *) 10334 + let get_api_v1_video_playlists ~playlist_id client () = 9879 10335 let op_name = "get_api_v1_video_playlists" in 9880 - let url_path = "/api/v1/video-playlists/{playlistId}" in 10336 + let url_path = Openapi.Runtime.Path.render ~params:[("playlistId", playlist_id)] "/api/v1/video-playlists/{playlistId}" in 9881 10337 let query = "" in 9882 10338 let url = client.base_url ^ url_path ^ query in 9883 10339 let response = ··· 10103 10559 end 10104 10560 10105 10561 (** List ratings of an account 10562 + @param name The username or handle of the account 10563 + @param start Offset used to paginate results 10564 + @param count Number of items to return 10565 + @param sort Sort column 10106 10566 @param rating Optionally filter which ratings to retrieve 10107 10567 *) 10108 - let get_api_v1_accounts_ratings ?rating client () = 10568 + let get_api_v1_accounts_ratings ~name ?start ?count ?sort ?rating client () = 10109 10569 let op_name = "get_api_v1_accounts_ratings" in 10110 - let url_path = "/api/v1/accounts/{name}/ratings" in 10111 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"rating" ~value:rating]) in 10570 + let url_path = Openapi.Runtime.Path.render ~params:[("name", name)] "/api/v1/accounts/{name}/ratings" in 10571 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"rating" ~value:rating]) in 10112 10572 let url = client.base_url ^ url_path ^ query in 10113 10573 let response = 10114 10574 try Requests.get client.session url ··· 10149 10609 |> Jsont.Object.finish 10150 10610 end 10151 10611 10152 - (** List videos of an account *) 10153 - let get_account_videos client () = 10612 + (** List videos of an account 10613 + @param name The username or handle of the account 10614 + @param start Offset used to paginate results 10615 + @param count Number of items to return 10616 + @param skip_count if you don't need the `total` in the response 10617 + @param nsfw whether to include nsfw videos, if any 10618 + @param is_live whether or not the video is a live 10619 + @param include_scheduled_live whether or not include live that are scheduled for later 10620 + @param category_one_of category id of the video (see [/videos/categories](#operation/getCategories)) 10621 + @param licence_one_of licence id of the video (see [/videos/licences](#operation/getLicences)) 10622 + @param language_one_of language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language 10623 + @param tags_one_of tag(s) of the video 10624 + @param tags_all_of tag(s) of the video, where all should be present in the video 10625 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 10626 + @param include_ **Only administrators and moderators can use this parameter** 10627 + 10628 + Include additional videos in results (can be combined using bitwise or operator) 10629 + - `0` NONE 10630 + - `1` NOT_PUBLISHED_STATE 10631 + - `2` BLACKLISTED 10632 + - `4` BLOCKED_OWNER 10633 + - `8` FILES 10634 + - `16` CAPTIONS 10635 + - `32` VIDEO SOURCE 10636 + 10637 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 10638 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 10639 + @param host Find elements owned by this host 10640 + @param auto_tag_one_of **PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags 10641 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 10642 + @param exclude_already_watched Whether or not to exclude videos that are in the user's video history 10643 + @param search Plain text search, applied to various parts of the model depending on endpoint 10644 + *) 10645 + let get_account_videos ~name ?start ?count ?skip_count ?sort ?nsfw ?nsfw_flags_included ?nsfw_flags_excluded ?is_live ?include_scheduled_live ?category_one_of ?licence_one_of ?language_one_of ?tags_one_of ?tags_all_of ?is_local ?include_ ?has_hlsfiles ?has_web_video_files ?host ?auto_tag_one_of ?privacy_one_of ?exclude_already_watched ?search client () = 10154 10646 let op_name = "get_account_videos" in 10155 - let url_path = "/api/v1/accounts/{name}/videos" in 10156 - let query = "" in 10647 + let url_path = Openapi.Runtime.Path.render ~params:[("name", name)] "/api/v1/accounts/{name}/videos" in 10648 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"skipCount" ~value:skip_count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"nsfw" ~value:nsfw; Openapi.Runtime.Query.optional ~key:"nsfwFlagsIncluded" ~value:nsfw_flags_included; Openapi.Runtime.Query.optional ~key:"nsfwFlagsExcluded" ~value:nsfw_flags_excluded; Openapi.Runtime.Query.optional ~key:"isLive" ~value:is_live; Openapi.Runtime.Query.optional ~key:"includeScheduledLive" ~value:include_scheduled_live; Openapi.Runtime.Query.optional ~key:"categoryOneOf" ~value:category_one_of; Openapi.Runtime.Query.optional ~key:"licenceOneOf" ~value:licence_one_of; Openapi.Runtime.Query.optional ~key:"languageOneOf" ~value:language_one_of; Openapi.Runtime.Query.optional ~key:"tagsOneOf" ~value:tags_one_of; Openapi.Runtime.Query.optional ~key:"tagsAllOf" ~value:tags_all_of; Openapi.Runtime.Query.optional ~key:"isLocal" ~value:is_local; Openapi.Runtime.Query.optional ~key:"include" ~value:include_; Openapi.Runtime.Query.optional ~key:"hasHLSFiles" ~value:has_hlsfiles; Openapi.Runtime.Query.optional ~key:"hasWebVideoFiles" ~value:has_web_video_files; Openapi.Runtime.Query.optional ~key:"host" ~value:host; Openapi.Runtime.Query.optional ~key:"autoTagOneOf" ~value:auto_tag_one_of; Openapi.Runtime.Query.optional ~key:"privacyOneOf" ~value:privacy_one_of; Openapi.Runtime.Query.optional ~key:"excludeAlreadyWatched" ~value:exclude_already_watched; Openapi.Runtime.Query.optional ~key:"search" ~value:search]) in 10157 10649 let url = client.base_url ^ url_path ^ query in 10158 10650 let response = 10159 10651 try Requests.get client.session url ··· 10175 10667 (** Search videos 10176 10668 @param search 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. 10177 10669 10670 + @param uuids Find elements with specific UUIDs 10671 + @param search_target If the administrator enabled search index support, you can override the default search target. 10672 + 10673 + **Warning**: If you choose to make an index search, PeerTube will get results from a third party service. It means the instance may not yet know the objects you fetched. If you want to load video/channel information: 10674 + * If the current user has the ability to make a remote URI search (this information is available in the config endpoint), 10675 + then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. 10676 + After that, you can use the classic REST API endpoints to fetch the complete object or interact with it 10677 + * If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch 10678 + the data from the origin instance API 10679 + 10680 + @param start Offset used to paginate results 10681 + @param count Number of items to return 10682 + @param skip_count if you don't need the `total` in the response 10683 + @param nsfw whether to include nsfw videos, if any 10684 + @param is_live whether or not the video is a live 10685 + @param include_scheduled_live whether or not include live that are scheduled for later 10686 + @param category_one_of category id of the video (see [/videos/categories](#operation/getCategories)) 10687 + @param licence_one_of licence id of the video (see [/videos/licences](#operation/getLicences)) 10688 + @param language_one_of language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language 10689 + @param tags_one_of tag(s) of the video 10690 + @param tags_all_of tag(s) of the video, where all should be present in the video 10691 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 10692 + @param include_ **Only administrators and moderators can use this parameter** 10693 + 10694 + Include additional videos in results (can be combined using bitwise or operator) 10695 + - `0` NONE 10696 + - `1` NOT_PUBLISHED_STATE 10697 + - `2` BLACKLISTED 10698 + - `4` BLOCKED_OWNER 10699 + - `8` FILES 10700 + - `16` CAPTIONS 10701 + - `32` VIDEO SOURCE 10702 + 10703 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 10704 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 10705 + @param host Find elements owned by this host 10706 + @param auto_tag_one_of **PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags 10707 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 10708 + @param exclude_already_watched Whether or not to exclude videos that are in the user's video history 10178 10709 @param start_date Get videos that are published after this date 10179 10710 @param end_date Get videos that are published before this date 10180 10711 @param originally_published_start_date Get videos that are originally published after this date ··· 10182 10713 @param duration_min Get videos that have this minimum duration 10183 10714 @param duration_max Get videos that have this maximum duration 10184 10715 *) 10185 - let search_videos ~search ?start_date ?end_date ?originally_published_start_date ?originally_published_end_date ?duration_min ?duration_max client () = 10716 + let search_videos ~search ?uuids ?search_target ?start ?count ?skip_count ?sort ?nsfw ?nsfw_flags_included ?nsfw_flags_excluded ?is_live ?include_scheduled_live ?category_one_of ?licence_one_of ?language_one_of ?tags_one_of ?tags_all_of ?is_local ?include_ ?has_hlsfiles ?has_web_video_files ?host ?auto_tag_one_of ?privacy_one_of ?exclude_already_watched ?start_date ?end_date ?originally_published_start_date ?originally_published_end_date ?duration_min ?duration_max client () = 10186 10717 let op_name = "search_videos" in 10187 10718 let url_path = "/api/v1/search/videos" in 10188 - let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"startDate" ~value:start_date; Openapi.Runtime.Query.optional ~key:"endDate" ~value:end_date; Openapi.Runtime.Query.optional ~key:"originallyPublishedStartDate" ~value:originally_published_start_date; Openapi.Runtime.Query.optional ~key:"originallyPublishedEndDate" ~value:originally_published_end_date; Openapi.Runtime.Query.optional ~key:"durationMin" ~value:duration_min; Openapi.Runtime.Query.optional ~key:"durationMax" ~value:duration_max]) in 10719 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.singleton ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"uuids" ~value:uuids; Openapi.Runtime.Query.optional ~key:"searchTarget" ~value:search_target; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"skipCount" ~value:skip_count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"nsfw" ~value:nsfw; Openapi.Runtime.Query.optional ~key:"nsfwFlagsIncluded" ~value:nsfw_flags_included; Openapi.Runtime.Query.optional ~key:"nsfwFlagsExcluded" ~value:nsfw_flags_excluded; Openapi.Runtime.Query.optional ~key:"isLive" ~value:is_live; Openapi.Runtime.Query.optional ~key:"includeScheduledLive" ~value:include_scheduled_live; Openapi.Runtime.Query.optional ~key:"categoryOneOf" ~value:category_one_of; Openapi.Runtime.Query.optional ~key:"licenceOneOf" ~value:licence_one_of; Openapi.Runtime.Query.optional ~key:"languageOneOf" ~value:language_one_of; Openapi.Runtime.Query.optional ~key:"tagsOneOf" ~value:tags_one_of; Openapi.Runtime.Query.optional ~key:"tagsAllOf" ~value:tags_all_of; Openapi.Runtime.Query.optional ~key:"isLocal" ~value:is_local; Openapi.Runtime.Query.optional ~key:"include" ~value:include_; Openapi.Runtime.Query.optional ~key:"hasHLSFiles" ~value:has_hlsfiles; Openapi.Runtime.Query.optional ~key:"hasWebVideoFiles" ~value:has_web_video_files; Openapi.Runtime.Query.optional ~key:"host" ~value:host; Openapi.Runtime.Query.optional ~key:"autoTagOneOf" ~value:auto_tag_one_of; Openapi.Runtime.Query.optional ~key:"privacyOneOf" ~value:privacy_one_of; Openapi.Runtime.Query.optional ~key:"excludeAlreadyWatched" ~value:exclude_already_watched; Openapi.Runtime.Query.optional ~key:"startDate" ~value:start_date; Openapi.Runtime.Query.optional ~key:"endDate" ~value:end_date; Openapi.Runtime.Query.optional ~key:"originallyPublishedStartDate" ~value:originally_published_start_date; Openapi.Runtime.Query.optional ~key:"originallyPublishedEndDate" ~value:originally_published_end_date; Openapi.Runtime.Query.optional ~key:"durationMin" ~value:duration_min; Openapi.Runtime.Query.optional ~key:"durationMax" ~value:duration_max]) in 10189 10720 let url = client.base_url ^ url_path ^ query in 10190 10721 let response = 10191 10722 try Requests.get client.session url ··· 10204 10735 body = Requests.Response.text response; 10205 10736 }) 10206 10737 10207 - (** List watched videos history *) 10208 - let get_api_v1_users_me_history_videos client () = 10738 + (** List watched videos history 10739 + @param start Offset used to paginate results 10740 + @param count Number of items to return 10741 + @param search Plain text search, applied to various parts of the model depending on endpoint 10742 + *) 10743 + let get_api_v1_users_me_history_videos ?start ?count ?search client () = 10209 10744 let op_name = "get_api_v1_users_me_history_videos" in 10210 10745 let url_path = "/api/v1/users/me/history/videos" in 10211 - let query = "" in 10746 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"search" ~value:search]) in 10212 10747 let url = client.base_url ^ url_path ^ query in 10213 10748 let response = 10214 10749 try Requests.get client.session url ··· 10227 10762 body = Requests.Response.text response; 10228 10763 }) 10229 10764 10230 - (** List videos of subscriptions of my user *) 10231 - let get_api_v1_users_me_subscriptions_videos client () = 10765 + (** List videos of subscriptions of my user 10766 + @param start Offset used to paginate results 10767 + @param count Number of items to return 10768 + @param skip_count if you don't need the `total` in the response 10769 + @param nsfw whether to include nsfw videos, if any 10770 + @param is_live whether or not the video is a live 10771 + @param include_scheduled_live whether or not include live that are scheduled for later 10772 + @param category_one_of category id of the video (see [/videos/categories](#operation/getCategories)) 10773 + @param licence_one_of licence id of the video (see [/videos/licences](#operation/getLicences)) 10774 + @param language_one_of language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language 10775 + @param tags_one_of tag(s) of the video 10776 + @param tags_all_of tag(s) of the video, where all should be present in the video 10777 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 10778 + @param include_ **Only administrators and moderators can use this parameter** 10779 + 10780 + Include additional videos in results (can be combined using bitwise or operator) 10781 + - `0` NONE 10782 + - `1` NOT_PUBLISHED_STATE 10783 + - `2` BLACKLISTED 10784 + - `4` BLOCKED_OWNER 10785 + - `8` FILES 10786 + - `16` CAPTIONS 10787 + - `32` VIDEO SOURCE 10788 + 10789 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 10790 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 10791 + @param host Find elements owned by this host 10792 + @param auto_tag_one_of **PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags 10793 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 10794 + @param exclude_already_watched Whether or not to exclude videos that are in the user's video history 10795 + @param search Plain text search, applied to various parts of the model depending on endpoint 10796 + *) 10797 + let get_api_v1_users_me_subscriptions_videos ?start ?count ?skip_count ?sort ?nsfw ?nsfw_flags_included ?nsfw_flags_excluded ?is_live ?include_scheduled_live ?category_one_of ?licence_one_of ?language_one_of ?tags_one_of ?tags_all_of ?is_local ?include_ ?has_hlsfiles ?has_web_video_files ?host ?auto_tag_one_of ?privacy_one_of ?exclude_already_watched ?search client () = 10232 10798 let op_name = "get_api_v1_users_me_subscriptions_videos" in 10233 10799 let url_path = "/api/v1/users/me/subscriptions/videos" in 10234 - let query = "" in 10800 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"skipCount" ~value:skip_count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"nsfw" ~value:nsfw; Openapi.Runtime.Query.optional ~key:"nsfwFlagsIncluded" ~value:nsfw_flags_included; Openapi.Runtime.Query.optional ~key:"nsfwFlagsExcluded" ~value:nsfw_flags_excluded; Openapi.Runtime.Query.optional ~key:"isLive" ~value:is_live; Openapi.Runtime.Query.optional ~key:"includeScheduledLive" ~value:include_scheduled_live; Openapi.Runtime.Query.optional ~key:"categoryOneOf" ~value:category_one_of; Openapi.Runtime.Query.optional ~key:"licenceOneOf" ~value:licence_one_of; Openapi.Runtime.Query.optional ~key:"languageOneOf" ~value:language_one_of; Openapi.Runtime.Query.optional ~key:"tagsOneOf" ~value:tags_one_of; Openapi.Runtime.Query.optional ~key:"tagsAllOf" ~value:tags_all_of; Openapi.Runtime.Query.optional ~key:"isLocal" ~value:is_local; Openapi.Runtime.Query.optional ~key:"include" ~value:include_; Openapi.Runtime.Query.optional ~key:"hasHLSFiles" ~value:has_hlsfiles; Openapi.Runtime.Query.optional ~key:"hasWebVideoFiles" ~value:has_web_video_files; Openapi.Runtime.Query.optional ~key:"host" ~value:host; Openapi.Runtime.Query.optional ~key:"autoTagOneOf" ~value:auto_tag_one_of; Openapi.Runtime.Query.optional ~key:"privacyOneOf" ~value:privacy_one_of; Openapi.Runtime.Query.optional ~key:"excludeAlreadyWatched" ~value:exclude_already_watched; Openapi.Runtime.Query.optional ~key:"search" ~value:search]) in 10235 10801 let url = client.base_url ^ url_path ^ query in 10236 10802 let response = 10237 10803 try Requests.get client.session url ··· 10250 10816 body = Requests.Response.text response; 10251 10817 }) 10252 10818 10253 - (** List videos of my user *) 10254 - let get_api_v1_users_me_videos client () = 10819 + (** List videos of my user 10820 + @param channel_name_one_of **PeerTube >= 7.2** Filter on videos that are published by a channel with one of these names 10821 + @param start Offset used to paginate results 10822 + @param count Number of items to return 10823 + @param skip_count if you don't need the `total` in the response 10824 + @param nsfw whether to include nsfw videos, if any 10825 + @param is_live whether or not the video is a live 10826 + @param include_scheduled_live whether or not include live that are scheduled for later 10827 + @param category_one_of category id of the video (see [/videos/categories](#operation/getCategories)) 10828 + @param licence_one_of licence id of the video (see [/videos/licences](#operation/getLicences)) 10829 + @param language_one_of language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language 10830 + @param tags_one_of tag(s) of the video 10831 + @param tags_all_of tag(s) of the video, where all should be present in the video 10832 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 10833 + @param include_ **Only administrators and moderators can use this parameter** 10834 + 10835 + Include additional videos in results (can be combined using bitwise or operator) 10836 + - `0` NONE 10837 + - `1` NOT_PUBLISHED_STATE 10838 + - `2` BLACKLISTED 10839 + - `4` BLOCKED_OWNER 10840 + - `8` FILES 10841 + - `16` CAPTIONS 10842 + - `32` VIDEO SOURCE 10843 + 10844 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 10845 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 10846 + @param host Find elements owned by this host 10847 + @param auto_tag_one_of **PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags 10848 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 10849 + @param exclude_already_watched Whether or not to exclude videos that are in the user's video history 10850 + @param search Plain text search, applied to various parts of the model depending on endpoint 10851 + @param include_collaborations **PeerTube >= 8.0** Include objects from collaborated channels 10852 + *) 10853 + let get_api_v1_users_me_videos ?channel_name_one_of ?start ?count ?skip_count ?sort ?nsfw ?nsfw_flags_included ?nsfw_flags_excluded ?is_live ?include_scheduled_live ?category_one_of ?licence_one_of ?language_one_of ?tags_one_of ?tags_all_of ?is_local ?include_ ?has_hlsfiles ?has_web_video_files ?host ?auto_tag_one_of ?privacy_one_of ?exclude_already_watched ?search ?include_collaborations client () = 10255 10854 let op_name = "get_api_v1_users_me_videos" in 10256 10855 let url_path = "/api/v1/users/me/videos" in 10257 - let query = "" in 10856 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"channelNameOneOf" ~value:channel_name_one_of; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"skipCount" ~value:skip_count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"nsfw" ~value:nsfw; Openapi.Runtime.Query.optional ~key:"nsfwFlagsIncluded" ~value:nsfw_flags_included; Openapi.Runtime.Query.optional ~key:"nsfwFlagsExcluded" ~value:nsfw_flags_excluded; Openapi.Runtime.Query.optional ~key:"isLive" ~value:is_live; Openapi.Runtime.Query.optional ~key:"includeScheduledLive" ~value:include_scheduled_live; Openapi.Runtime.Query.optional ~key:"categoryOneOf" ~value:category_one_of; Openapi.Runtime.Query.optional ~key:"licenceOneOf" ~value:licence_one_of; Openapi.Runtime.Query.optional ~key:"languageOneOf" ~value:language_one_of; Openapi.Runtime.Query.optional ~key:"tagsOneOf" ~value:tags_one_of; Openapi.Runtime.Query.optional ~key:"tagsAllOf" ~value:tags_all_of; Openapi.Runtime.Query.optional ~key:"isLocal" ~value:is_local; Openapi.Runtime.Query.optional ~key:"include" ~value:include_; Openapi.Runtime.Query.optional ~key:"hasHLSFiles" ~value:has_hlsfiles; Openapi.Runtime.Query.optional ~key:"hasWebVideoFiles" ~value:has_web_video_files; Openapi.Runtime.Query.optional ~key:"host" ~value:host; Openapi.Runtime.Query.optional ~key:"autoTagOneOf" ~value:auto_tag_one_of; Openapi.Runtime.Query.optional ~key:"privacyOneOf" ~value:privacy_one_of; Openapi.Runtime.Query.optional ~key:"excludeAlreadyWatched" ~value:exclude_already_watched; Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"includeCollaborations" ~value:include_collaborations]) in 10258 10857 let url = client.base_url ^ url_path ^ query in 10259 10858 let response = 10260 10859 try Requests.get client.session url ··· 10273 10872 body = Requests.Response.text response; 10274 10873 }) 10275 10874 10276 - (** List videos of a video channel *) 10277 - let get_video_channel_videos client () = 10875 + (** List videos of a video channel 10876 + @param channel_handle The video channel handle 10877 + @param start Offset used to paginate results 10878 + @param count Number of items to return 10879 + @param skip_count if you don't need the `total` in the response 10880 + @param nsfw whether to include nsfw videos, if any 10881 + @param is_live whether or not the video is a live 10882 + @param include_scheduled_live whether or not include live that are scheduled for later 10883 + @param category_one_of category id of the video (see [/videos/categories](#operation/getCategories)) 10884 + @param licence_one_of licence id of the video (see [/videos/licences](#operation/getLicences)) 10885 + @param language_one_of language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language 10886 + @param tags_one_of tag(s) of the video 10887 + @param tags_all_of tag(s) of the video, where all should be present in the video 10888 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 10889 + @param include_ **Only administrators and moderators can use this parameter** 10890 + 10891 + Include additional videos in results (can be combined using bitwise or operator) 10892 + - `0` NONE 10893 + - `1` NOT_PUBLISHED_STATE 10894 + - `2` BLACKLISTED 10895 + - `4` BLOCKED_OWNER 10896 + - `8` FILES 10897 + - `16` CAPTIONS 10898 + - `32` VIDEO SOURCE 10899 + 10900 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 10901 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 10902 + @param host Find elements owned by this host 10903 + @param auto_tag_one_of **PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags 10904 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 10905 + @param exclude_already_watched Whether or not to exclude videos that are in the user's video history 10906 + @param search Plain text search, applied to various parts of the model depending on endpoint 10907 + *) 10908 + let get_video_channel_videos ~channel_handle ?start ?count ?skip_count ?sort ?nsfw ?nsfw_flags_included ?nsfw_flags_excluded ?is_live ?include_scheduled_live ?category_one_of ?licence_one_of ?language_one_of ?tags_one_of ?tags_all_of ?is_local ?include_ ?has_hlsfiles ?has_web_video_files ?host ?auto_tag_one_of ?privacy_one_of ?exclude_already_watched ?search client () = 10278 10909 let op_name = "get_video_channel_videos" in 10279 - let url_path = "/api/v1/video-channels/{channelHandle}/videos" in 10280 - let query = "" in 10910 + let url_path = Openapi.Runtime.Path.render ~params:[("channelHandle", channel_handle)] "/api/v1/video-channels/{channelHandle}/videos" in 10911 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"skipCount" ~value:skip_count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"nsfw" ~value:nsfw; Openapi.Runtime.Query.optional ~key:"nsfwFlagsIncluded" ~value:nsfw_flags_included; Openapi.Runtime.Query.optional ~key:"nsfwFlagsExcluded" ~value:nsfw_flags_excluded; Openapi.Runtime.Query.optional ~key:"isLive" ~value:is_live; Openapi.Runtime.Query.optional ~key:"includeScheduledLive" ~value:include_scheduled_live; Openapi.Runtime.Query.optional ~key:"categoryOneOf" ~value:category_one_of; Openapi.Runtime.Query.optional ~key:"licenceOneOf" ~value:licence_one_of; Openapi.Runtime.Query.optional ~key:"languageOneOf" ~value:language_one_of; Openapi.Runtime.Query.optional ~key:"tagsOneOf" ~value:tags_one_of; Openapi.Runtime.Query.optional ~key:"tagsAllOf" ~value:tags_all_of; Openapi.Runtime.Query.optional ~key:"isLocal" ~value:is_local; Openapi.Runtime.Query.optional ~key:"include" ~value:include_; Openapi.Runtime.Query.optional ~key:"hasHLSFiles" ~value:has_hlsfiles; Openapi.Runtime.Query.optional ~key:"hasWebVideoFiles" ~value:has_web_video_files; Openapi.Runtime.Query.optional ~key:"host" ~value:host; Openapi.Runtime.Query.optional ~key:"autoTagOneOf" ~value:auto_tag_one_of; Openapi.Runtime.Query.optional ~key:"privacyOneOf" ~value:privacy_one_of; Openapi.Runtime.Query.optional ~key:"excludeAlreadyWatched" ~value:exclude_already_watched; Openapi.Runtime.Query.optional ~key:"search" ~value:search]) in 10281 10912 let url = client.base_url ^ url_path ^ query in 10282 10913 let response = 10283 10914 try Requests.get client.session url ··· 10296 10927 body = Requests.Response.text response; 10297 10928 }) 10298 10929 10299 - (** List videos *) 10300 - let get_videos client () = 10930 + (** List videos 10931 + @param start Offset used to paginate results 10932 + @param count Number of items to return 10933 + @param skip_count if you don't need the `total` in the response 10934 + @param nsfw whether to include nsfw videos, if any 10935 + @param is_live whether or not the video is a live 10936 + @param include_scheduled_live whether or not include live that are scheduled for later 10937 + @param category_one_of category id of the video (see [/videos/categories](#operation/getCategories)) 10938 + @param licence_one_of licence id of the video (see [/videos/licences](#operation/getLicences)) 10939 + @param language_one_of language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language 10940 + @param tags_one_of tag(s) of the video 10941 + @param tags_all_of tag(s) of the video, where all should be present in the video 10942 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 10943 + @param include_ **Only administrators and moderators can use this parameter** 10944 + 10945 + Include additional videos in results (can be combined using bitwise or operator) 10946 + - `0` NONE 10947 + - `1` NOT_PUBLISHED_STATE 10948 + - `2` BLACKLISTED 10949 + - `4` BLOCKED_OWNER 10950 + - `8` FILES 10951 + - `16` CAPTIONS 10952 + - `32` VIDEO SOURCE 10953 + 10954 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 10955 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 10956 + @param host Find elements owned by this host 10957 + @param auto_tag_one_of **PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags 10958 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 10959 + @param exclude_already_watched Whether or not to exclude videos that are in the user's video history 10960 + @param search Plain text search, applied to various parts of the model depending on endpoint 10961 + *) 10962 + let get_videos ?start ?count ?skip_count ?sort ?nsfw ?nsfw_flags_included ?nsfw_flags_excluded ?is_live ?include_scheduled_live ?category_one_of ?licence_one_of ?language_one_of ?tags_one_of ?tags_all_of ?is_local ?include_ ?has_hlsfiles ?has_web_video_files ?host ?auto_tag_one_of ?privacy_one_of ?exclude_already_watched ?search client () = 10301 10963 let op_name = "get_videos" in 10302 10964 let url_path = "/api/v1/videos" in 10303 - let query = "" in 10965 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"skipCount" ~value:skip_count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort; Openapi.Runtime.Query.optional ~key:"nsfw" ~value:nsfw; Openapi.Runtime.Query.optional ~key:"nsfwFlagsIncluded" ~value:nsfw_flags_included; Openapi.Runtime.Query.optional ~key:"nsfwFlagsExcluded" ~value:nsfw_flags_excluded; Openapi.Runtime.Query.optional ~key:"isLive" ~value:is_live; Openapi.Runtime.Query.optional ~key:"includeScheduledLive" ~value:include_scheduled_live; Openapi.Runtime.Query.optional ~key:"categoryOneOf" ~value:category_one_of; Openapi.Runtime.Query.optional ~key:"licenceOneOf" ~value:licence_one_of; Openapi.Runtime.Query.optional ~key:"languageOneOf" ~value:language_one_of; Openapi.Runtime.Query.optional ~key:"tagsOneOf" ~value:tags_one_of; Openapi.Runtime.Query.optional ~key:"tagsAllOf" ~value:tags_all_of; Openapi.Runtime.Query.optional ~key:"isLocal" ~value:is_local; Openapi.Runtime.Query.optional ~key:"include" ~value:include_; Openapi.Runtime.Query.optional ~key:"hasHLSFiles" ~value:has_hlsfiles; Openapi.Runtime.Query.optional ~key:"hasWebVideoFiles" ~value:has_web_video_files; Openapi.Runtime.Query.optional ~key:"host" ~value:host; Openapi.Runtime.Query.optional ~key:"autoTagOneOf" ~value:auto_tag_one_of; Openapi.Runtime.Query.optional ~key:"privacyOneOf" ~value:privacy_one_of; Openapi.Runtime.Query.optional ~key:"excludeAlreadyWatched" ~value:exclude_already_watched; Openapi.Runtime.Query.optional ~key:"search" ~value:search]) in 10304 10966 let url = client.base_url ^ url_path ^ query in 10305 10967 let response = 10306 10968 try Requests.get client.session url ··· 10409 11071 let v () = Jsont.Null ((), Jsont.Meta.none) 10410 11072 end 10411 11073 10412 - (** Get an account *) 10413 - let get_account client () = 11074 + (** Get an account 11075 + @param name The username or handle of the account 11076 + *) 11077 + let get_account ~name client () = 10414 11078 let op_name = "get_account" in 10415 - let url_path = "/api/v1/accounts/{name}" in 11079 + let url_path = Openapi.Runtime.Path.render ~params:[("name", name)] "/api/v1/accounts/{name}" in 10416 11080 let query = "" in 10417 11081 let url = client.base_url ^ url_path ^ query in 10418 11082 let response = ··· 10512 11176 |> Jsont.Object.finish 10513 11177 end 10514 11178 10515 - (** Get a thread *) 10516 - let get_api_v1_videos_comment_threads client () = 11179 + (** Get a thread 11180 + @param id The object id, uuid or short uuid 11181 + @param thread_id The thread id (root comment id) 11182 + *) 11183 + let get_api_v1_videos_comment_threads ~id ~thread_id client () = 10517 11184 let op_name = "get_api_v1_videos_comment_threads" in 10518 - let url_path = "/api/v1/videos/{id}/comment-threads/{threadId}" in 11185 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id); ("threadId", thread_id)] "/api/v1/videos/{id}/comment-threads/{threadId}" in 10519 11186 let query = "" in 10520 11187 let url = client.base_url ^ url_path ^ query in 10521 11188 let response = ··· 10554 11221 |> Jsont.Object.finish 10555 11222 end 10556 11223 10557 - (** Create a thread *) 10558 - let post_api_v1_videos_comment_threads client () = 11224 + (** Create a thread 11225 + @param id The object id, uuid or short uuid 11226 + *) 11227 + let post_api_v1_videos_comment_threads ~id client () = 10559 11228 let op_name = "post_api_v1_videos_comment_threads" in 10560 - let url_path = "/api/v1/videos/{id}/comment-threads" in 11229 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/comment-threads" in 10561 11230 let query = "" in 10562 11231 let url = client.base_url ^ url_path ^ query in 10563 11232 let response = ··· 10577 11246 body = Requests.Response.text response; 10578 11247 }) 10579 11248 10580 - (** Reply to a thread of a video *) 10581 - let post_api_v1_videos_comments client () = 11249 + (** Reply to a thread of a video 11250 + @param id The object id, uuid or short uuid 11251 + @param comment_id The comment id 11252 + *) 11253 + let post_api_v1_videos_comments ~id ~comment_id client () = 10582 11254 let op_name = "post_api_v1_videos_comments" in 10583 - let url_path = "/api/v1/videos/{id}/comments/{commentId}" in 11255 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id); ("commentId", comment_id)] "/api/v1/videos/{id}/comments/{commentId}" in 10584 11256 let query = "" in 10585 11257 let url = client.base_url ^ url_path ^ query in 10586 11258 let response = ··· 10625 11297 |> Jsont.Object.finish 10626 11298 end 10627 11299 10628 - (** List threads of a video *) 10629 - let get_api_v1_videos_comment_threads client () = 11300 + (** List threads of a video 11301 + @param id The object id, uuid or short uuid 11302 + @param start Offset used to paginate results 11303 + @param count Number of items to return 11304 + @param sort Sort comments by criteria 11305 + *) 11306 + let get_api_v1_videos_comment_threads ~id ?start ?count ?sort client () = 10630 11307 let op_name = "get_api_v1_videos_comment_threads" in 10631 - let url_path = "/api/v1/videos/{id}/comment-threads" in 10632 - let query = "" in 11308 + let url_path = Openapi.Runtime.Path.render ~params:[("id", id)] "/api/v1/videos/{id}/comment-threads" in 11309 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 10633 11310 let url = client.base_url ^ url_path ^ query in 10634 11311 let response = 10635 11312 try Requests.get client.session url ··· 10769 11446 |> Jsont.Object.finish 10770 11447 end 10771 11448 10772 - (** List users *) 10773 - let get_users client () = 11449 + (** List users 11450 + @param search Plain text search that will match with user usernames or emails 11451 + @param blocked Filter results down to (un)banned users 11452 + @param start Offset used to paginate results 11453 + @param count Number of items to return 11454 + @param sort Sort users by criteria 11455 + *) 11456 + let get_users ?search ?blocked ?start ?count ?sort client () = 10774 11457 let op_name = "get_users" in 10775 11458 let url_path = "/api/v1/users" in 10776 - let query = "" in 11459 + let query = Openapi.Runtime.Query.encode (List.concat [Openapi.Runtime.Query.optional ~key:"search" ~value:search; Openapi.Runtime.Query.optional ~key:"blocked" ~value:blocked; Openapi.Runtime.Query.optional ~key:"start" ~value:start; Openapi.Runtime.Query.optional ~key:"count" ~value:count; Openapi.Runtime.Query.optional ~key:"sort" ~value:sort]) in 10777 11460 let url = client.base_url ^ url_path ^ query in 10778 11461 let response = 10779 11462 try Requests.get client.session url
+994 -311
peertube.mli
··· 202 202 203 203 (** Send chunk for the resumable upload of a video 204 204 205 - Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the upload of a video *) 206 - val upload_resumable : t -> unit -> Response.t 205 + Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the upload of a video 206 + @param upload_id Created session id to proceed with. If you didn't send chunks in the last hour, it is 207 + not valid anymore and you need to initialize a new upload. 208 + 209 + *) 210 + val upload_resumable : upload_id:string -> t -> unit -> Response.t 207 211 end 208 212 209 213 module VideoToken : sig ··· 220 224 221 225 (** Request video token 222 226 223 - Request special tokens that expire quickly to use them in some context (like accessing private static files) *) 224 - val request_video_token : t -> unit -> Response.t 227 + Request special tokens that expire quickly to use them in some context (like accessing private static files) 228 + @param id The object id, uuid or short uuid 229 + *) 230 + val request_video_token : id:string -> t -> unit -> Response.t 225 231 end 226 232 227 233 module VideoStudioCreateTask : sig ··· 278 284 end 279 285 280 286 (** Get user agent stats of a video 287 + @param id The object id, uuid or short uuid 281 288 @param start_date Filter stats by start date 282 289 @param end_date Filter stats by end date 283 290 *) 284 - val get_api_v1_videos_stats_user_agent : ?start_date:string -> ?end_date:string -> t -> unit -> T.t 291 + val get_api_v1_videos_stats_user_agent : id:string -> ?start_date:string -> ?end_date:string -> t -> unit -> T.t 285 292 end 286 293 287 294 module VideoStatsTimeserie : sig ··· 297 304 end 298 305 299 306 (** Get timeserie stats of a video 307 + @param id The object id, uuid or short uuid 300 308 @param metric The metric to get 301 309 @param start_date Filter stats by start date 302 310 @param end_date Filter stats by end date 303 311 *) 304 - val get_api_v1_videos_stats_timeseries : metric:string -> ?start_date:string -> ?end_date:string -> t -> unit -> T.t 312 + val get_api_v1_videos_stats_timeseries : id:string -> metric:string -> ?start_date:string -> ?end_date:string -> t -> unit -> T.t 305 313 end 306 314 307 315 module VideoStatsRetention : sig ··· 316 324 val jsont : t Jsont.t 317 325 end 318 326 319 - (** Get retention stats of a video *) 320 - val get_api_v1_videos_stats_retention : t -> unit -> T.t 327 + (** Get retention stats of a video 328 + @param id The object id, uuid or short uuid 329 + *) 330 + val get_api_v1_videos_stats_retention : id:string -> t -> unit -> T.t 321 331 end 322 332 323 333 module VideoStatsOverall : sig ··· 345 355 end 346 356 347 357 (** Get overall stats of a video 358 + @param id The object id, uuid or short uuid 348 359 @param start_date Filter stats by start date 349 360 @param end_date Filter stats by end date 350 361 *) 351 - val get_api_v1_videos_stats_overall : ?start_date:string -> ?end_date:string -> t -> unit -> T.t 362 + val get_api_v1_videos_stats_overall : id:string -> ?start_date:string -> ?end_date:string -> t -> unit -> T.t 352 363 end 353 364 354 365 module VideoStateConstant : sig ··· 432 443 433 444 (** Get video source file metadata 434 445 435 - Get metadata and download link of original video file *) 436 - val get_video_source : t -> unit -> T.t 446 + Get metadata and download link of original video file 447 + @param id The object id, uuid or short uuid 448 + *) 449 + val get_video_source : id:string -> t -> unit -> T.t 437 450 end 438 451 439 452 module VideoResolutionSet : sig ··· 692 705 val v : unit -> t 693 706 end 694 707 695 - (** Get a video *) 696 - val get_video : t -> unit -> T.t 708 + (** Get a video 709 + @param id The object id, uuid or short uuid 710 + *) 711 + val get_video : id:string -> t -> unit -> T.t 697 712 end 698 713 699 714 module VideoCreateImport : sig ··· 754 769 755 770 (** Get chapters of a video 756 771 757 - **PeerTube >= 6.0** *) 758 - val get_video_chapters : t -> unit -> T.t 772 + **PeerTube >= 6.0** 773 + @param id The object id, uuid or short uuid 774 + *) 775 + val get_video_chapters : id:string -> t -> unit -> T.t 759 776 end 760 777 761 778 module VideoChannelSyncList : sig ··· 772 789 val jsont : t Jsont.t 773 790 end 774 791 775 - (** List the synchronizations of video channels of an account *) 776 - val get_api_v1_accounts_video_channel_syncs : t -> unit -> T.t 792 + (** List the synchronizations of video channels of an account 793 + @param name The username or handle of the account 794 + @param start Offset used to paginate results 795 + @param count Number of items to return 796 + @param sort Sort column 797 + @param include_collaborations **PeerTube >= 8.0** Include objects from collaborated channels 798 + *) 799 + val get_api_v1_accounts_video_channel_syncs : name:string -> ?start:string -> ?count:string -> ?sort:string -> ?include_collaborations:string -> t -> unit -> T.t 777 800 end 778 801 779 802 module VideoChannelList : sig ··· 791 814 end 792 815 793 816 (** List video channels of an account 817 + @param name The username or handle of the account 794 818 @param with_stats include daily view statistics for the last 30 days and total views (only if authenticated as the account user) 819 + @param start Offset used to paginate results 820 + @param count Number of items to return 821 + @param search Plain text search, applied to various parts of the model depending on endpoint 822 + @param sort Sort column 823 + @param include_collaborations **PeerTube >= 8.0** Include objects from collaborated channels 795 824 *) 796 - val get_api_v1_accounts_video_channels : ?with_stats:string -> t -> unit -> T.t 825 + val get_api_v1_accounts_video_channels : name:string -> ?with_stats:string -> ?start:string -> ?count:string -> ?search:string -> ?sort:string -> ?include_collaborations:string -> t -> unit -> T.t 797 826 798 827 (** Search channels 799 828 @param search 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. 800 829 830 + @param start Offset used to paginate results 831 + @param count Number of items to return 832 + @param search_target If the administrator enabled search index support, you can override the default search target. 833 + 834 + **Warning**: If you choose to make an index search, PeerTube will get results from a third party service. It means the instance may not yet know the objects you fetched. If you want to load video/channel information: 835 + * If the current user has the ability to make a remote URI search (this information is available in the config endpoint), 836 + then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. 837 + After that, you can use the classic REST API endpoints to fetch the complete object or interact with it 838 + * If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch 839 + the data from the origin instance API 840 + 841 + @param sort Sort column 842 + @param host Find elements owned by this host 843 + @param handles Find elements with these handles 801 844 *) 802 - val search_channels : search:string -> t -> unit -> T.t 845 + val search_channels : search:string -> ?start:string -> ?count:string -> ?search_target:string -> ?sort:string -> ?host:string -> ?handles:string -> t -> unit -> T.t 803 846 804 - (** List my user subscriptions *) 805 - val get_api_v1_users_me_subscriptions : t -> unit -> T.t 847 + (** List my user subscriptions 848 + @param start Offset used to paginate results 849 + @param count Number of items to return 850 + *) 851 + val get_api_v1_users_me_subscriptions : ?start:string -> ?count:string -> ?sort:string -> t -> unit -> T.t 806 852 807 - (** List video channels *) 808 - val get_video_channels : t -> unit -> T.t 853 + (** List video channels 854 + @param start Offset used to paginate results 855 + @param count Number of items to return 856 + @param sort Sort column 857 + *) 858 + val get_video_channels : ?start:string -> ?count:string -> ?sort:string -> t -> unit -> T.t 809 859 end 810 860 811 861 module VideoChannelEdit : sig ··· 905 955 val v : unit -> t 906 956 end 907 957 908 - (** Get subscription of my user *) 909 - val get_api_v1_users_me_subscriptions : t -> unit -> T.t 958 + (** Get subscription of my user 959 + @param subscription_handle The subscription handle 960 + *) 961 + val get_api_v1_users_me_subscriptions : subscription_handle:string -> t -> unit -> T.t 910 962 911 - (** Get a video channel *) 912 - val get_video_channel : t -> unit -> T.t 963 + (** Get a video channel 964 + @param channel_handle The video channel handle 965 + *) 966 + val get_video_channel : channel_handle:string -> t -> unit -> T.t 913 967 end 914 968 915 969 module VideoCategorySet : sig ··· 1645 1699 1646 1700 (** Request two factor auth 1647 1701 1648 - Request two factor authentication for a user *) 1649 - val request_two_factor : t -> unit -> Response.t 1702 + Request two factor authentication for a user 1703 + @param id Entity id 1704 + *) 1705 + val request_two_factor : id:string -> t -> unit -> Response.t 1650 1706 end 1651 1707 1652 1708 module PredefinedAbuseReasons : sig ··· 1714 1770 val jsont : t Jsont.t 1715 1771 end 1716 1772 1717 - (** List plugins *) 1718 - val get_plugins : ?plugin_type:string -> ?uninstalled:string -> t -> unit -> Response.t 1773 + (** List plugins 1774 + @param start Offset used to paginate results 1775 + @param count Number of items to return 1776 + @param sort Sort column 1777 + *) 1778 + val get_plugins : ?plugin_type:string -> ?uninstalled:string -> ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Response.t 1719 1779 1720 - (** List available plugins *) 1721 - val get_available_plugins : ?search:string -> ?plugin_type:string -> ?current_peer_tube_engine:string -> t -> unit -> Response.t 1780 + (** List available plugins 1781 + @param start Offset used to paginate results 1782 + @param count Number of items to return 1783 + @param sort Sort column 1784 + *) 1785 + val get_available_plugins : ?search:string -> ?plugin_type:string -> ?current_peer_tube_engine:string -> ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Response.t 1722 1786 1723 - (** Get a plugin *) 1724 - val get_plugin : t -> unit -> T.t 1787 + (** Get a plugin 1788 + @param npm_name name of the plugin/theme on npmjs.com or in its package.json 1789 + *) 1790 + val get_plugin : npm_name:string -> t -> unit -> T.t 1725 1791 end 1726 1792 1727 1793 module PlaylistElement : sig ··· 1790 1856 (** Get video player settings 1791 1857 1792 1858 Get player settings for a specific video. Returns video-specific settings merged with channel player settings. 1859 + @param id The object id, uuid or short uuid 1793 1860 @param raw Return raw settings without merging channel defaults 1794 1861 *) 1795 - val get_video_player_settings : ?raw:string -> t -> unit -> T.t 1862 + val get_video_player_settings : id:string -> ?raw:string -> t -> unit -> T.t 1796 1863 1797 1864 (** Update video player settings 1798 1865 1799 - Update player settings for a specific video *) 1800 - val update_video_player_settings : body:Update.t -> t -> unit -> T.t 1866 + Update player settings for a specific video 1867 + @param id The object id, uuid or short uuid 1868 + *) 1869 + val update_video_player_settings : id:string -> body:Update.t -> t -> unit -> T.t 1801 1870 end 1802 1871 1803 1872 module PlayerThemeChannelSetting : sig ··· 1845 1914 (** Get channel player settings 1846 1915 1847 1916 Get player settings for a video channel. 1917 + @param channel_handle The video channel handle 1848 1918 @param raw Return raw settings without applying instance defaults 1849 1919 *) 1850 - val get_channel_player_settings : ?raw:string -> t -> unit -> T.t 1920 + val get_channel_player_settings : channel_handle:string -> ?raw:string -> t -> unit -> T.t 1851 1921 1852 1922 (** Update channel player settings 1853 1923 1854 - Update default player settings for a video channel. *) 1855 - val update_channel_player_settings : body:Update.t -> t -> unit -> T.t 1924 + Update default player settings for a video channel. 1925 + @param channel_handle The video channel handle 1926 + *) 1927 + val update_channel_player_settings : channel_handle:string -> body:Update.t -> t -> unit -> T.t 1856 1928 end 1857 1929 1858 1930 module PlayerTheme : sig ··· 2342 2414 2343 2415 (** Get live session of a replay 2344 2416 2345 - If the video is a replay of a live, you can find the associated live session using this endpoint *) 2346 - val get_api_v1_videos_live_session : t -> unit -> Response.t 2417 + If the video is a replay of a live, you can find the associated live session using this endpoint 2418 + @param id The object id, uuid or short uuid 2419 + *) 2420 + val get_api_v1_videos_live_session : id:string -> t -> unit -> Response.t 2347 2421 end 2348 2422 2349 2423 module LiveVideoLatencyMode : sig ··· 2432 2506 val jsont : t Jsont.t 2433 2507 end 2434 2508 2435 - (** Get information about a live *) 2436 - val get_live_id : t -> unit -> Response.t 2509 + (** Get information about a live 2510 + @param id The object id, uuid or short uuid 2511 + *) 2512 + val get_live_id : id:string -> t -> unit -> Response.t 2437 2513 end 2438 2514 2439 2515 module ImportVideosInChannel : sig ··· 2507 2583 2508 2584 (** List videos being mirrored 2509 2585 @param target direction of the mirror 2586 + @param start Offset used to paginate results 2587 + @param count Number of items to return 2588 + @param sort Sort abuses by criteria 2510 2589 *) 2511 - val get_mirrored_videos : target:string -> t -> unit -> T.t 2590 + val get_mirrored_videos : target:string -> ?start:string -> ?count:string -> ?sort:string -> t -> unit -> T.t 2512 2591 end 2513 2592 2514 2593 module VideoPassword : sig ··· 2596 2675 end 2597 2676 2598 2677 (** Get video imports of my user 2678 + @param id Entity id 2679 + @param start Offset used to paginate results 2680 + @param count Number of items to return 2681 + @param sort Sort column 2682 + @param include_collaborations **PeerTube >= 8.0** Include objects from collaborated channels 2599 2683 @param video_id Filter on import video ID 2600 2684 @param target_url Filter on import target URL 2601 2685 @param video_channel_sync_id Filter on imports created by a specific channel synchronization 2602 2686 @param search Search in video names 2603 2687 *) 2604 - val get_api_v1_users_me_videos_imports : ?video_id:string -> ?target_url:string -> ?video_channel_sync_id:string -> ?search:string -> t -> unit -> T.t 2688 + val get_api_v1_users_me_videos_imports : id:string -> ?start:string -> ?count:string -> ?sort:string -> ?include_collaborations:string -> ?video_id:string -> ?target_url:string -> ?video_channel_sync_id:string -> ?search:string -> t -> unit -> T.t 2605 2689 end 2606 2690 2607 2691 module VideoChannelSync : sig ··· 2651 2735 @param search_video_channel only list reports of a specific video channel 2652 2736 @param video_is only list deleted or blocklisted videos 2653 2737 @param filter only list account, comment or video reports 2738 + @param start Offset used to paginate results 2739 + @param count Number of items to return 2740 + @param sort Sort abuses by criteria 2654 2741 *) 2655 - val get_abuses : ?id:string -> ?predefined_reason:string -> ?search:string -> ?state:string -> ?search_reporter:string -> ?search_reportee:string -> ?search_video:string -> ?search_video_channel:string -> ?video_is:string -> ?filter:string -> t -> unit -> Jsont.json 2742 + val get_abuses : ?id:string -> ?predefined_reason:string -> ?search:string -> ?state:string -> ?search_reporter:string -> ?search_reportee:string -> ?search_video:string -> ?search_video_channel:string -> ?video_is:string -> ?filter:string -> ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Jsont.json 2656 2743 2657 2744 (** Report an abuse *) 2658 2745 val post_api_v1_abuses : t -> unit -> Jsont.json 2659 2746 2660 - (** Update an abuse *) 2661 - val put_api_v1_abuses : t -> unit -> Jsont.json 2747 + (** Update an abuse 2748 + @param abuse_id Abuse id 2749 + *) 2750 + val put_api_v1_abuses : abuse_id:string -> t -> unit -> Jsont.json 2662 2751 2663 - (** Delete an abuse *) 2664 - val delete_api_v1_abuses : t -> unit -> Jsont.json 2752 + (** Delete an abuse 2753 + @param abuse_id Abuse id 2754 + *) 2755 + val delete_api_v1_abuses : abuse_id:string -> t -> unit -> Jsont.json 2665 2756 2666 - (** List messages of an abuse *) 2667 - val get_api_v1_abuses_messages : t -> unit -> Jsont.json 2757 + (** List messages of an abuse 2758 + @param abuse_id Abuse id 2759 + *) 2760 + val get_api_v1_abuses_messages : abuse_id:string -> t -> unit -> Jsont.json 2668 2761 2669 - (** Add message to an abuse *) 2670 - val post_api_v1_abuses_messages : t -> unit -> Jsont.json 2762 + (** Add message to an abuse 2763 + @param abuse_id Abuse id 2764 + *) 2765 + val post_api_v1_abuses_messages : abuse_id:string -> t -> unit -> Jsont.json 2671 2766 2672 - (** Delete an abuse message *) 2673 - val delete_api_v1_abuses_messages : t -> unit -> Jsont.json 2767 + (** Delete an abuse message 2768 + @param abuse_id Abuse id 2769 + @param abuse_message_id Abuse message id 2770 + *) 2771 + val delete_api_v1_abuses_messages : abuse_id:string -> abuse_message_id:string -> t -> unit -> Jsont.json 2674 2772 2675 - (** List accounts *) 2676 - val get_accounts : t -> unit -> Jsont.json 2773 + (** List accounts 2774 + @param start Offset used to paginate results 2775 + @param count Number of items to return 2776 + @param sort Sort column 2777 + *) 2778 + val get_accounts : ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Jsont.json 2677 2779 2678 - (** List followers of an account *) 2679 - val get_account_followers : t -> unit -> Jsont.json 2780 + (** List followers of an account 2781 + @param name The username or handle of the account 2782 + @param start Offset used to paginate results 2783 + @param count Number of items to return 2784 + @param sort Sort followers by criteria 2785 + @param search Plain text search, applied to various parts of the model depending on endpoint 2786 + *) 2787 + val get_account_followers : name:string -> ?start:string -> ?count:string -> ?sort:string -> ?search:string -> t -> unit -> Jsont.json 2680 2788 2681 2789 (** List playlists of an account 2790 + @param name The username or handle of the account 2791 + @param start Offset used to paginate results 2792 + @param count Number of items to return 2793 + @param sort Sort column 2794 + @param search Plain text search, applied to various parts of the model depending on endpoint 2795 + @param include_collaborations **PeerTube >= 8.0** Include objects from collaborated channels 2682 2796 @param channel_name_one_of **PeerTube >= 8.0** Filter on playlists that are published on a channel with one of these names 2683 2797 *) 2684 - val get_api_v1_accounts_video_playlists : ?channel_name_one_of:string -> t -> unit -> Jsont.json 2798 + val get_api_v1_accounts_video_playlists : name:string -> ?start:string -> ?count:string -> ?sort:string -> ?search:string -> ?playlist_type:string -> ?include_collaborations:string -> ?channel_name_one_of:string -> t -> unit -> Jsont.json 2685 2799 2686 2800 (** Update account auto tag policies on comments 2687 2801 ··· 2714 2828 val post_api_v1_config_instance_banner_pick : t -> unit -> Jsont.json 2715 2829 2716 2830 (** Delete instance logo *) 2717 - val delete_api_v1_config_instance_logo_logo_type : t -> unit -> Jsont.json 2831 + val delete_api_v1_config_instance_logo_logo_type : logo_type:string -> t -> unit -> Jsont.json 2718 2832 2719 2833 (** Update instance logo *) 2720 - val post_api_v1_config_instance_logo_logo_type_pick : t -> unit -> Jsont.json 2834 + val post_api_v1_config_instance_logo_logo_type_pick : logo_type:string -> t -> unit -> Jsont.json 2721 2835 2722 2836 (** Set instance custom homepage *) 2723 2837 val put_api_v1_custom_pages_homepage_instance : t -> unit -> Jsont.json ··· 2730 2844 2731 2845 (** List instance jobs 2732 2846 @param state The state of the job ('' for for no filter) 2847 + @param job_type job type 2848 + @param start Offset used to paginate results 2849 + @param count Number of items to return 2850 + @param sort Sort column 2733 2851 *) 2734 - val get_jobs : state:string -> t -> unit -> Jsont.json 2852 + val get_jobs : state:string -> ?job_type:string -> ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Jsont.json 2735 2853 2736 2854 (** Create playback metrics 2737 2855 ··· 2747 2865 (** Update a plugin *) 2748 2866 val update_plugin : t -> unit -> Jsont.json 2749 2867 2750 - (** Get a plugin's public settings *) 2751 - val get_api_v1_plugins_public_settings : t -> unit -> Jsont.json 2868 + (** Get a plugin's public settings 2869 + @param npm_name name of the plugin/theme on npmjs.com or in its package.json 2870 + *) 2871 + val get_api_v1_plugins_public_settings : npm_name:string -> t -> unit -> Jsont.json 2752 2872 2753 - (** Get a plugin's registered settings *) 2754 - val get_api_v1_plugins_registered_settings : t -> unit -> Jsont.json 2873 + (** Get a plugin's registered settings 2874 + @param npm_name name of the plugin/theme on npmjs.com or in its package.json 2875 + *) 2876 + val get_api_v1_plugins_registered_settings : npm_name:string -> t -> unit -> Jsont.json 2755 2877 2756 - (** Set a plugin's settings *) 2757 - val put_api_v1_plugins_settings : t -> unit -> Jsont.json 2878 + (** Set a plugin's settings 2879 + @param npm_name name of the plugin/theme on npmjs.com or in its package.json 2880 + *) 2881 + val put_api_v1_plugins_settings : npm_name:string -> t -> unit -> Jsont.json 2758 2882 2759 - (** List runners *) 2760 - val get_api_v1_runners : t -> unit -> Jsont.json 2883 + (** List runners 2884 + @param start Offset used to paginate results 2885 + @param count Number of items to return 2886 + @param sort Sort runners by criteria 2887 + *) 2888 + val get_api_v1_runners : ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Jsont.json 2761 2889 2762 - (** List jobs *) 2763 - val get_api_v1_runners_jobs : ?state_one_of:string -> t -> unit -> Jsont.json 2890 + (** List jobs 2891 + @param start Offset used to paginate results 2892 + @param count Number of items to return 2893 + @param sort Sort runner jobs by criteria 2894 + @param search Plain text search, applied to various parts of the model depending on endpoint 2895 + *) 2896 + val get_api_v1_runners_jobs : ?start:string -> ?count:string -> ?sort:string -> ?search:string -> ?state_one_of:string -> t -> unit -> Jsont.json 2764 2897 2765 2898 (** Request a new job 2766 2899 ··· 2770 2903 (** Delete a job 2771 2904 2772 2905 The endpoint will first cancel the job if needed, and then remove it from the database. Children jobs will also be removed *) 2773 - val delete_api_v1_runners_jobs : t -> unit -> Jsont.json 2906 + val delete_api_v1_runners_jobs : job_uuid:string -> t -> unit -> Jsont.json 2774 2907 2775 2908 (** Abort job 2776 2909 2777 2910 API used by PeerTube runners *) 2778 - val post_api_v1_runners_jobs_abort : t -> unit -> Jsont.json 2911 + val post_api_v1_runners_jobs_abort : job_uuid:string -> t -> unit -> Jsont.json 2779 2912 2780 2913 (** Accept job 2781 2914 2782 2915 API used by PeerTube runners *) 2783 - val post_api_v1_runners_jobs_accept : t -> unit -> Jsont.json 2916 + val post_api_v1_runners_jobs_accept : job_uuid:string -> t -> unit -> Jsont.json 2784 2917 2785 2918 (** Cancel a job *) 2786 - val get_api_v1_runners_jobs_cancel : t -> unit -> Jsont.json 2919 + val get_api_v1_runners_jobs_cancel : job_uuid:string -> t -> unit -> Jsont.json 2787 2920 2788 2921 (** Post job error 2789 2922 2790 2923 API used by PeerTube runners *) 2791 - val post_api_v1_runners_jobs_error : t -> unit -> Jsont.json 2924 + val post_api_v1_runners_jobs_error : job_uuid:string -> t -> unit -> Jsont.json 2792 2925 2793 2926 (** Post job success 2794 2927 2795 2928 API used by PeerTube runners *) 2796 - val post_api_v1_runners_jobs_success : t -> unit -> Jsont.json 2929 + val post_api_v1_runners_jobs_success : job_uuid:string -> t -> unit -> Jsont.json 2797 2930 2798 2931 (** Update job 2799 2932 2800 2933 API used by PeerTube runners *) 2801 - val post_api_v1_runners_jobs_update : t -> unit -> Jsont.json 2934 + val post_api_v1_runners_jobs_update : job_uuid:string -> t -> unit -> Jsont.json 2802 2935 2803 2936 (** Register a new runner 2804 2937 2805 2938 API used by PeerTube runners *) 2806 2939 val post_api_v1_runners_register : t -> unit -> Jsont.json 2807 2940 2808 - (** List registration tokens *) 2809 - val get_api_v1_runners_registration_tokens : t -> unit -> Jsont.json 2941 + (** List registration tokens 2942 + @param start Offset used to paginate results 2943 + @param count Number of items to return 2944 + @param sort Sort registration tokens by criteria 2945 + *) 2946 + val get_api_v1_runners_registration_tokens : ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Jsont.json 2810 2947 2811 2948 (** Generate registration token 2812 2949 ··· 2816 2953 (** Remove registration token 2817 2954 2818 2955 Remove a registration token. Runners that used this token for their registration are automatically removed. *) 2819 - val delete_api_v1_runners_registration_tokens : t -> unit -> Jsont.json 2956 + val delete_api_v1_runners_registration_tokens : registration_token_id:string -> t -> unit -> Jsont.json 2820 2957 2821 2958 (** Unregister a runner 2822 2959 ··· 2824 2961 val post_api_v1_runners_unregister : t -> unit -> Jsont.json 2825 2962 2826 2963 (** Delete a runner *) 2827 - val delete_api_v1_runners : t -> unit -> Jsont.json 2964 + val delete_api_v1_runners : runner_id:string -> t -> unit -> Jsont.json 2828 2965 2829 2966 (** Search playlists 2830 2967 @param search 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 playlist information and interact with it. 2831 2968 2969 + @param start Offset used to paginate results 2970 + @param count Number of items to return 2971 + @param search_target If the administrator enabled search index support, you can override the default search target. 2972 + 2973 + **Warning**: If you choose to make an index search, PeerTube will get results from a third party service. It means the instance may not yet know the objects you fetched. If you want to load video/channel information: 2974 + * If the current user has the ability to make a remote URI search (this information is available in the config endpoint), 2975 + then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. 2976 + After that, you can use the classic REST API endpoints to fetch the complete object or interact with it 2977 + * If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch 2978 + the data from the origin instance API 2979 + 2980 + @param sort Sort column 2981 + @param host Find elements owned by this host 2982 + @param uuids Find elements with specific UUIDs 2832 2983 *) 2833 - val search_playlists : search:string -> t -> unit -> Jsont.json 2984 + val search_playlists : search:string -> ?start:string -> ?count:string -> ?search_target:string -> ?sort:string -> ?host:string -> ?uuids:string -> t -> unit -> Jsont.json 2834 2985 2835 2986 (** Get instance audit logs *) 2836 2987 val get_instance_audit_logs : t -> unit -> Jsont.json 2837 2988 2838 - (** List account blocks *) 2839 - val get_api_v1_server_blocklist_accounts : t -> unit -> Jsont.json 2989 + (** List account blocks 2990 + @param start Offset used to paginate results 2991 + @param count Number of items to return 2992 + @param sort Sort column 2993 + *) 2994 + val get_api_v1_server_blocklist_accounts : ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Jsont.json 2840 2995 2841 2996 (** Block an account *) 2842 2997 val post_api_v1_server_blocklist_accounts : t -> unit -> Jsont.json ··· 2846 3001 *) 2847 3002 val delete_api_v1_server_blocklist_accounts : account_name:string -> t -> unit -> Jsont.json 2848 3003 2849 - (** List server blocks *) 2850 - val get_api_v1_server_blocklist_servers : t -> unit -> Jsont.json 3004 + (** List server blocks 3005 + @param start Offset used to paginate results 3006 + @param count Number of items to return 3007 + @param sort Sort column 3008 + *) 3009 + val get_api_v1_server_blocklist_servers : ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Jsont.json 2851 3010 2852 3011 (** Block a server *) 2853 3012 val post_api_v1_server_blocklist_servers : t -> unit -> Jsont.json ··· 2857 3016 *) 2858 3017 val delete_api_v1_server_blocklist_servers : host:string -> t -> unit -> Jsont.json 2859 3018 2860 - (** List instances following the server *) 2861 - val get_api_v1_server_followers : t -> unit -> Jsont.json 3019 + (** List instances following the server 3020 + @param start Offset used to paginate results 3021 + @param count Number of items to return 3022 + @param sort Sort column 3023 + *) 3024 + val get_api_v1_server_followers : ?state:string -> ?actor_type:string -> ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Jsont.json 2862 3025 2863 3026 (** Remove or reject a follower to your server 2864 3027 @param handle The remote actor handle to remove from your followers ··· 2875 3038 *) 2876 3039 val post_api_v1_server_followers_reject : handle:string -> t -> unit -> Jsont.json 2877 3040 2878 - (** List instances followed by the server *) 2879 - val get_api_v1_server_following : t -> unit -> Jsont.json 3041 + (** List instances followed by the server 3042 + @param start Offset used to paginate results 3043 + @param count Number of items to return 3044 + @param sort Sort column 3045 + *) 3046 + val get_api_v1_server_following : ?state:string -> ?actor_type:string -> ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Jsont.json 2880 3047 2881 3048 (** Follow a list of actors (PeerTube instance, channel or account) *) 2882 3049 val post_api_v1_server_following : t -> unit -> Jsont.json ··· 2918 3085 2919 3086 (** List my abuses 2920 3087 @param id only list the report with this id 3088 + @param sort Sort abuses by criteria 3089 + @param start Offset used to paginate results 3090 + @param count Number of items to return 2921 3091 *) 2922 - val get_my_abuses : ?id:string -> ?state:string -> t -> unit -> Jsont.json 3092 + val get_my_abuses : ?id:string -> ?state:string -> ?sort:string -> ?start:string -> ?count:string -> t -> unit -> Jsont.json 2923 3093 2924 3094 (** Delete my avatar *) 2925 3095 val delete_api_v1_users_me_avatar : t -> unit -> Jsont.json ··· 2950 3120 (** Add subscription to my user *) 2951 3121 val post_api_v1_users_me_subscriptions : t -> unit -> Jsont.json 2952 3122 2953 - (** Get if subscriptions exist for my user *) 2954 - val get_api_v1_users_me_subscriptions_exist : t -> unit -> Jsont.json 3123 + (** Get if subscriptions exist for my user 3124 + @param uris list of uris to check if each is part of the user subscriptions 3125 + *) 3126 + val get_api_v1_users_me_subscriptions_exist : uris:string -> t -> unit -> Jsont.json 2955 3127 2956 - (** Delete subscription of my user *) 2957 - val delete_api_v1_users_me_subscriptions : t -> unit -> Jsont.json 3128 + (** Delete subscription of my user 3129 + @param subscription_handle The subscription handle 3130 + *) 3131 + val delete_api_v1_users_me_subscriptions : subscription_handle:string -> t -> unit -> Jsont.json 2958 3132 2959 3133 (** Check video exists in my playlists 2960 3134 @param video_ids The video ids to check ··· 2966 3140 2967 3141 (** List comments on user's videos 2968 3142 2969 - **PeerTube >= 6.2** *) 2970 - val get_api_v1_users_me_videos_comments : t -> unit -> Jsont.json 3143 + **PeerTube >= 6.2** 3144 + @param search Plain text search, applied to various parts of the model depending on endpoint 3145 + @param search_account Filter comments by searching on the account 3146 + @param search_video Filter comments by searching on the video 3147 + @param video_id Limit results on this specific video 3148 + @param video_channel_id Limit results on this specific video channel 3149 + @param auto_tag_one_of **PeerTube >= 6.2** filter on comments that contain one of these automatic tags 3150 + @param is_held_for_review only display comments that are held for review 3151 + @param include_collaborations **PeerTube >= 8.0** Include objects from collaborated channels 3152 + *) 3153 + val get_api_v1_users_me_videos_comments : ?search:string -> ?search_account:string -> ?search_video:string -> ?video_id:string -> ?video_channel_id:string -> ?auto_tag_one_of:string -> ?is_held_for_review:string -> ?include_collaborations:string -> t -> unit -> Jsont.json 2971 3154 2972 3155 (** Register a user 2973 3156 2974 3157 Signup has to be enabled and signup approval is not required *) 2975 3158 val register_user : body:RegisterUser.T.t -> t -> unit -> Jsont.json 2976 3159 2977 - (** List registrations *) 2978 - val list_registrations : ?search:string -> ?sort:string -> t -> unit -> Jsont.json 3160 + (** List registrations 3161 + @param start Offset used to paginate results 3162 + @param count Number of items to return 3163 + *) 3164 + val list_registrations : ?start:string -> ?count:string -> ?search:string -> ?sort:string -> t -> unit -> Jsont.json 2979 3165 2980 3166 (** Resend verification link to registration request email *) 2981 3167 val resend_email_to_verify_registration : t -> unit -> Jsont.json 2982 3168 2983 3169 (** Delete registration 2984 3170 2985 - Delete the registration entry. It will not remove the user associated with this registration (if any) *) 2986 - val delete_registration : t -> unit -> Jsont.json 3171 + Delete the registration entry. It will not remove the user associated with this registration (if any) 3172 + @param registration_id Registration ID 3173 + *) 3174 + val delete_registration : registration_id:string -> t -> unit -> Jsont.json 2987 3175 2988 - (** Accept registration *) 2989 - val accept_registration : body:UserRegistrationAcceptOrReject.T.t -> t -> unit -> Jsont.json 3176 + (** Accept registration 3177 + @param registration_id Registration ID 3178 + *) 3179 + val accept_registration : registration_id:string -> body:UserRegistrationAcceptOrReject.T.t -> t -> unit -> Jsont.json 2990 3180 2991 - (** Reject registration *) 2992 - val reject_registration : body:UserRegistrationAcceptOrReject.T.t -> t -> unit -> Jsont.json 3181 + (** Reject registration 3182 + @param registration_id Registration ID 3183 + *) 3184 + val reject_registration : registration_id:string -> body:UserRegistrationAcceptOrReject.T.t -> t -> unit -> Jsont.json 2993 3185 2994 3186 (** Verify a registration email 2995 3187 2996 3188 Following a user registration request, the user will receive an email asking to click a link 2997 3189 containing a secret. 2998 - *) 2999 - val verify_registration_email : t -> unit -> Jsont.json 3190 + 3191 + @param registration_id Registration ID 3192 + *) 3193 + val verify_registration_email : registration_id:string -> t -> unit -> Jsont.json 3000 3194 3001 3195 (** Logout 3002 3196 ··· 3009 3203 val get_oauth_token : t -> unit -> Jsont.json 3010 3204 3011 3205 (** Get a user 3206 + @param id Entity id 3012 3207 @param with_stats include statistics about the user (only available as a moderator/admin) 3013 3208 *) 3014 - val get_user : ?with_stats:string -> t -> unit -> Jsont.json 3209 + val get_user : id:string -> ?with_stats:string -> t -> unit -> Jsont.json 3015 3210 3016 - (** Update a user *) 3017 - val put_user : body:UpdateUser.T.t -> t -> unit -> Jsont.json 3211 + (** Update a user 3212 + @param id Entity id 3213 + *) 3214 + val put_user : id:string -> body:UpdateUser.T.t -> t -> unit -> Jsont.json 3018 3215 3019 - (** Delete a user *) 3020 - val del_user : t -> unit -> Jsont.json 3216 + (** Delete a user 3217 + @param id Entity id 3218 + *) 3219 + val del_user : id:string -> t -> unit -> Jsont.json 3021 3220 3022 - (** Reset password *) 3023 - val post_api_v1_users_reset_password : t -> unit -> Jsont.json 3221 + (** Reset password 3222 + @param id Entity id 3223 + *) 3224 + val post_api_v1_users_reset_password : id:string -> t -> unit -> Jsont.json 3024 3225 3025 - (** List token sessions *) 3026 - val get_api_v1_users_token_sessions : t -> unit -> Jsont.json 3226 + (** List token sessions 3227 + @param id Entity id 3228 + *) 3229 + val get_api_v1_users_token_sessions : id:string -> t -> unit -> Jsont.json 3027 3230 3028 - (** List token sessions *) 3029 - val get_api_v1_users_token_sessions_revoke : t -> unit -> Jsont.json 3231 + (** List token sessions 3232 + @param id Entity id 3233 + @param token_session_id Token session Id 3234 + *) 3235 + val get_api_v1_users_token_sessions_revoke : id:string -> token_session_id:string -> t -> unit -> Jsont.json 3030 3236 3031 3237 (** Confirm two factor auth 3032 3238 3033 - Confirm a two factor authentication request *) 3034 - val confirm_two_factor_request : t -> unit -> Jsont.json 3239 + Confirm a two factor authentication request 3240 + @param id Entity id 3241 + *) 3242 + val confirm_two_factor_request : id:string -> t -> unit -> Jsont.json 3035 3243 3036 3244 (** Disable two factor auth 3037 3245 3038 - Disable two factor authentication of a user *) 3039 - val disable_two_factor : t -> unit -> Jsont.json 3246 + Disable two factor authentication of a user 3247 + @param id Entity id 3248 + *) 3249 + val disable_two_factor : id:string -> t -> unit -> Jsont.json 3040 3250 3041 3251 (** Verify a user 3042 3252 3043 3253 Following a user registration, the new user will receive an email asking to click a link 3044 3254 containing a secret. 3045 3255 This endpoint can also be used to verify a new email set in the user account. 3046 - *) 3047 - val verify_user : t -> unit -> Jsont.json 3256 + 3257 + @param id Entity id 3258 + *) 3259 + val verify_user : id:string -> t -> unit -> Jsont.json 3048 3260 3049 3261 (** List user exports 3050 3262 3051 - **PeerTube >= 6.1** *) 3052 - val list_user_exports : t -> unit -> Jsont.json 3263 + **PeerTube >= 6.1** 3264 + @param user_id User id 3265 + *) 3266 + val list_user_exports : user_id:string -> t -> unit -> Jsont.json 3053 3267 3054 3268 (** Request user export 3055 3269 3056 - Request an archive of user data. An email is sent when the archive is ready. *) 3057 - val request_user_export : t -> unit -> Jsont.json 3270 + Request an archive of user data. An email is sent when the archive is ready. 3271 + @param user_id User id 3272 + *) 3273 + val request_user_export : user_id:string -> t -> unit -> Jsont.json 3058 3274 3059 3275 (** Delete a user export 3060 3276 3061 - **PeerTube >= 6.1** *) 3062 - val delete_user_export : t -> unit -> Jsont.json 3277 + **PeerTube >= 6.1** 3278 + @param user_id User id 3279 + @param id Entity id 3280 + *) 3281 + val delete_user_export : user_id:string -> id:string -> t -> unit -> Jsont.json 3063 3282 3064 3283 (** Initialize the resumable user import 3065 3284 3066 - **PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the import of the archive *) 3067 - val user_import_resumable_init : body:UserImportResumable.T.t -> t -> unit -> Jsont.json 3285 + **PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the import of the archive 3286 + @param user_id User id 3287 + *) 3288 + val user_import_resumable_init : user_id:string -> body:UserImportResumable.T.t -> t -> unit -> Jsont.json 3068 3289 3069 3290 (** Send chunk for the resumable user import 3070 3291 3071 - **PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the import of the archive *) 3072 - val user_import_resumable : t -> unit -> Jsont.json 3292 + **PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the import of the archive 3293 + @param user_id User id 3294 + @param upload_id Created session id to proceed with. If you didn't send chunks in the last hour, it is 3295 + not valid anymore and you need to initialize a new upload. 3296 + 3297 + *) 3298 + val user_import_resumable : user_id:string -> upload_id:string -> t -> unit -> Jsont.json 3073 3299 3074 3300 (** Cancel the resumable user import 3075 3301 3076 - **PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the resumable user import *) 3077 - val user_import_resumable_cancel : t -> unit -> Jsont.json 3302 + **PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the resumable user import 3303 + @param user_id User id 3304 + @param upload_id Created session id to proceed with. If you didn't send chunks in the last hour, it is 3305 + not valid anymore and you need to initialize a new upload. 3306 + 3307 + *) 3308 + val user_import_resumable_cancel : user_id:string -> upload_id:string -> t -> unit -> Jsont.json 3078 3309 3079 3310 (** Get latest user import 3080 3311 3081 - **PeerTube >= 6.1** *) 3082 - val get_latest_user_import : t -> unit -> Jsont.json 3312 + **PeerTube >= 6.1** 3313 + @param user_id User id 3314 + *) 3315 + val get_latest_user_import : user_id:string -> t -> unit -> Jsont.json 3083 3316 3084 3317 (** Create a synchronization for a video channel *) 3085 3318 val add_video_channel_sync : body:VideoChannelSync.Create.t -> t -> unit -> Jsont.json 3086 3319 3087 - (** Delete a video channel synchronization *) 3088 - val del_video_channel_sync : t -> unit -> Jsont.json 3320 + (** Delete a video channel synchronization 3321 + @param channel_sync_id Channel Sync id 3322 + *) 3323 + val del_video_channel_sync : channel_sync_id:string -> t -> unit -> Jsont.json 3089 3324 3090 - (** Triggers the channel synchronization job, fetching all the videos from the remote channel *) 3091 - val trigger_video_channel_sync : t -> unit -> Jsont.json 3325 + (** Triggers the channel synchronization job, fetching all the videos from the remote channel 3326 + @param channel_sync_id Channel Sync id 3327 + *) 3328 + val trigger_video_channel_sync : channel_sync_id:string -> t -> unit -> Jsont.json 3092 3329 3093 3330 (** Create a video channel *) 3094 3331 val add_video_channel : body:VideoChannel.Create.t -> t -> unit -> Jsont.json 3095 3332 3096 - (** Update a video channel *) 3097 - val put_video_channel : body:VideoChannel.Update.t -> t -> unit -> Jsont.json 3333 + (** Update a video channel 3334 + @param channel_handle The video channel handle 3335 + *) 3336 + val put_video_channel : channel_handle:string -> body:VideoChannel.Update.t -> t -> unit -> Jsont.json 3098 3337 3099 - (** Delete a video channel *) 3100 - val del_video_channel : t -> unit -> Jsont.json 3338 + (** Delete a video channel 3339 + @param channel_handle The video channel handle 3340 + *) 3341 + val del_video_channel : channel_handle:string -> t -> unit -> Jsont.json 3101 3342 3102 - (** Delete channel avatar *) 3103 - val delete_api_v1_video_channels_avatar : t -> unit -> Jsont.json 3343 + (** Delete channel avatar 3344 + @param channel_handle The video channel handle 3345 + *) 3346 + val delete_api_v1_video_channels_avatar : channel_handle:string -> t -> unit -> Jsont.json 3104 3347 3105 - (** Update channel avatar *) 3106 - val post_api_v1_video_channels_avatar_pick : t -> unit -> Jsont.json 3348 + (** Update channel avatar 3349 + @param channel_handle The video channel handle 3350 + *) 3351 + val post_api_v1_video_channels_avatar_pick : channel_handle:string -> t -> unit -> Jsont.json 3107 3352 3108 - (** Delete channel banner *) 3109 - val delete_api_v1_video_channels_banner : t -> unit -> Jsont.json 3353 + (** Delete channel banner 3354 + @param channel_handle The video channel handle 3355 + *) 3356 + val delete_api_v1_video_channels_banner : channel_handle:string -> t -> unit -> Jsont.json 3110 3357 3111 - (** Update channel banner *) 3112 - val post_api_v1_video_channels_banner_pick : t -> unit -> Jsont.json 3358 + (** Update channel banner 3359 + @param channel_handle The video channel handle 3360 + *) 3361 + val post_api_v1_video_channels_banner_pick : channel_handle:string -> t -> unit -> Jsont.json 3113 3362 3114 3363 (** *List channel collaborators 3115 3364 3116 - **PeerTube >= 8.0** *) 3117 - val list_video_channel_collaborators : t -> unit -> Jsont.json 3365 + **PeerTube >= 8.0** 3366 + @param channel_handle The video channel handle 3367 + *) 3368 + val list_video_channel_collaborators : channel_handle:string -> t -> unit -> Jsont.json 3118 3369 3119 3370 (** Invite a collaborator 3120 3371 3121 - **PeerTube >= 8.0** Invite a local user to collaborate on the specified video channel. *) 3122 - val invite_video_channel_collaborator : t -> unit -> Jsont.json 3372 + **PeerTube >= 8.0** Invite a local user to collaborate on the specified video channel. 3373 + @param channel_handle The video channel handle 3374 + *) 3375 + val invite_video_channel_collaborator : channel_handle:string -> t -> unit -> Jsont.json 3123 3376 3124 3377 (** Remove a channel collaborator 3125 3378 3126 - **PeerTube >= 8.0** Only the channel owner or the collaborator themselves can remove a collaborator from a channel *) 3127 - val remove_video_channel_collaborator : t -> unit -> Jsont.json 3379 + **PeerTube >= 8.0** Only the channel owner or the collaborator themselves can remove a collaborator from a channel 3380 + @param channel_handle The video channel handle 3381 + @param collaborator_id The collaborator id 3382 + *) 3383 + val remove_video_channel_collaborator : channel_handle:string -> collaborator_id:string -> t -> unit -> Jsont.json 3128 3384 3129 3385 (** Accept a collaboration invitation 3130 3386 3131 - **PeerTube >= 8.0** *) 3132 - val accept_video_channel_collaborator : t -> unit -> Jsont.json 3387 + **PeerTube >= 8.0** 3388 + @param channel_handle The video channel handle 3389 + @param collaborator_id The collaborator id 3390 + *) 3391 + val accept_video_channel_collaborator : channel_handle:string -> collaborator_id:string -> t -> unit -> Jsont.json 3133 3392 3134 3393 (** Reject a collaboration invitation 3135 3394 3136 - **PeerTube >= 8.0** *) 3137 - val reject_video_channel_collaborator : t -> unit -> Jsont.json 3395 + **PeerTube >= 8.0** 3396 + @param channel_handle The video channel handle 3397 + @param collaborator_id The collaborator id 3398 + *) 3399 + val reject_video_channel_collaborator : channel_handle:string -> collaborator_id:string -> t -> unit -> Jsont.json 3138 3400 3139 - (** List followers of a video channel *) 3140 - val get_video_channel_followers : t -> unit -> Jsont.json 3401 + (** List followers of a video channel 3402 + @param channel_handle The video channel handle 3403 + @param start Offset used to paginate results 3404 + @param count Number of items to return 3405 + @param sort Sort followers by criteria 3406 + @param search Plain text search, applied to various parts of the model depending on endpoint 3407 + *) 3408 + val get_video_channel_followers : channel_handle:string -> ?start:string -> ?count:string -> ?sort:string -> ?search:string -> t -> unit -> Jsont.json 3141 3409 3142 3410 (** Import videos in channel 3143 3411 3144 - Import a remote channel/playlist videos into a channel *) 3145 - val post_api_v1_video_channels_import_videos : body:ImportVideosInChannel.Create.t -> t -> unit -> Jsont.json 3412 + Import a remote channel/playlist videos into a channel 3413 + @param channel_handle The video channel handle 3414 + *) 3415 + val post_api_v1_video_channels_import_videos : channel_handle:string -> body:ImportVideosInChannel.Create.t -> t -> unit -> Jsont.json 3146 3416 3147 - (** List playlists of a channel *) 3148 - val get_api_v1_video_channels_video_playlists : t -> unit -> Jsont.json 3417 + (** List playlists of a channel 3418 + @param channel_handle The video channel handle 3419 + @param start Offset used to paginate results 3420 + @param count Number of items to return 3421 + @param sort Sort column 3422 + *) 3423 + val get_api_v1_video_channels_video_playlists : channel_handle:string -> ?start:string -> ?count:string -> ?sort:string -> ?playlist_type:string -> t -> unit -> Jsont.json 3149 3424 3150 - (** Reorder channel playlists *) 3151 - val reorder_video_playlists_of_channel : t -> unit -> Jsont.json 3425 + (** Reorder channel playlists 3426 + @param channel_handle The video channel handle 3427 + *) 3428 + val reorder_video_playlists_of_channel : channel_handle:string -> t -> unit -> Jsont.json 3152 3429 3153 - (** List video playlists *) 3154 - val get_playlists : t -> unit -> Jsont.json 3430 + (** List video playlists 3431 + @param start Offset used to paginate results 3432 + @param count Number of items to return 3433 + @param sort Sort column 3434 + *) 3435 + val get_playlists : ?start:string -> ?count:string -> ?sort:string -> ?playlist_type:string -> t -> unit -> Jsont.json 3155 3436 3156 3437 (** Create a video playlist 3157 3438 ··· 3163 3444 3164 3445 (** Update a video playlist 3165 3446 3166 - If the video playlist is set as public, the playlist must have a assigned channel. *) 3167 - val put_api_v1_video_playlists : t -> unit -> Jsont.json 3447 + If the video playlist is set as public, the playlist must have a assigned channel. 3448 + @param playlist_id Playlist id 3449 + *) 3450 + val put_api_v1_video_playlists : playlist_id:string -> t -> unit -> Jsont.json 3168 3451 3169 - (** Delete a video playlist *) 3170 - val delete_api_v1_video_playlists : t -> unit -> Jsont.json 3452 + (** Delete a video playlist 3453 + @param playlist_id Playlist id 3454 + *) 3455 + val delete_api_v1_video_playlists : playlist_id:string -> t -> unit -> Jsont.json 3171 3456 3172 - (** List videos of a playlist *) 3173 - val get_video_playlist_videos : t -> unit -> Jsont.json 3457 + (** List videos of a playlist 3458 + @param playlist_id Playlist id 3459 + @param start Offset used to paginate results 3460 + @param count Number of items to return 3461 + *) 3462 + val get_video_playlist_videos : playlist_id:string -> ?start:string -> ?count:string -> t -> unit -> Jsont.json 3174 3463 3175 - (** Add a video in a playlist *) 3176 - val add_video_playlist_video : t -> unit -> Jsont.json 3464 + (** Add a video in a playlist 3465 + @param playlist_id Playlist id 3466 + *) 3467 + val add_video_playlist_video : playlist_id:string -> t -> unit -> Jsont.json 3177 3468 3178 - (** Reorder playlist elements *) 3179 - val reorder_video_playlist : t -> unit -> Jsont.json 3469 + (** Reorder playlist elements 3470 + @param playlist_id Playlist id 3471 + *) 3472 + val reorder_video_playlist : playlist_id:string -> t -> unit -> Jsont.json 3180 3473 3181 - (** Update a playlist element *) 3182 - val put_video_playlist_video : t -> unit -> Jsont.json 3474 + (** Update a playlist element 3475 + @param playlist_id Playlist id 3476 + @param playlist_element_id Playlist element id 3477 + *) 3478 + val put_video_playlist_video : playlist_id:string -> playlist_element_id:string -> t -> unit -> Jsont.json 3183 3479 3184 - (** Delete an element from a playlist *) 3185 - val del_video_playlist_video : t -> unit -> Jsont.json 3480 + (** Delete an element from a playlist 3481 + @param playlist_id Playlist id 3482 + @param playlist_element_id Playlist element id 3483 + *) 3484 + val del_video_playlist_video : playlist_id:string -> playlist_element_id:string -> t -> unit -> Jsont.json 3186 3485 3187 3486 (** List video blocks 3188 3487 @param type_ list only blocks that match this type: ··· 3190 3489 - `2`: automatic block that needs review 3191 3490 3192 3491 @param search plain search that will match with video titles, and more 3492 + @param start Offset used to paginate results 3493 + @param count Number of items to return 3494 + @param sort Sort blocklists by criteria 3193 3495 *) 3194 - val get_video_blocks : ?type_:string -> ?search:string -> t -> unit -> Jsont.json 3496 + val get_video_blocks : ?type_:string -> ?search:string -> ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Jsont.json 3195 3497 3196 3498 (** List available video categories *) 3197 3499 val get_categories : t -> unit -> Jsont.json 3198 3500 3199 - (** List instance comments *) 3200 - val get_api_v1_videos_comments : t -> unit -> Jsont.json 3501 + (** List instance comments 3502 + @param search Plain text search, applied to various parts of the model depending on endpoint 3503 + @param search_account Filter comments by searching on the account 3504 + @param search_video Filter comments by searching on the video 3505 + @param video_id Limit results on this specific video 3506 + @param video_channel_id Limit results on this specific video channel 3507 + @param auto_tag_one_of **PeerTube >= 6.2** filter on comments that contain one of these automatic tags 3508 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 3509 + @param on_local_video Display only objects of local or remote videos 3510 + *) 3511 + val get_api_v1_videos_comments : ?search:string -> ?search_account:string -> ?search_video:string -> ?video_id:string -> ?video_channel_id:string -> ?auto_tag_one_of:string -> ?is_local:string -> ?on_local_video:string -> t -> unit -> Jsont.json 3201 3512 3202 3513 (** Delete video import 3203 3514 3204 - Delete ended video import *) 3205 - val delete_api_v1_videos_imports : t -> unit -> Jsont.json 3515 + Delete ended video import 3516 + @param id Entity id 3517 + *) 3518 + val delete_api_v1_videos_imports : id:string -> t -> unit -> Jsont.json 3206 3519 3207 3520 (** Cancel video import 3208 3521 3209 - Cancel a pending video import *) 3210 - val post_api_v1_videos_imports_cancel : t -> unit -> Jsont.json 3522 + Cancel a pending video import 3523 + @param id Entity id 3524 + *) 3525 + val post_api_v1_videos_imports_cancel : id:string -> t -> unit -> Jsont.json 3211 3526 3212 3527 (** Retry video import 3213 3528 3214 - **PeerTube >= 8.0** Retry a pending video import *) 3215 - val post_api_v1_videos_imports_retry : t -> unit -> Jsont.json 3529 + **PeerTube >= 8.0** Retry a pending video import 3530 + @param id Entity id 3531 + *) 3532 + val post_api_v1_videos_imports_retry : id:string -> t -> unit -> Jsont.json 3216 3533 3217 3534 (** List available video languages *) 3218 3535 val get_languages : t -> unit -> Jsont.json ··· 3220 3537 (** List available video licences *) 3221 3538 val get_licences : t -> unit -> Jsont.json 3222 3539 3223 - (** Update information about a live *) 3224 - val update_live_id : body:LiveVideo.Update.t -> t -> unit -> Jsont.json 3540 + (** Update information about a live 3541 + @param id The object id, uuid or short uuid 3542 + *) 3543 + val update_live_id : id:string -> body:LiveVideo.Update.t -> t -> unit -> Jsont.json 3225 3544 3226 3545 (** List live sessions 3227 3546 3228 - List all sessions created in a particular live *) 3229 - val get_api_v1_videos_live_sessions : t -> unit -> Jsont.json 3547 + List all sessions created in a particular live 3548 + @param id The object id, uuid or short uuid 3549 + @param sort Sort column 3550 + *) 3551 + val get_api_v1_videos_live_sessions : id:string -> ?sort:string -> t -> unit -> Jsont.json 3230 3552 3231 3553 (** List video ownership changes *) 3232 3554 val get_api_v1_videos_ownership : t -> unit -> Jsont.json 3233 3555 3234 - (** Accept ownership change request *) 3235 - val post_api_v1_videos_ownership_accept : t -> unit -> Jsont.json 3556 + (** Accept ownership change request 3557 + @param id The object id, uuid or short uuid 3558 + *) 3559 + val post_api_v1_videos_ownership_accept : id:string -> t -> unit -> Jsont.json 3236 3560 3237 - (** Refuse ownership change request *) 3238 - val post_api_v1_videos_ownership_refuse : t -> unit -> Jsont.json 3561 + (** Refuse ownership change request 3562 + @param id The object id, uuid or short uuid 3563 + *) 3564 + val post_api_v1_videos_ownership_refuse : id:string -> t -> unit -> Jsont.json 3239 3565 3240 3566 (** List available video privacy policies *) 3241 3567 val get_video_privacy_policies : t -> unit -> Jsont.json ··· 3247 3573 3248 3574 (** Cancel the resumable upload of a video, deleting any data uploaded so far 3249 3575 3250 - Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video *) 3251 - val upload_resumable_cancel : t -> unit -> Jsont.json 3576 + Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video 3577 + @param upload_id Created session id to proceed with. If you didn't send chunks in the last hour, it is 3578 + not valid anymore and you need to initialize a new upload. 3579 + 3580 + *) 3581 + val upload_resumable_cancel : upload_id:string -> t -> unit -> Jsont.json 3252 3582 3253 - (** Update a video *) 3254 - val put_video : t -> unit -> Jsont.json 3583 + (** Update a video 3584 + @param id The object id, uuid or short uuid 3585 + *) 3586 + val put_video : id:string -> t -> unit -> Jsont.json 3255 3587 3256 - (** Delete a video *) 3257 - val del_video : t -> unit -> Jsont.json 3588 + (** Delete a video 3589 + @param id The object id, uuid or short uuid 3590 + *) 3591 + val del_video : id:string -> t -> unit -> Jsont.json 3258 3592 3259 - (** Block a video *) 3260 - val add_video_block : t -> unit -> Jsont.json 3593 + (** Block a video 3594 + @param id The object id, uuid or short uuid 3595 + *) 3596 + val add_video_block : id:string -> t -> unit -> Jsont.json 3261 3597 3262 - (** Unblock a video by its id *) 3263 - val del_video_block : t -> unit -> Jsont.json 3598 + (** Unblock a video by its id 3599 + @param id The object id, uuid or short uuid 3600 + *) 3601 + val del_video_block : id:string -> t -> unit -> Jsont.json 3264 3602 3265 - (** List captions of a video *) 3266 - val get_video_captions : t -> unit -> Jsont.json 3603 + (** List captions of a video 3604 + @param id The object id, uuid or short uuid 3605 + *) 3606 + val get_video_captions : id:string -> t -> unit -> Jsont.json 3267 3607 3268 3608 (** Generate a video caption 3269 3609 3270 - **PeerTube >= 6.2** This feature has to be enabled by the administrator *) 3271 - val generate_video_caption : t -> unit -> Jsont.json 3610 + **PeerTube >= 6.2** This feature has to be enabled by the administrator 3611 + @param id The object id, uuid or short uuid 3612 + *) 3613 + val generate_video_caption : id:string -> t -> unit -> Jsont.json 3272 3614 3273 - (** Add or replace a video caption *) 3274 - val add_video_caption : t -> unit -> Jsont.json 3615 + (** Add or replace a video caption 3616 + @param id The object id, uuid or short uuid 3617 + @param caption_language The caption language 3618 + *) 3619 + val add_video_caption : id:string -> caption_language:string -> t -> unit -> Jsont.json 3275 3620 3276 - (** Delete a video caption *) 3277 - val del_video_caption : t -> unit -> Jsont.json 3621 + (** Delete a video caption 3622 + @param id The object id, uuid or short uuid 3623 + @param caption_language The caption language 3624 + *) 3625 + val del_video_caption : id:string -> caption_language:string -> t -> unit -> Jsont.json 3278 3626 3279 3627 (** Replace video chapters 3280 3628 3281 - **PeerTube >= 6.0** *) 3282 - val replace_video_chapters : t -> unit -> Jsont.json 3629 + **PeerTube >= 6.0** 3630 + @param id The object id, uuid or short uuid 3631 + *) 3632 + val replace_video_chapters : id:string -> t -> unit -> Jsont.json 3283 3633 3284 - (** Delete a comment or a reply *) 3285 - val delete_api_v1_videos_comments : t -> unit -> Jsont.json 3634 + (** Delete a comment or a reply 3635 + @param id The object id, uuid or short uuid 3636 + @param comment_id The comment id 3637 + *) 3638 + val delete_api_v1_videos_comments : id:string -> comment_id:string -> t -> unit -> Jsont.json 3286 3639 3287 3640 (** Approve a comment 3288 3641 3289 - **PeerTube >= 6.2** Approve a comment that requires a review *) 3290 - val post_api_v1_videos_comments_approve : t -> unit -> Jsont.json 3642 + **PeerTube >= 6.2** Approve a comment that requires a review 3643 + @param id The object id, uuid or short uuid 3644 + @param comment_id The comment id 3645 + *) 3646 + val post_api_v1_videos_comments_approve : id:string -> comment_id:string -> t -> unit -> Jsont.json 3291 3647 3292 - (** Get complete video description *) 3293 - val get_video_desc : t -> unit -> Jsont.json 3648 + (** Get complete video description 3649 + @param id The object id, uuid or short uuid 3650 + *) 3651 + val get_video_desc : id:string -> t -> unit -> Jsont.json 3294 3652 3295 - (** Request ownership change *) 3296 - val post_api_v1_videos_give_ownership : t -> unit -> Jsont.json 3653 + (** Request ownership change 3654 + @param id The object id, uuid or short uuid 3655 + *) 3656 + val post_api_v1_videos_give_ownership : id:string -> t -> unit -> Jsont.json 3297 3657 3298 - (** Delete video HLS files *) 3299 - val del_video_hls : t -> unit -> Jsont.json 3658 + (** Delete video HLS files 3659 + @param id The object id, uuid or short uuid 3660 + *) 3661 + val del_video_hls : id:string -> t -> unit -> Jsont.json 3300 3662 3301 3663 (** List video passwords 3302 3664 3303 - **PeerTube >= 6.0** *) 3304 - val list_video_passwords : t -> unit -> Jsont.json 3665 + **PeerTube >= 6.0** 3666 + @param id The object id, uuid or short uuid 3667 + @param start Offset used to paginate results 3668 + @param count Number of items to return 3669 + @param sort Sort column 3670 + *) 3671 + val list_video_passwords : id:string -> ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Jsont.json 3305 3672 3306 3673 (** Add a video password 3307 3674 3308 - **PeerTube >= 8.0** *) 3309 - val add_video_password : t -> unit -> Jsont.json 3675 + **PeerTube >= 8.0** 3676 + @param id The object id, uuid or short uuid 3677 + *) 3678 + val add_video_password : id:string -> t -> unit -> Jsont.json 3310 3679 3311 3680 (** Update video passwords 3312 3681 3313 - **PeerTube >= 6.0** *) 3314 - val update_video_password_list : t -> unit -> Jsont.json 3682 + **PeerTube >= 6.0** 3683 + @param id The object id, uuid or short uuid 3684 + *) 3685 + val update_video_password_list : id:string -> t -> unit -> Jsont.json 3315 3686 3316 3687 (** Delete a video password 3317 3688 3318 - **PeerTube >= 6.0** *) 3319 - val remove_video_password : t -> unit -> Jsont.json 3689 + **PeerTube >= 6.0** 3690 + @param id The object id, uuid or short uuid 3691 + @param video_password_id The video password id 3692 + *) 3693 + val remove_video_password : id:string -> video_password_id:string -> t -> unit -> Jsont.json 3320 3694 3321 - (** Like/dislike a video *) 3322 - val put_api_v1_videos_rate : t -> unit -> Jsont.json 3695 + (** Like/dislike a video 3696 + @param id The object id, uuid or short uuid 3697 + *) 3698 + val put_api_v1_videos_rate : id:string -> t -> unit -> Jsont.json 3323 3699 3324 - (** Delete video source file *) 3325 - val delete_video_source_file : t -> unit -> Jsont.json 3700 + (** Delete video source file 3701 + @param id The object id, uuid or short uuid 3702 + *) 3703 + val delete_video_source_file : id:string -> t -> unit -> Jsont.json 3326 3704 3327 3705 (** Initialize the resumable replacement of a video 3328 3706 3329 - **PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the replacement of a video *) 3330 - val replace_video_source_resumable_init : body:VideoReplaceSourceRequestResumable.T.t -> t -> unit -> Jsont.json 3707 + **PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the replacement of a video 3708 + @param id The object id, uuid or short uuid 3709 + *) 3710 + val replace_video_source_resumable_init : id:string -> body:VideoReplaceSourceRequestResumable.T.t -> t -> unit -> Jsont.json 3331 3711 3332 3712 (** Send chunk for the resumable replacement of a video 3333 3713 3334 - **PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the replacement of a video *) 3335 - val replace_video_source_resumable : t -> unit -> Jsont.json 3714 + **PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the replacement of a video 3715 + @param id The object id, uuid or short uuid 3716 + @param upload_id Created session id to proceed with. If you didn't send chunks in the last hour, it is 3717 + not valid anymore and you need to initialize a new upload. 3718 + 3719 + *) 3720 + val replace_video_source_resumable : id:string -> upload_id:string -> t -> unit -> Jsont.json 3336 3721 3337 3722 (** Cancel the resumable replacement of a video 3338 3723 3339 - **PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the replacement of a video *) 3340 - val replace_video_source_resumable_cancel : t -> unit -> Jsont.json 3724 + **PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the replacement of a video 3725 + @param id The object id, uuid or short uuid 3726 + @param upload_id Created session id to proceed with. If you didn't send chunks in the last hour, it is 3727 + not valid anymore and you need to initialize a new upload. 3728 + 3729 + *) 3730 + val replace_video_source_resumable_cancel : id:string -> upload_id:string -> t -> unit -> Jsont.json 3341 3731 3342 3732 (** List storyboards of a video 3343 3733 3344 - **PeerTube >= 6.0** *) 3345 - val list_video_storyboards : t -> unit -> Jsont.json 3734 + **PeerTube >= 6.0** 3735 + @param id The object id, uuid or short uuid 3736 + *) 3737 + val list_video_storyboards : id:string -> t -> unit -> Jsont.json 3346 3738 3347 3739 (** Create a studio task 3348 3740 3349 - Create a task to edit a video (cut, add intro/outro etc) *) 3350 - val post_api_v1_videos_studio_edit : t -> unit -> Jsont.json 3741 + Create a task to edit a video (cut, add intro/outro etc) 3742 + @param id The object id, uuid or short uuid 3743 + *) 3744 + val post_api_v1_videos_studio_edit : id:string -> t -> unit -> Jsont.json 3351 3745 3352 - (** Create a transcoding job *) 3353 - val create_video_transcoding : t -> unit -> Jsont.json 3746 + (** Create a transcoding job 3747 + @param id The object id, uuid or short uuid 3748 + *) 3749 + val create_video_transcoding : id:string -> t -> unit -> Jsont.json 3354 3750 3355 3751 (** Notify user is watching a video 3356 3752 3357 - Call this endpoint regularly (every 5-10 seconds for example) to notify the server the user is watching the video. After a while, PeerTube will increase video's viewers counter. If the user is authenticated, PeerTube will also store the current player time. *) 3358 - val add_view : body:UserViewingVideo.T.t -> t -> unit -> Jsont.json 3753 + Call this endpoint regularly (every 5-10 seconds for example) to notify the server the user is watching the video. After a while, PeerTube will increase video's viewers counter. If the user is authenticated, PeerTube will also store the current player time. 3754 + @param id The object id, uuid or short uuid 3755 + *) 3756 + val add_view : id:string -> body:UserViewingVideo.T.t -> t -> unit -> Jsont.json 3359 3757 3360 3758 (** Delete video Web Video files 3361 3759 3362 - **PeerTube >= 6.0** *) 3363 - val del_video_web_videos : t -> unit -> Jsont.json 3760 + **PeerTube >= 6.0** 3761 + @param id The object id, uuid or short uuid 3762 + *) 3763 + val del_video_web_videos : id:string -> t -> unit -> Jsont.json 3364 3764 3365 3765 (** List account watched words 3366 3766 ··· 3417 3817 Generate a mp4 container that contains at most 1 video stream and at most 1 audio stream. Mainly used to merge the HLS audio only video file and the HLS video only resolution file. 3418 3818 @param video_id The video id 3419 3819 @param video_file_ids streams of video files to mux in the output 3820 + @param video_file_token Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header. 3420 3821 *) 3421 - val get_download_videos_generate : video_id:string -> video_file_ids:string -> t -> unit -> Jsont.json 3822 + val get_download_videos_generate : video_id:string -> video_file_ids:string -> ?video_file_token:string -> t -> unit -> Jsont.json 3422 3823 3423 3824 (** Videos podcast feed 3424 3825 @param video_channel_id Limit listing to a specific video channel ··· 3429 3830 @param format format expected (we focus on making `rss` the most feature-rich ; it serves [Media RSS](https://www.rssboard.org/media-rss)) 3430 3831 @param account_id limit listing to a specific account 3431 3832 @param token private token allowing access 3833 + @param sort Sort column 3834 + @param nsfw whether to include nsfw videos, if any 3835 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 3836 + @param include_ **Only administrators and moderators can use this parameter** 3837 + 3838 + Include additional videos in results (can be combined using bitwise or operator) 3839 + - `0` NONE 3840 + - `1` NOT_PUBLISHED_STATE 3841 + - `2` BLACKLISTED 3842 + - `4` BLOCKED_OWNER 3843 + - `8` FILES 3844 + - `16` CAPTIONS 3845 + - `32` VIDEO SOURCE 3846 + 3847 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 3848 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 3849 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 3432 3850 *) 3433 - val get_syndicated_subscription_videos : format:string -> account_id:string -> token:string -> t -> unit -> Jsont.json 3851 + val get_syndicated_subscription_videos : format:string -> account_id:string -> token:string -> ?sort:string -> ?nsfw:string -> ?is_local:string -> ?include_:string -> ?privacy_one_of:string -> ?has_hlsfiles:string -> ?has_web_video_files:string -> t -> unit -> Jsont.json 3434 3852 3435 3853 (** Comments on videos feeds 3436 3854 @param format format expected (we focus on making `rss` the most feature-rich ; it serves [Media RSS](https://www.rssboard.org/media-rss)) ··· 3448 3866 @param account_name limit listing to a specific account 3449 3867 @param video_channel_id limit listing to a specific video channel 3450 3868 @param video_channel_name limit listing to a specific video channel 3869 + @param sort Sort column 3870 + @param nsfw whether to include nsfw videos, if any 3871 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 3872 + @param include_ **Only administrators and moderators can use this parameter** 3873 + 3874 + Include additional videos in results (can be combined using bitwise or operator) 3875 + - `0` NONE 3876 + - `1` NOT_PUBLISHED_STATE 3877 + - `2` BLACKLISTED 3878 + - `4` BLOCKED_OWNER 3879 + - `8` FILES 3880 + - `16` CAPTIONS 3881 + - `32` VIDEO SOURCE 3882 + 3883 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 3884 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 3885 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 3451 3886 *) 3452 - val get_syndicated_videos : format:string -> ?account_id:string -> ?account_name:string -> ?video_channel_id:string -> ?video_channel_name:string -> t -> unit -> Jsont.json 3887 + val get_syndicated_videos : format:string -> ?account_id:string -> ?account_name:string -> ?video_channel_id:string -> ?video_channel_name:string -> ?sort:string -> ?nsfw:string -> ?is_local:string -> ?include_:string -> ?privacy_one_of:string -> ?has_hlsfiles:string -> ?has_web_video_files:string -> t -> unit -> Jsont.json 3453 3888 3454 - (** Get private HLS video file *) 3455 - val get_static_streaming_playlists_hls_private_ : t -> unit -> Jsont.json 3889 + (** Get private HLS video file 3890 + @param filename Filename 3891 + @param video_file_token Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header. 3892 + @param reinject_video_file_token Ask the server to reinject videoFileToken in URLs in m3u8 playlist 3893 + *) 3894 + val get_static_streaming_playlists_hls_private_ : filename:string -> ?video_file_token:string -> ?reinject_video_file_token:string -> t -> unit -> Jsont.json 3456 3895 3457 - (** Get public HLS video file *) 3458 - val get_static_streaming_playlists_hls : t -> unit -> Jsont.json 3896 + (** Get public HLS video file 3897 + @param filename Filename 3898 + *) 3899 + val get_static_streaming_playlists_hls : filename:string -> t -> unit -> Jsont.json 3459 3900 3460 3901 (** Get private Web Video file 3461 3902 3462 - **PeerTube >= 6.0** *) 3463 - val get_static_web_videos_private_ : t -> unit -> Jsont.json 3903 + **PeerTube >= 6.0** 3904 + @param filename Filename 3905 + @param video_file_token Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header. 3906 + *) 3907 + val get_static_web_videos_private_ : filename:string -> ?video_file_token:string -> t -> unit -> Jsont.json 3464 3908 3465 3909 (** Get public Web Video file 3466 3910 3467 - **PeerTube >= 6.0** *) 3468 - val get_static_web_videos : t -> unit -> Jsont.json 3911 + **PeerTube >= 6.0** 3912 + @param filename Filename 3913 + *) 3914 + val get_static_web_videos : filename:string -> t -> unit -> Jsont.json 3469 3915 end 3470 3916 3471 3917 module VideoBlacklist : sig ··· 3660 4106 (** List my notifications 3661 4107 @param type_one_of only list notifications of these types 3662 4108 @param unread only list unread notifications 4109 + @param start Offset used to paginate results 4110 + @param count Number of items to return 4111 + @param sort Sort column 3663 4112 *) 3664 - val get_api_v1_users_me_notifications : ?type_one_of:string -> ?unread:string -> t -> unit -> Response.t 4113 + val get_api_v1_users_me_notifications : ?type_one_of:string -> ?unread:string -> ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Response.t 3665 4114 end 3666 4115 3667 4116 module Job : sig ··· 3904 4353 3905 4354 (** List activities of a video channel 3906 4355 3907 - **PeerTube >= 8.0** *) 3908 - val list_video_channel_activities : t -> unit -> Response.t 4356 + **PeerTube >= 8.0** 4357 + @param channel_handle The video channel handle 4358 + @param start Offset used to paginate results 4359 + @param count Number of items to return 4360 + @param sort Sort column 4361 + *) 4362 + val list_video_channel_activities : channel_handle:string -> ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Response.t 3909 4363 end 3910 4364 3911 4365 module Block : sig ··· 4255 4709 val jsont : t Jsont.t 4256 4710 end 4257 4711 4258 - (** Get a video playlist *) 4259 - val get_api_v1_video_playlists : t -> unit -> T.t 4712 + (** Get a video playlist 4713 + @param playlist_id Playlist id 4714 + *) 4715 + val get_api_v1_video_playlists : playlist_id:string -> t -> unit -> T.t 4260 4716 end 4261 4717 4262 4718 module VideoChannelCollaborator : sig ··· 4436 4892 end 4437 4893 4438 4894 (** List ratings of an account 4895 + @param name The username or handle of the account 4896 + @param start Offset used to paginate results 4897 + @param count Number of items to return 4898 + @param sort Sort column 4439 4899 @param rating Optionally filter which ratings to retrieve 4440 4900 *) 4441 - val get_api_v1_accounts_ratings : ?rating:string -> t -> unit -> T.t 4901 + val get_api_v1_accounts_ratings : name:string -> ?start:string -> ?count:string -> ?sort:string -> ?rating:string -> t -> unit -> T.t 4442 4902 end 4443 4903 4444 4904 module VideoList : sig ··· 4455 4915 val jsont : t Jsont.t 4456 4916 end 4457 4917 4458 - (** List videos of an account *) 4459 - val get_account_videos : t -> unit -> Response.t 4918 + (** List videos of an account 4919 + @param name The username or handle of the account 4920 + @param start Offset used to paginate results 4921 + @param count Number of items to return 4922 + @param skip_count if you don't need the `total` in the response 4923 + @param nsfw whether to include nsfw videos, if any 4924 + @param is_live whether or not the video is a live 4925 + @param include_scheduled_live whether or not include live that are scheduled for later 4926 + @param category_one_of category id of the video (see [/videos/categories](#operation/getCategories)) 4927 + @param licence_one_of licence id of the video (see [/videos/licences](#operation/getLicences)) 4928 + @param language_one_of language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language 4929 + @param tags_one_of tag(s) of the video 4930 + @param tags_all_of tag(s) of the video, where all should be present in the video 4931 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 4932 + @param include_ **Only administrators and moderators can use this parameter** 4933 + 4934 + Include additional videos in results (can be combined using bitwise or operator) 4935 + - `0` NONE 4936 + - `1` NOT_PUBLISHED_STATE 4937 + - `2` BLACKLISTED 4938 + - `4` BLOCKED_OWNER 4939 + - `8` FILES 4940 + - `16` CAPTIONS 4941 + - `32` VIDEO SOURCE 4942 + 4943 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 4944 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 4945 + @param host Find elements owned by this host 4946 + @param auto_tag_one_of **PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags 4947 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 4948 + @param exclude_already_watched Whether or not to exclude videos that are in the user's video history 4949 + @param search Plain text search, applied to various parts of the model depending on endpoint 4950 + *) 4951 + val get_account_videos : name:string -> ?start:string -> ?count:string -> ?skip_count:string -> ?sort:string -> ?nsfw:string -> ?nsfw_flags_included:string -> ?nsfw_flags_excluded:string -> ?is_live:string -> ?include_scheduled_live:string -> ?category_one_of:string -> ?licence_one_of:string -> ?language_one_of:string -> ?tags_one_of:string -> ?tags_all_of:string -> ?is_local:string -> ?include_:string -> ?has_hlsfiles:string -> ?has_web_video_files:string -> ?host:string -> ?auto_tag_one_of:string -> ?privacy_one_of:string -> ?exclude_already_watched:string -> ?search:string -> t -> unit -> Response.t 4460 4952 4461 4953 (** Search videos 4462 4954 @param search 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. 4463 4955 4956 + @param uuids Find elements with specific UUIDs 4957 + @param search_target If the administrator enabled search index support, you can override the default search target. 4958 + 4959 + **Warning**: If you choose to make an index search, PeerTube will get results from a third party service. It means the instance may not yet know the objects you fetched. If you want to load video/channel information: 4960 + * If the current user has the ability to make a remote URI search (this information is available in the config endpoint), 4961 + then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. 4962 + After that, you can use the classic REST API endpoints to fetch the complete object or interact with it 4963 + * If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch 4964 + the data from the origin instance API 4965 + 4966 + @param start Offset used to paginate results 4967 + @param count Number of items to return 4968 + @param skip_count if you don't need the `total` in the response 4969 + @param nsfw whether to include nsfw videos, if any 4970 + @param is_live whether or not the video is a live 4971 + @param include_scheduled_live whether or not include live that are scheduled for later 4972 + @param category_one_of category id of the video (see [/videos/categories](#operation/getCategories)) 4973 + @param licence_one_of licence id of the video (see [/videos/licences](#operation/getLicences)) 4974 + @param language_one_of language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language 4975 + @param tags_one_of tag(s) of the video 4976 + @param tags_all_of tag(s) of the video, where all should be present in the video 4977 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 4978 + @param include_ **Only administrators and moderators can use this parameter** 4979 + 4980 + Include additional videos in results (can be combined using bitwise or operator) 4981 + - `0` NONE 4982 + - `1` NOT_PUBLISHED_STATE 4983 + - `2` BLACKLISTED 4984 + - `4` BLOCKED_OWNER 4985 + - `8` FILES 4986 + - `16` CAPTIONS 4987 + - `32` VIDEO SOURCE 4988 + 4989 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 4990 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 4991 + @param host Find elements owned by this host 4992 + @param auto_tag_one_of **PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags 4993 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 4994 + @param exclude_already_watched Whether or not to exclude videos that are in the user's video history 4464 4995 @param start_date Get videos that are published after this date 4465 4996 @param end_date Get videos that are published before this date 4466 4997 @param originally_published_start_date Get videos that are originally published after this date ··· 4468 4999 @param duration_min Get videos that have this minimum duration 4469 5000 @param duration_max Get videos that have this maximum duration 4470 5001 *) 4471 - val search_videos : search:string -> ?start_date:string -> ?end_date:string -> ?originally_published_start_date:string -> ?originally_published_end_date:string -> ?duration_min:string -> ?duration_max:string -> t -> unit -> Response.t 5002 + val search_videos : search:string -> ?uuids:string -> ?search_target:string -> ?start:string -> ?count:string -> ?skip_count:string -> ?sort:string -> ?nsfw:string -> ?nsfw_flags_included:string -> ?nsfw_flags_excluded:string -> ?is_live:string -> ?include_scheduled_live:string -> ?category_one_of:string -> ?licence_one_of:string -> ?language_one_of:string -> ?tags_one_of:string -> ?tags_all_of:string -> ?is_local:string -> ?include_:string -> ?has_hlsfiles:string -> ?has_web_video_files:string -> ?host:string -> ?auto_tag_one_of:string -> ?privacy_one_of:string -> ?exclude_already_watched:string -> ?start_date:string -> ?end_date:string -> ?originally_published_start_date:string -> ?originally_published_end_date:string -> ?duration_min:string -> ?duration_max:string -> t -> unit -> Response.t 4472 5003 4473 - (** List watched videos history *) 4474 - val get_api_v1_users_me_history_videos : t -> unit -> Response.t 5004 + (** List watched videos history 5005 + @param start Offset used to paginate results 5006 + @param count Number of items to return 5007 + @param search Plain text search, applied to various parts of the model depending on endpoint 5008 + *) 5009 + val get_api_v1_users_me_history_videos : ?start:string -> ?count:string -> ?search:string -> t -> unit -> Response.t 4475 5010 4476 - (** List videos of subscriptions of my user *) 4477 - val get_api_v1_users_me_subscriptions_videos : t -> unit -> Response.t 5011 + (** List videos of subscriptions of my user 5012 + @param start Offset used to paginate results 5013 + @param count Number of items to return 5014 + @param skip_count if you don't need the `total` in the response 5015 + @param nsfw whether to include nsfw videos, if any 5016 + @param is_live whether or not the video is a live 5017 + @param include_scheduled_live whether or not include live that are scheduled for later 5018 + @param category_one_of category id of the video (see [/videos/categories](#operation/getCategories)) 5019 + @param licence_one_of licence id of the video (see [/videos/licences](#operation/getLicences)) 5020 + @param language_one_of language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language 5021 + @param tags_one_of tag(s) of the video 5022 + @param tags_all_of tag(s) of the video, where all should be present in the video 5023 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 5024 + @param include_ **Only administrators and moderators can use this parameter** 4478 5025 4479 - (** List videos of my user *) 4480 - val get_api_v1_users_me_videos : t -> unit -> Response.t 5026 + Include additional videos in results (can be combined using bitwise or operator) 5027 + - `0` NONE 5028 + - `1` NOT_PUBLISHED_STATE 5029 + - `2` BLACKLISTED 5030 + - `4` BLOCKED_OWNER 5031 + - `8` FILES 5032 + - `16` CAPTIONS 5033 + - `32` VIDEO SOURCE 5034 + 5035 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 5036 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 5037 + @param host Find elements owned by this host 5038 + @param auto_tag_one_of **PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags 5039 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 5040 + @param exclude_already_watched Whether or not to exclude videos that are in the user's video history 5041 + @param search Plain text search, applied to various parts of the model depending on endpoint 5042 + *) 5043 + val get_api_v1_users_me_subscriptions_videos : ?start:string -> ?count:string -> ?skip_count:string -> ?sort:string -> ?nsfw:string -> ?nsfw_flags_included:string -> ?nsfw_flags_excluded:string -> ?is_live:string -> ?include_scheduled_live:string -> ?category_one_of:string -> ?licence_one_of:string -> ?language_one_of:string -> ?tags_one_of:string -> ?tags_all_of:string -> ?is_local:string -> ?include_:string -> ?has_hlsfiles:string -> ?has_web_video_files:string -> ?host:string -> ?auto_tag_one_of:string -> ?privacy_one_of:string -> ?exclude_already_watched:string -> ?search:string -> t -> unit -> Response.t 5044 + 5045 + (** List videos of my user 5046 + @param channel_name_one_of **PeerTube >= 7.2** Filter on videos that are published by a channel with one of these names 5047 + @param start Offset used to paginate results 5048 + @param count Number of items to return 5049 + @param skip_count if you don't need the `total` in the response 5050 + @param nsfw whether to include nsfw videos, if any 5051 + @param is_live whether or not the video is a live 5052 + @param include_scheduled_live whether or not include live that are scheduled for later 5053 + @param category_one_of category id of the video (see [/videos/categories](#operation/getCategories)) 5054 + @param licence_one_of licence id of the video (see [/videos/licences](#operation/getLicences)) 5055 + @param language_one_of language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language 5056 + @param tags_one_of tag(s) of the video 5057 + @param tags_all_of tag(s) of the video, where all should be present in the video 5058 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 5059 + @param include_ **Only administrators and moderators can use this parameter** 5060 + 5061 + Include additional videos in results (can be combined using bitwise or operator) 5062 + - `0` NONE 5063 + - `1` NOT_PUBLISHED_STATE 5064 + - `2` BLACKLISTED 5065 + - `4` BLOCKED_OWNER 5066 + - `8` FILES 5067 + - `16` CAPTIONS 5068 + - `32` VIDEO SOURCE 5069 + 5070 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 5071 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 5072 + @param host Find elements owned by this host 5073 + @param auto_tag_one_of **PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags 5074 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 5075 + @param exclude_already_watched Whether or not to exclude videos that are in the user's video history 5076 + @param search Plain text search, applied to various parts of the model depending on endpoint 5077 + @param include_collaborations **PeerTube >= 8.0** Include objects from collaborated channels 5078 + *) 5079 + val get_api_v1_users_me_videos : ?channel_name_one_of:string -> ?start:string -> ?count:string -> ?skip_count:string -> ?sort:string -> ?nsfw:string -> ?nsfw_flags_included:string -> ?nsfw_flags_excluded:string -> ?is_live:string -> ?include_scheduled_live:string -> ?category_one_of:string -> ?licence_one_of:string -> ?language_one_of:string -> ?tags_one_of:string -> ?tags_all_of:string -> ?is_local:string -> ?include_:string -> ?has_hlsfiles:string -> ?has_web_video_files:string -> ?host:string -> ?auto_tag_one_of:string -> ?privacy_one_of:string -> ?exclude_already_watched:string -> ?search:string -> ?include_collaborations:string -> t -> unit -> Response.t 5080 + 5081 + (** List videos of a video channel 5082 + @param channel_handle The video channel handle 5083 + @param start Offset used to paginate results 5084 + @param count Number of items to return 5085 + @param skip_count if you don't need the `total` in the response 5086 + @param nsfw whether to include nsfw videos, if any 5087 + @param is_live whether or not the video is a live 5088 + @param include_scheduled_live whether or not include live that are scheduled for later 5089 + @param category_one_of category id of the video (see [/videos/categories](#operation/getCategories)) 5090 + @param licence_one_of licence id of the video (see [/videos/licences](#operation/getLicences)) 5091 + @param language_one_of language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language 5092 + @param tags_one_of tag(s) of the video 5093 + @param tags_all_of tag(s) of the video, where all should be present in the video 5094 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 5095 + @param include_ **Only administrators and moderators can use this parameter** 5096 + 5097 + Include additional videos in results (can be combined using bitwise or operator) 5098 + - `0` NONE 5099 + - `1` NOT_PUBLISHED_STATE 5100 + - `2` BLACKLISTED 5101 + - `4` BLOCKED_OWNER 5102 + - `8` FILES 5103 + - `16` CAPTIONS 5104 + - `32` VIDEO SOURCE 5105 + 5106 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 5107 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 5108 + @param host Find elements owned by this host 5109 + @param auto_tag_one_of **PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags 5110 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 5111 + @param exclude_already_watched Whether or not to exclude videos that are in the user's video history 5112 + @param search Plain text search, applied to various parts of the model depending on endpoint 5113 + *) 5114 + val get_video_channel_videos : channel_handle:string -> ?start:string -> ?count:string -> ?skip_count:string -> ?sort:string -> ?nsfw:string -> ?nsfw_flags_included:string -> ?nsfw_flags_excluded:string -> ?is_live:string -> ?include_scheduled_live:string -> ?category_one_of:string -> ?licence_one_of:string -> ?language_one_of:string -> ?tags_one_of:string -> ?tags_all_of:string -> ?is_local:string -> ?include_:string -> ?has_hlsfiles:string -> ?has_web_video_files:string -> ?host:string -> ?auto_tag_one_of:string -> ?privacy_one_of:string -> ?exclude_already_watched:string -> ?search:string -> t -> unit -> Response.t 4481 5115 4482 - (** List videos of a video channel *) 4483 - val get_video_channel_videos : t -> unit -> Response.t 5116 + (** List videos 5117 + @param start Offset used to paginate results 5118 + @param count Number of items to return 5119 + @param skip_count if you don't need the `total` in the response 5120 + @param nsfw whether to include nsfw videos, if any 5121 + @param is_live whether or not the video is a live 5122 + @param include_scheduled_live whether or not include live that are scheduled for later 5123 + @param category_one_of category id of the video (see [/videos/categories](#operation/getCategories)) 5124 + @param licence_one_of licence id of the video (see [/videos/licences](#operation/getLicences)) 5125 + @param language_one_of language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language 5126 + @param tags_one_of tag(s) of the video 5127 + @param tags_all_of tag(s) of the video, where all should be present in the video 5128 + @param is_local **PeerTube >= 4.0** Display only local or remote objects 5129 + @param include_ **Only administrators and moderators can use this parameter** 4484 5130 4485 - (** List videos *) 4486 - val get_videos : t -> unit -> Response.t 5131 + Include additional videos in results (can be combined using bitwise or operator) 5132 + - `0` NONE 5133 + - `1` NOT_PUBLISHED_STATE 5134 + - `2` BLACKLISTED 5135 + - `4` BLOCKED_OWNER 5136 + - `8` FILES 5137 + - `16` CAPTIONS 5138 + - `32` VIDEO SOURCE 5139 + 5140 + @param has_hlsfiles **PeerTube >= 4.0** Display only videos that have HLS files 5141 + @param has_web_video_files **PeerTube >= 6.0** Display only videos that have Web Video files 5142 + @param host Find elements owned by this host 5143 + @param auto_tag_one_of **PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags 5144 + @param privacy_one_of **PeerTube >= 4.0** Display only videos in this specific privacy/privacies 5145 + @param exclude_already_watched Whether or not to exclude videos that are in the user's video history 5146 + @param search Plain text search, applied to various parts of the model depending on endpoint 5147 + *) 5148 + val get_videos : ?start:string -> ?count:string -> ?skip_count:string -> ?sort:string -> ?nsfw:string -> ?nsfw_flags_included:string -> ?nsfw_flags_excluded:string -> ?is_live:string -> ?include_scheduled_live:string -> ?category_one_of:string -> ?licence_one_of:string -> ?language_one_of:string -> ?tags_one_of:string -> ?tags_all_of:string -> ?is_local:string -> ?include_:string -> ?has_hlsfiles:string -> ?has_web_video_files:string -> ?host:string -> ?auto_tag_one_of:string -> ?privacy_one_of:string -> ?exclude_already_watched:string -> ?search:string -> t -> unit -> Response.t 4487 5149 end 4488 5150 4489 5151 module VideoCommentForOwnerOrAdmin : sig ··· 4549 5211 val v : unit -> t 4550 5212 end 4551 5213 4552 - (** Get an account *) 4553 - val get_account : t -> unit -> T.t 5214 + (** Get an account 5215 + @param name The username or handle of the account 5216 + *) 5217 + val get_account : name:string -> t -> unit -> T.t 4554 5218 end 4555 5219 4556 5220 module VideoComment : sig ··· 4609 5273 val jsont : t Jsont.t 4610 5274 end 4611 5275 4612 - (** Get a thread *) 4613 - val get_api_v1_videos_comment_threads : t -> unit -> T.t 5276 + (** Get a thread 5277 + @param id The object id, uuid or short uuid 5278 + @param thread_id The thread id (root comment id) 5279 + *) 5280 + val get_api_v1_videos_comment_threads : id:string -> thread_id:string -> t -> unit -> T.t 4614 5281 end 4615 5282 4616 5283 module CommentThreadPost : sig ··· 4625 5292 val jsont : t Jsont.t 4626 5293 end 4627 5294 4628 - (** Create a thread *) 4629 - val post_api_v1_videos_comment_threads : t -> unit -> Response.t 5295 + (** Create a thread 5296 + @param id The object id, uuid or short uuid 5297 + *) 5298 + val post_api_v1_videos_comment_threads : id:string -> t -> unit -> Response.t 4630 5299 4631 - (** Reply to a thread of a video *) 4632 - val post_api_v1_videos_comments : t -> unit -> Response.t 5300 + (** Reply to a thread of a video 5301 + @param id The object id, uuid or short uuid 5302 + @param comment_id The comment id 5303 + *) 5304 + val post_api_v1_videos_comments : id:string -> comment_id:string -> t -> unit -> Response.t 4633 5305 end 4634 5306 4635 5307 module CommentThread : sig ··· 4653 5325 val jsont : t Jsont.t 4654 5326 end 4655 5327 4656 - (** List threads of a video *) 4657 - val get_api_v1_videos_comment_threads : t -> unit -> Response.t 5328 + (** List threads of a video 5329 + @param id The object id, uuid or short uuid 5330 + @param start Offset used to paginate results 5331 + @param count Number of items to return 5332 + @param sort Sort comments by criteria 5333 + *) 5334 + val get_api_v1_videos_comment_threads : id:string -> ?start:string -> ?count:string -> ?sort:string -> t -> unit -> Response.t 4658 5335 end 4659 5336 4660 5337 module User : sig ··· 4770 5447 val jsont : t Jsont.t 4771 5448 end 4772 5449 4773 - (** List users *) 4774 - val get_users : t -> unit -> T.t 5450 + (** List users 5451 + @param search Plain text search that will match with user usernames or emails 5452 + @param blocked Filter results down to (un)banned users 5453 + @param start Offset used to paginate results 5454 + @param count Number of items to return 5455 + @param sort Sort users by criteria 5456 + *) 5457 + val get_users : ?search:string -> ?blocked:string -> ?start:string -> ?count:string -> ?sort:string -> t -> unit -> T.t 4775 5458 4776 5459 (** Get my user information *) 4777 5460 val get_user_info : t -> unit -> T.t