mirror of
https://github.com/TeamPiped/piped_dart.git
synced 2024-08-14 22:27:49 +00:00
Update bindings with openapi generator.
This commit is contained in:
parent
8d3d6d14b0
commit
abc390a2e1
27 changed files with 2941 additions and 79 deletions
|
@ -14,6 +14,7 @@ import 'package:piped_api/model/channel_info.dart';
|
|||
import 'package:piped_api/model/exception_error.dart';
|
||||
import 'package:piped_api/model/regions.dart';
|
||||
import 'package:piped_api/model/stream_item.dart';
|
||||
import 'package:piped_api/model/streams_page.dart';
|
||||
import 'package:piped_api/model/video_info.dart';
|
||||
|
||||
class UnauthenticatedApi {
|
||||
|
@ -189,6 +190,65 @@ class UnauthenticatedApi {
|
|||
);
|
||||
}
|
||||
|
||||
/// Gets more channel videos
|
||||
///
|
||||
/// Gets more channel videos.
|
||||
Future<Response<StreamsPage>> channelNextPage(
|
||||
String channelId,
|
||||
String nextpage, {
|
||||
CancelToken cancelToken,
|
||||
Map<String, dynamic> headers,
|
||||
Map<String, dynamic> extra,
|
||||
ValidateStatus validateStatus,
|
||||
ProgressCallback onSendProgress,
|
||||
ProgressCallback onReceiveProgress,
|
||||
}) async {
|
||||
final _request = RequestOptions(
|
||||
path: r'/nextpage/channel/{channelId}'.replaceAll('{' r'channelId' '}', channelId.toString()),
|
||||
method: 'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
queryParameters: <String, dynamic>{
|
||||
r'nextpage': nextpage,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
contentType: 'application/json',
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
final _response = await _dio.request<dynamic>(
|
||||
_request.path,
|
||||
data: _bodyData,
|
||||
options: _request,
|
||||
);
|
||||
|
||||
const _responseType = FullType(StreamsPage);
|
||||
final _responseData = _serializers.deserialize(
|
||||
_response.data,
|
||||
specifiedType: _responseType,
|
||||
) as StreamsPage;
|
||||
|
||||
return Response<StreamsPage>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
request: _response.request,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// Gets Video Information
|
||||
///
|
||||
/// Gets all available Stream information about a video.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue