getVideos method

  1. @override
Future<HttpResult<OpenApiGetVideosResponse>> getVideos({
  1. required String userId,
  2. String? after,
  3. String? before,
  4. String? first,
  5. String? language,
  6. String? period,
  7. String? sort,
  8. String? type,
})
override

Implementation

@override
Future<HttpResult<OpenApiGetVideosResponse>> getVideos({
  required String userId,
  String? after,
  String? before,
  String? first,
  String? language,
  String? period,
  String? sort,
  String? type,
}) {
  return client.makeGet(
    OpenApiChannelConstants.getVideosEndpoint,
    convertBodyFunc: (response) =>
        OpenApiGetVideosResponse.fromHttpResponse(response),
    queryParameters: {
      OpenApiChannelConstants.queryParamUserId: userId,
      OpenApiChannelConstants.queryParamAfter: after,
      OpenApiChannelConstants.queryParamBefore: before,
      OpenApiChannelConstants.queryParamFirst: first,
      OpenApiChannelConstants.queryParamLanguage: language,
      OpenApiChannelConstants.queryParamPeriod: period,
      OpenApiChannelConstants.queryParamSort: sort,
      OpenApiChannelConstants.queryParamType: type,
    },
    bearerToken: token,
    clientId: clientId,
  );
}