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
|
@ -6,22 +6,28 @@ doc/ExceptionError.md
|
||||||
doc/Regions.md
|
doc/Regions.md
|
||||||
doc/Stream.md
|
doc/Stream.md
|
||||||
doc/StreamItem.md
|
doc/StreamItem.md
|
||||||
|
doc/StreamsPage.md
|
||||||
doc/Subtitle.md
|
doc/Subtitle.md
|
||||||
doc/UnauthenticatedApi.md
|
doc/UnauthenticatedApi.md
|
||||||
doc/VideoInfo.md
|
doc/VideoInfo.md
|
||||||
lib/api.dart
|
lib/piped_api.dart
|
||||||
lib/api/unauthenticated_api.dart
|
lib/src/api.dart
|
||||||
lib/api_util.dart
|
lib/src/api/unauthenticated_api.dart
|
||||||
lib/auth/api_key_auth.dart
|
lib/src/api_util.dart
|
||||||
lib/auth/auth.dart
|
lib/src/auth/api_key_auth.dart
|
||||||
lib/auth/basic_auth.dart
|
lib/src/auth/auth.dart
|
||||||
lib/auth/oauth.dart
|
lib/src/auth/basic_auth.dart
|
||||||
lib/model/channel_info.dart
|
lib/src/auth/bearer_auth.dart
|
||||||
lib/model/exception_error.dart
|
lib/src/auth/oauth.dart
|
||||||
lib/model/regions.dart
|
lib/src/date_serializer.dart
|
||||||
lib/model/stream.dart
|
lib/src/model/channel_info.dart
|
||||||
lib/model/stream_item.dart
|
lib/src/model/date.dart
|
||||||
lib/model/subtitle.dart
|
lib/src/model/exception_error.dart
|
||||||
lib/model/video_info.dart
|
lib/src/model/regions.dart
|
||||||
lib/serializers.dart
|
lib/src/model/stream.dart
|
||||||
|
lib/src/model/stream_item.dart
|
||||||
|
lib/src/model/streams_page.dart
|
||||||
|
lib/src/model/subtitle.dart
|
||||||
|
lib/src/model/video_info.dart
|
||||||
|
lib/src/serializers.dart
|
||||||
pubspec.yaml
|
pubspec.yaml
|
||||||
|
|
54
README.md
54
README.md
|
@ -1,33 +1,39 @@
|
||||||
# piped_api
|
# piped_api (EXPERIMENTAL)
|
||||||
This is an API specification for Piped API instances.
|
This is an API specification for Piped API instances.
|
||||||
|
|
||||||
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- Build package: org.openapitools.codegen.languages.DartDioClientCodegen
|
- Build package: org.openapitools.codegen.languages.DartDioNextClientCodegen
|
||||||
For more information, please visit [https://github.com/TeamPiped/Piped/issues](https://github.com/TeamPiped/Piped/issues)
|
For more information, please visit [https://github.com/TeamPiped/Piped/issues](https://github.com/TeamPiped/Piped/issues)
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
Dart 2.7.0 or later OR Flutter 1.12 or later
|
* Dart 2.12.0 or later OR Flutter 1.26.0 or later
|
||||||
|
* Dio 4.0.0+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
|
|
||||||
### Github
|
### pub.dev
|
||||||
If this Dart package is published to Github, please include the following in pubspec.yaml
|
To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml
|
||||||
```
|
```yaml
|
||||||
name: piped_api
|
|
||||||
version: 1.0.0
|
|
||||||
description: Automatically generated OpenAPI bindings for Piped.
|
|
||||||
dependencies:
|
dependencies:
|
||||||
piped_api:
|
piped_api: 1.0.0
|
||||||
git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
|
||||||
version: 'any'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Local
|
### Github
|
||||||
To use the package in your local drive, please include the following in pubspec.yaml
|
If this Dart package is published to Github, please include the following in pubspec.yaml
|
||||||
|
```yaml
|
||||||
|
dependencies:
|
||||||
|
piped_api:
|
||||||
|
git:
|
||||||
|
url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
||||||
|
#ref: main
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Local development
|
||||||
|
To use the package from your local drive, please include the following in pubspec.yaml
|
||||||
|
```yaml
|
||||||
dependencies:
|
dependencies:
|
||||||
piped_api:
|
piped_api:
|
||||||
path: /path/to/piped_api
|
path: /path/to/piped_api
|
||||||
|
@ -38,16 +44,16 @@ dependencies:
|
||||||
Please follow the [installation procedure](#installation--usage) and then run the following:
|
Please follow the [installation procedure](#installation--usage) and then run the following:
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
import 'package:piped_api/api.dart';
|
import 'package:piped_api/piped_api.dart';
|
||||||
|
|
||||||
|
|
||||||
final api = UnauthenticatedApi();
|
final api = PipedApi().getUnauthenticatedApi();
|
||||||
final channelId = UCs6KfncB4OV6Vug4o_bzijg; // String | The channel ID of the YouTube channel you want to get information about.
|
final String channelId = UCs6KfncB4OV6Vug4o_bzijg; // String | The channel ID of the YouTube channel you want to get information about.
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final response = await api.channelInfoId(channelId);
|
final response = await api.channelInfoId(channelId);
|
||||||
print(response);
|
print(response);
|
||||||
} catch (e) {
|
} catch on DioError (e) {
|
||||||
print("Exception when calling UnauthenticatedApi->channelInfoId: $e\n");
|
print("Exception when calling UnauthenticatedApi->channelInfoId: $e\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,11 +65,12 @@ All URIs are relative to *https://pipedapi.kavin.rocks*
|
||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
*UnauthenticatedApi* | [**channelInfoId**](doc/UnauthenticatedApi.md#channelinfoid) | **GET** /channel/{channelId} | Gets Channel Information
|
[*UnauthenticatedApi*](doc/UnauthenticatedApi.md) | [**channelInfoId**](doc/UnauthenticatedApi.md#channelinfoid) | **GET** /channel/{channelId} | Gets Channel Information
|
||||||
*UnauthenticatedApi* | [**channelInfoName**](doc/UnauthenticatedApi.md#channelinfoname) | **GET** /c/{name} | Gets Channel Information
|
[*UnauthenticatedApi*](doc/UnauthenticatedApi.md) | [**channelInfoName**](doc/UnauthenticatedApi.md#channelinfoname) | **GET** /c/{name} | Gets Channel Information
|
||||||
*UnauthenticatedApi* | [**channelInfoUsername**](doc/UnauthenticatedApi.md#channelinfousername) | **GET** /user/{username} | Gets Channel Information
|
[*UnauthenticatedApi*](doc/UnauthenticatedApi.md) | [**channelInfoUsername**](doc/UnauthenticatedApi.md#channelinfousername) | **GET** /user/{username} | Gets Channel Information
|
||||||
*UnauthenticatedApi* | [**streamInfo**](doc/UnauthenticatedApi.md#streaminfo) | **GET** /streams/{videoId} | Gets Video Information
|
[*UnauthenticatedApi*](doc/UnauthenticatedApi.md) | [**channelNextPage**](doc/UnauthenticatedApi.md#channelnextpage) | **GET** /nextpage/channel/{channelId} | Gets more channel videos
|
||||||
*UnauthenticatedApi* | [**trending**](doc/UnauthenticatedApi.md#trending) | **GET** /trending | Gets all Trending Videos
|
[*UnauthenticatedApi*](doc/UnauthenticatedApi.md) | [**streamInfo**](doc/UnauthenticatedApi.md#streaminfo) | **GET** /streams/{videoId} | Gets Video Information
|
||||||
|
[*UnauthenticatedApi*](doc/UnauthenticatedApi.md) | [**trending**](doc/UnauthenticatedApi.md#trending) | **GET** /trending | Gets all Trending Videos
|
||||||
|
|
||||||
|
|
||||||
## Documentation For Models
|
## Documentation For Models
|
||||||
|
@ -73,6 +80,7 @@ Class | Method | HTTP request | Description
|
||||||
- [Regions](doc/Regions.md)
|
- [Regions](doc/Regions.md)
|
||||||
- [Stream](doc/Stream.md)
|
- [Stream](doc/Stream.md)
|
||||||
- [StreamItem](doc/StreamItem.md)
|
- [StreamItem](doc/StreamItem.md)
|
||||||
|
- [StreamsPage](doc/StreamsPage.md)
|
||||||
- [Subtitle](doc/Subtitle.md)
|
- [Subtitle](doc/Subtitle.md)
|
||||||
- [VideoInfo](doc/VideoInfo.md)
|
- [VideoInfo](doc/VideoInfo.md)
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ Name | Type | Description | Notes
|
||||||
**id** | **String** | The ID of the channel. | [optional]
|
**id** | **String** | The ID of the channel. | [optional]
|
||||||
**name** | **String** | The name of the channel. | [optional]
|
**name** | **String** | The name of the channel. | [optional]
|
||||||
**nextpage** | **String** | The parameter used to get the next page of related videos. | [optional]
|
**nextpage** | **String** | The parameter used to get the next page of related videos. | [optional]
|
||||||
**relatedStreams** | [**BuiltList<StreamItem>**](StreamItem.md) | | [optional]
|
**relatedStreams** | [**BuiltList<StreamItem>**](StreamItem.md) | | [optional]
|
||||||
**subscriberCount** | **int** | The number of subscribers the channel has. | [optional]
|
**subscriberCount** | **int** | The number of subscribers the channel has. | [optional]
|
||||||
**verified** | **bool** | Whether the channel is verified. | [optional]
|
**verified** | **bool** | Whether the channel is verified. | [optional]
|
||||||
|
|
||||||
|
|
16
doc/StreamsPage.md
Normal file
16
doc/StreamsPage.md
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# piped_api.model.StreamsPage
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:piped_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**relatedStreams** | [**BuiltList<StreamItem>**](StreamItem.md) | | [optional]
|
||||||
|
**nextpage** | **String** | The parameter used to get the next page of this page. | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ Method | HTTP request | Description
|
||||||
[**channelInfoId**](UnauthenticatedApi.md#channelinfoid) | **GET** /channel/{channelId} | Gets Channel Information
|
[**channelInfoId**](UnauthenticatedApi.md#channelinfoid) | **GET** /channel/{channelId} | Gets Channel Information
|
||||||
[**channelInfoName**](UnauthenticatedApi.md#channelinfoname) | **GET** /c/{name} | Gets Channel Information
|
[**channelInfoName**](UnauthenticatedApi.md#channelinfoname) | **GET** /c/{name} | Gets Channel Information
|
||||||
[**channelInfoUsername**](UnauthenticatedApi.md#channelinfousername) | **GET** /user/{username} | Gets Channel Information
|
[**channelInfoUsername**](UnauthenticatedApi.md#channelinfousername) | **GET** /user/{username} | Gets Channel Information
|
||||||
|
[**channelNextPage**](UnauthenticatedApi.md#channelnextpage) | **GET** /nextpage/channel/{channelId} | Gets more channel videos
|
||||||
[**streamInfo**](UnauthenticatedApi.md#streaminfo) | **GET** /streams/{videoId} | Gets Video Information
|
[**streamInfo**](UnauthenticatedApi.md#streaminfo) | **GET** /streams/{videoId} | Gets Video Information
|
||||||
[**trending**](UnauthenticatedApi.md#trending) | **GET** /trending | Gets all Trending Videos
|
[**trending**](UnauthenticatedApi.md#trending) | **GET** /trending | Gets all Trending Videos
|
||||||
|
|
||||||
|
@ -27,13 +28,13 @@ Gets all available Channel information about a channel.
|
||||||
```dart
|
```dart
|
||||||
import 'package:piped_api/api.dart';
|
import 'package:piped_api/api.dart';
|
||||||
|
|
||||||
var api_instance = new UnauthenticatedApi();
|
final api = PipedApi().getUnauthenticatedApi();
|
||||||
var channelId = UCs6KfncB4OV6Vug4o_bzijg; // String | The channel ID of the YouTube channel you want to get information about.
|
final String channelId = UCs6KfncB4OV6Vug4o_bzijg; // String | The channel ID of the YouTube channel you want to get information about.
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var result = api_instance.channelInfoId(channelId);
|
final response = api.channelInfoId(channelId);
|
||||||
print(result);
|
print(response);
|
||||||
} catch (e) {
|
} catch on DioError (e) {
|
||||||
print('Exception when calling UnauthenticatedApi->channelInfoId: $e\n');
|
print('Exception when calling UnauthenticatedApi->channelInfoId: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -70,13 +71,13 @@ Gets all available Channel information about a channel.
|
||||||
```dart
|
```dart
|
||||||
import 'package:piped_api/api.dart';
|
import 'package:piped_api/api.dart';
|
||||||
|
|
||||||
var api_instance = new UnauthenticatedApi();
|
final api = PipedApi().getUnauthenticatedApi();
|
||||||
var name = Dream; // String | The name of the YouTube channel you want to get information about.
|
final String name = Dream; // String | The name of the YouTube channel you want to get information about.
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var result = api_instance.channelInfoName(name);
|
final response = api.channelInfoName(name);
|
||||||
print(result);
|
print(response);
|
||||||
} catch (e) {
|
} catch on DioError (e) {
|
||||||
print('Exception when calling UnauthenticatedApi->channelInfoName: $e\n');
|
print('Exception when calling UnauthenticatedApi->channelInfoName: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -113,13 +114,13 @@ Gets all available Channel information about a channel.
|
||||||
```dart
|
```dart
|
||||||
import 'package:piped_api/api.dart';
|
import 'package:piped_api/api.dart';
|
||||||
|
|
||||||
var api_instance = new UnauthenticatedApi();
|
final api = PipedApi().getUnauthenticatedApi();
|
||||||
var username = DreamTraps; // String | The username of the YouTube channel you want to get information about.
|
final String username = DreamTraps; // String | The username of the YouTube channel you want to get information about.
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var result = api_instance.channelInfoUsername(username);
|
final response = api.channelInfoUsername(username);
|
||||||
print(result);
|
print(response);
|
||||||
} catch (e) {
|
} catch on DioError (e) {
|
||||||
print('Exception when calling UnauthenticatedApi->channelInfoUsername: $e\n');
|
print('Exception when calling UnauthenticatedApi->channelInfoUsername: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -145,6 +146,51 @@ No authorization required
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **channelNextPage**
|
||||||
|
> StreamsPage channelNextPage(channelId, nextpage)
|
||||||
|
|
||||||
|
Gets more channel videos
|
||||||
|
|
||||||
|
Gets more channel videos.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:piped_api/api.dart';
|
||||||
|
|
||||||
|
final api = PipedApi().getUnauthenticatedApi();
|
||||||
|
final String channelId = UCs6KfncB4OV6Vug4o_bzijg; // String | The channel ID of the YouTube channel you want to get more videos from.
|
||||||
|
final String nextpage = nextpage_example; // String | The next page token to get more videos from.
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.channelNextPage(channelId, nextpage);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling UnauthenticatedApi->channelNextPage: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**channelId** | **String**| The channel ID of the YouTube channel you want to get more videos from. |
|
||||||
|
**nextpage** | **String**| The next page token to get more videos from. |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**StreamsPage**](StreamsPage.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **streamInfo**
|
# **streamInfo**
|
||||||
> VideoInfo streamInfo(videoId)
|
> VideoInfo streamInfo(videoId)
|
||||||
|
|
||||||
|
@ -156,13 +202,13 @@ Gets all available Stream information about a video.
|
||||||
```dart
|
```dart
|
||||||
import 'package:piped_api/api.dart';
|
import 'package:piped_api/api.dart';
|
||||||
|
|
||||||
var api_instance = new UnauthenticatedApi();
|
final api = PipedApi().getUnauthenticatedApi();
|
||||||
var videoId = dQw4w9WgXcQ; // String | The video ID of the YouTube video you want to get information about.
|
final String videoId = dQw4w9WgXcQ; // String | The video ID of the YouTube video you want to get information about.
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var result = api_instance.streamInfo(videoId);
|
final response = api.streamInfo(videoId);
|
||||||
print(result);
|
print(response);
|
||||||
} catch (e) {
|
} catch on DioError (e) {
|
||||||
print('Exception when calling UnauthenticatedApi->streamInfo: $e\n');
|
print('Exception when calling UnauthenticatedApi->streamInfo: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -199,13 +245,13 @@ Gets all Trending Videos in the requested country.
|
||||||
```dart
|
```dart
|
||||||
import 'package:piped_api/api.dart';
|
import 'package:piped_api/api.dart';
|
||||||
|
|
||||||
var api_instance = new UnauthenticatedApi();
|
final api = PipedApi().getUnauthenticatedApi();
|
||||||
var region = US; // Regions | The Region to get trending videos from.
|
final Regions region = US; // Regions | The Region to get trending videos from.
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var result = api_instance.trending(region);
|
final response = api.trending(region);
|
||||||
print(result);
|
print(response);
|
||||||
} catch (e) {
|
} catch on DioError (e) {
|
||||||
print('Exception when calling UnauthenticatedApi->trending: $e\n');
|
print('Exception when calling UnauthenticatedApi->trending: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -218,7 +264,7 @@ Name | Type | Description | Notes
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**BuiltList<StreamItem>**](StreamItem.md)
|
[**BuiltList<StreamItem>**](StreamItem.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ import 'package:piped_api/api.dart';
|
||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**audioStreams** | [**BuiltList<Stream>**](Stream.md) | | [optional]
|
**audioStreams** | [**BuiltList<Stream>**](Stream.md) | | [optional]
|
||||||
**videoStreams** | [**BuiltList<Stream>**](Stream.md) | | [optional]
|
**videoStreams** | [**BuiltList<Stream>**](Stream.md) | | [optional]
|
||||||
**description** | **String** | The video's description. | [optional]
|
**description** | **String** | The video's description. | [optional]
|
||||||
**dislikes** | **int** | The number of dislikes the video has. | [optional]
|
**dislikes** | **int** | The number of dislikes the video has. | [optional]
|
||||||
**duration** | **int** | The video's duration in seconds. | [optional]
|
**duration** | **int** | The video's duration in seconds. | [optional]
|
||||||
|
@ -18,7 +18,7 @@ Name | Type | Description | Notes
|
||||||
**likes** | **int** | The number of likes the video has. | [optional]
|
**likes** | **int** | The number of likes the video has. | [optional]
|
||||||
**livestream** | **bool** | Whether the video is a livestream. | [optional]
|
**livestream** | **bool** | Whether the video is a livestream. | [optional]
|
||||||
**proxyUrl** | **String** | The base URL of the backend instance's proxy. | [optional]
|
**proxyUrl** | **String** | The base URL of the backend instance's proxy. | [optional]
|
||||||
**subtitles** | [**BuiltList<Subtitle>**](Subtitle.md) | | [optional]
|
**subtitles** | [**BuiltList<Subtitle>**](Subtitle.md) | | [optional]
|
||||||
**dash** | **String** | The URL of the DASH manifest. | [optional]
|
**dash** | **String** | The URL of the DASH manifest. | [optional]
|
||||||
**thumbnailUrl** | **String** | The URL of the video's thumbnail. | [optional]
|
**thumbnailUrl** | **String** | The URL of the video's thumbnail. | [optional]
|
||||||
**title** | **String** | The video's title. | [optional]
|
**title** | **String** | The video's title. | [optional]
|
||||||
|
@ -27,7 +27,7 @@ Name | Type | Description | Notes
|
||||||
**uploaderAvatar** | **String** | The URL of the video's uploader's avatar. | [optional]
|
**uploaderAvatar** | **String** | The URL of the video's uploader's avatar. | [optional]
|
||||||
**uploaderUrl** | **String** | The relative URL of the video's uploader. | [optional]
|
**uploaderUrl** | **String** | The relative URL of the video's uploader. | [optional]
|
||||||
**uploaderVerified** | **bool** | Whether the video's uploader is verified. | [optional]
|
**uploaderVerified** | **bool** | Whether the video's uploader is verified. | [optional]
|
||||||
**relatedStreams** | [**BuiltList<StreamItem>**](StreamItem.md) | | [optional]
|
**relatedStreams** | [**BuiltList<StreamItem>**](StreamItem.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
|
@ -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/exception_error.dart';
|
||||||
import 'package:piped_api/model/regions.dart';
|
import 'package:piped_api/model/regions.dart';
|
||||||
import 'package:piped_api/model/stream_item.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';
|
import 'package:piped_api/model/video_info.dart';
|
||||||
|
|
||||||
class UnauthenticatedApi {
|
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 Video Information
|
||||||
///
|
///
|
||||||
/// Gets all available Stream information about a video.
|
/// Gets all available Stream information about a video.
|
||||||
|
|
208
lib/model/channel_info.g.dart
Normal file
208
lib/model/channel_info.g.dart
Normal file
|
@ -0,0 +1,208 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// @dart=2.7
|
||||||
|
|
||||||
|
part of 'channel_info.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$ChannelInfo extends ChannelInfo {
|
||||||
|
@override
|
||||||
|
final String avatarUrl;
|
||||||
|
@override
|
||||||
|
final String bannerUrl;
|
||||||
|
@override
|
||||||
|
final String description;
|
||||||
|
@override
|
||||||
|
final String id;
|
||||||
|
@override
|
||||||
|
final String name;
|
||||||
|
@override
|
||||||
|
final String nextpage;
|
||||||
|
@override
|
||||||
|
final BuiltList<StreamItem> relatedStreams;
|
||||||
|
@override
|
||||||
|
final int subscriberCount;
|
||||||
|
@override
|
||||||
|
final bool verified;
|
||||||
|
|
||||||
|
factory _$ChannelInfo([void Function(ChannelInfoBuilder) updates]) =>
|
||||||
|
(new ChannelInfoBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
_$ChannelInfo._(
|
||||||
|
{this.avatarUrl,
|
||||||
|
this.bannerUrl,
|
||||||
|
this.description,
|
||||||
|
this.id,
|
||||||
|
this.name,
|
||||||
|
this.nextpage,
|
||||||
|
this.relatedStreams,
|
||||||
|
this.subscriberCount,
|
||||||
|
this.verified})
|
||||||
|
: super._();
|
||||||
|
|
||||||
|
@override
|
||||||
|
ChannelInfo rebuild(void Function(ChannelInfoBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
ChannelInfoBuilder toBuilder() => new ChannelInfoBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is ChannelInfo &&
|
||||||
|
avatarUrl == other.avatarUrl &&
|
||||||
|
bannerUrl == other.bannerUrl &&
|
||||||
|
description == other.description &&
|
||||||
|
id == other.id &&
|
||||||
|
name == other.name &&
|
||||||
|
nextpage == other.nextpage &&
|
||||||
|
relatedStreams == other.relatedStreams &&
|
||||||
|
subscriberCount == other.subscriberCount &&
|
||||||
|
verified == other.verified;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return $jf($jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc($jc(0, avatarUrl.hashCode),
|
||||||
|
bannerUrl.hashCode),
|
||||||
|
description.hashCode),
|
||||||
|
id.hashCode),
|
||||||
|
name.hashCode),
|
||||||
|
nextpage.hashCode),
|
||||||
|
relatedStreams.hashCode),
|
||||||
|
subscriberCount.hashCode),
|
||||||
|
verified.hashCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper('ChannelInfo')
|
||||||
|
..add('avatarUrl', avatarUrl)
|
||||||
|
..add('bannerUrl', bannerUrl)
|
||||||
|
..add('description', description)
|
||||||
|
..add('id', id)
|
||||||
|
..add('name', name)
|
||||||
|
..add('nextpage', nextpage)
|
||||||
|
..add('relatedStreams', relatedStreams)
|
||||||
|
..add('subscriberCount', subscriberCount)
|
||||||
|
..add('verified', verified))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ChannelInfoBuilder implements Builder<ChannelInfo, ChannelInfoBuilder> {
|
||||||
|
_$ChannelInfo _$v;
|
||||||
|
|
||||||
|
String _avatarUrl;
|
||||||
|
String get avatarUrl => _$this._avatarUrl;
|
||||||
|
set avatarUrl(String avatarUrl) => _$this._avatarUrl = avatarUrl;
|
||||||
|
|
||||||
|
String _bannerUrl;
|
||||||
|
String get bannerUrl => _$this._bannerUrl;
|
||||||
|
set bannerUrl(String bannerUrl) => _$this._bannerUrl = bannerUrl;
|
||||||
|
|
||||||
|
String _description;
|
||||||
|
String get description => _$this._description;
|
||||||
|
set description(String description) => _$this._description = description;
|
||||||
|
|
||||||
|
String _id;
|
||||||
|
String get id => _$this._id;
|
||||||
|
set id(String id) => _$this._id = id;
|
||||||
|
|
||||||
|
String _name;
|
||||||
|
String get name => _$this._name;
|
||||||
|
set name(String name) => _$this._name = name;
|
||||||
|
|
||||||
|
String _nextpage;
|
||||||
|
String get nextpage => _$this._nextpage;
|
||||||
|
set nextpage(String nextpage) => _$this._nextpage = nextpage;
|
||||||
|
|
||||||
|
ListBuilder<StreamItem> _relatedStreams;
|
||||||
|
ListBuilder<StreamItem> get relatedStreams =>
|
||||||
|
_$this._relatedStreams ??= new ListBuilder<StreamItem>();
|
||||||
|
set relatedStreams(ListBuilder<StreamItem> relatedStreams) =>
|
||||||
|
_$this._relatedStreams = relatedStreams;
|
||||||
|
|
||||||
|
int _subscriberCount;
|
||||||
|
int get subscriberCount => _$this._subscriberCount;
|
||||||
|
set subscriberCount(int subscriberCount) =>
|
||||||
|
_$this._subscriberCount = subscriberCount;
|
||||||
|
|
||||||
|
bool _verified;
|
||||||
|
bool get verified => _$this._verified;
|
||||||
|
set verified(bool verified) => _$this._verified = verified;
|
||||||
|
|
||||||
|
ChannelInfoBuilder() {
|
||||||
|
ChannelInfo._initializeBuilder(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
ChannelInfoBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_avatarUrl = $v.avatarUrl;
|
||||||
|
_bannerUrl = $v.bannerUrl;
|
||||||
|
_description = $v.description;
|
||||||
|
_id = $v.id;
|
||||||
|
_name = $v.name;
|
||||||
|
_nextpage = $v.nextpage;
|
||||||
|
_relatedStreams = $v.relatedStreams?.toBuilder();
|
||||||
|
_subscriberCount = $v.subscriberCount;
|
||||||
|
_verified = $v.verified;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(ChannelInfo other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$ChannelInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(ChannelInfoBuilder) updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
_$ChannelInfo build() {
|
||||||
|
_$ChannelInfo _$result;
|
||||||
|
try {
|
||||||
|
_$result = _$v ??
|
||||||
|
new _$ChannelInfo._(
|
||||||
|
avatarUrl: avatarUrl,
|
||||||
|
bannerUrl: bannerUrl,
|
||||||
|
description: description,
|
||||||
|
id: id,
|
||||||
|
name: name,
|
||||||
|
nextpage: nextpage,
|
||||||
|
relatedStreams: _relatedStreams?.build(),
|
||||||
|
subscriberCount: subscriberCount,
|
||||||
|
verified: verified);
|
||||||
|
} catch (_) {
|
||||||
|
String _$failedField;
|
||||||
|
try {
|
||||||
|
_$failedField = 'relatedStreams';
|
||||||
|
_relatedStreams?.build();
|
||||||
|
} catch (e) {
|
||||||
|
throw new BuiltValueNestedFieldError(
|
||||||
|
'ChannelInfo', _$failedField, e.toString());
|
||||||
|
}
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
|
104
lib/model/exception_error.g.dart
Normal file
104
lib/model/exception_error.g.dart
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// @dart=2.7
|
||||||
|
|
||||||
|
part of 'exception_error.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$ExceptionError extends ExceptionError {
|
||||||
|
@override
|
||||||
|
final String error;
|
||||||
|
@override
|
||||||
|
final String message;
|
||||||
|
|
||||||
|
factory _$ExceptionError([void Function(ExceptionErrorBuilder) updates]) =>
|
||||||
|
(new ExceptionErrorBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
_$ExceptionError._({this.error, this.message}) : super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(error, 'ExceptionError', 'error');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(message, 'ExceptionError', 'message');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ExceptionError rebuild(void Function(ExceptionErrorBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
ExceptionErrorBuilder toBuilder() =>
|
||||||
|
new ExceptionErrorBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is ExceptionError &&
|
||||||
|
error == other.error &&
|
||||||
|
message == other.message;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return $jf($jc($jc(0, error.hashCode), message.hashCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper('ExceptionError')
|
||||||
|
..add('error', error)
|
||||||
|
..add('message', message))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ExceptionErrorBuilder
|
||||||
|
implements Builder<ExceptionError, ExceptionErrorBuilder> {
|
||||||
|
_$ExceptionError _$v;
|
||||||
|
|
||||||
|
String _error;
|
||||||
|
String get error => _$this._error;
|
||||||
|
set error(String error) => _$this._error = error;
|
||||||
|
|
||||||
|
String _message;
|
||||||
|
String get message => _$this._message;
|
||||||
|
set message(String message) => _$this._message = message;
|
||||||
|
|
||||||
|
ExceptionErrorBuilder() {
|
||||||
|
ExceptionError._initializeBuilder(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
ExceptionErrorBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_error = $v.error;
|
||||||
|
_message = $v.message;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(ExceptionError other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$ExceptionError;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(ExceptionErrorBuilder) updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
_$ExceptionError build() {
|
||||||
|
final _$result = _$v ??
|
||||||
|
new _$ExceptionError._(
|
||||||
|
error: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
error, 'ExceptionError', 'error'),
|
||||||
|
message: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
message, 'ExceptionError', 'message'));
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
|
806
lib/model/regions.g.dart
Normal file
806
lib/model/regions.g.dart
Normal file
|
@ -0,0 +1,806 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// @dart=2.7
|
||||||
|
|
||||||
|
part of 'regions.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
const Regions _$DZ = const Regions._('DZ');
|
||||||
|
const Regions _$AR = const Regions._('AR');
|
||||||
|
const Regions _$AU = const Regions._('AU');
|
||||||
|
const Regions _$AT = const Regions._('AT');
|
||||||
|
const Regions _$AZ = const Regions._('AZ');
|
||||||
|
const Regions _$BH = const Regions._('BH');
|
||||||
|
const Regions _$BD = const Regions._('BD');
|
||||||
|
const Regions _$BY = const Regions._('BY');
|
||||||
|
const Regions _$BE = const Regions._('BE');
|
||||||
|
const Regions _$BO = const Regions._('BO');
|
||||||
|
const Regions _$BA = const Regions._('BA');
|
||||||
|
const Regions _$BR = const Regions._('BR');
|
||||||
|
const Regions _$BG = const Regions._('BG');
|
||||||
|
const Regions _$CA = const Regions._('CA');
|
||||||
|
const Regions _$CL = const Regions._('CL');
|
||||||
|
const Regions _$CO = const Regions._('CO');
|
||||||
|
const Regions _$CR = const Regions._('CR');
|
||||||
|
const Regions _$HR = const Regions._('HR');
|
||||||
|
const Regions _$CY = const Regions._('CY');
|
||||||
|
const Regions _$CZ = const Regions._('CZ');
|
||||||
|
const Regions _$DK = const Regions._('DK');
|
||||||
|
const Regions _$DO = const Regions._('DO');
|
||||||
|
const Regions _$EC = const Regions._('EC');
|
||||||
|
const Regions _$EG = const Regions._('EG');
|
||||||
|
const Regions _$SV = const Regions._('SV');
|
||||||
|
const Regions _$EE = const Regions._('EE');
|
||||||
|
const Regions _$FI = const Regions._('FI');
|
||||||
|
const Regions _$FR = const Regions._('FR');
|
||||||
|
const Regions _$GE = const Regions._('GE');
|
||||||
|
const Regions _$DE = const Regions._('DE');
|
||||||
|
const Regions _$GH = const Regions._('GH');
|
||||||
|
const Regions _$GR = const Regions._('GR');
|
||||||
|
const Regions _$GT = const Regions._('GT');
|
||||||
|
const Regions _$HN = const Regions._('HN');
|
||||||
|
const Regions _$HK = const Regions._('HK');
|
||||||
|
const Regions _$HU = const Regions._('HU');
|
||||||
|
const Regions _$IS = const Regions._('IS');
|
||||||
|
const Regions _$IN = const Regions._('IN');
|
||||||
|
const Regions _$ID = const Regions._('ID');
|
||||||
|
const Regions _$IQ = const Regions._('IQ');
|
||||||
|
const Regions _$IE = const Regions._('IE');
|
||||||
|
const Regions _$IL = const Regions._('IL');
|
||||||
|
const Regions _$IT = const Regions._('IT');
|
||||||
|
const Regions _$JM = const Regions._('JM');
|
||||||
|
const Regions _$JP = const Regions._('JP');
|
||||||
|
const Regions _$JO = const Regions._('JO');
|
||||||
|
const Regions _$KZ = const Regions._('KZ');
|
||||||
|
const Regions _$KE = const Regions._('KE');
|
||||||
|
const Regions _$KW = const Regions._('KW');
|
||||||
|
const Regions _$LV = const Regions._('LV');
|
||||||
|
const Regions _$LB = const Regions._('LB');
|
||||||
|
const Regions _$LY = const Regions._('LY');
|
||||||
|
const Regions _$LI = const Regions._('LI');
|
||||||
|
const Regions _$LT = const Regions._('LT');
|
||||||
|
const Regions _$LU = const Regions._('LU');
|
||||||
|
const Regions _$MY = const Regions._('MY');
|
||||||
|
const Regions _$MT = const Regions._('MT');
|
||||||
|
const Regions _$MX = const Regions._('MX');
|
||||||
|
const Regions _$ME = const Regions._('ME');
|
||||||
|
const Regions _$MA = const Regions._('MA');
|
||||||
|
const Regions _$NP = const Regions._('NP');
|
||||||
|
const Regions _$NL = const Regions._('NL');
|
||||||
|
const Regions _$NZ = const Regions._('NZ');
|
||||||
|
const Regions _$NI = const Regions._('NI');
|
||||||
|
const Regions _$NG = const Regions._('NG');
|
||||||
|
const Regions _$MK = const Regions._('MK');
|
||||||
|
const Regions _$NO = const Regions._('NO');
|
||||||
|
const Regions _$OM = const Regions._('OM');
|
||||||
|
const Regions _$PK = const Regions._('PK');
|
||||||
|
const Regions _$PA = const Regions._('PA');
|
||||||
|
const Regions _$PG = const Regions._('PG');
|
||||||
|
const Regions _$PY = const Regions._('PY');
|
||||||
|
const Regions _$PE = const Regions._('PE');
|
||||||
|
const Regions _$PH = const Regions._('PH');
|
||||||
|
const Regions _$PL = const Regions._('PL');
|
||||||
|
const Regions _$PT = const Regions._('PT');
|
||||||
|
const Regions _$PR = const Regions._('PR');
|
||||||
|
const Regions _$QA = const Regions._('QA');
|
||||||
|
const Regions _$RO = const Regions._('RO');
|
||||||
|
const Regions _$RU = const Regions._('RU');
|
||||||
|
const Regions _$SA = const Regions._('SA');
|
||||||
|
const Regions _$SN = const Regions._('SN');
|
||||||
|
const Regions _$RS = const Regions._('RS');
|
||||||
|
const Regions _$SG = const Regions._('SG');
|
||||||
|
const Regions _$SK = const Regions._('SK');
|
||||||
|
const Regions _$SI = const Regions._('SI');
|
||||||
|
const Regions _$ZA = const Regions._('ZA');
|
||||||
|
const Regions _$KR = const Regions._('KR');
|
||||||
|
const Regions _$ES = const Regions._('ES');
|
||||||
|
const Regions _$LK = const Regions._('LK');
|
||||||
|
const Regions _$SE = const Regions._('SE');
|
||||||
|
const Regions _$CH = const Regions._('CH');
|
||||||
|
const Regions _$TW = const Regions._('TW');
|
||||||
|
const Regions _$TZ = const Regions._('TZ');
|
||||||
|
const Regions _$TH = const Regions._('TH');
|
||||||
|
const Regions _$TN = const Regions._('TN');
|
||||||
|
const Regions _$TR = const Regions._('TR');
|
||||||
|
const Regions _$UG = const Regions._('UG');
|
||||||
|
const Regions _$UA = const Regions._('UA');
|
||||||
|
const Regions _$AE = const Regions._('AE');
|
||||||
|
const Regions _$GB = const Regions._('GB');
|
||||||
|
const Regions _$US = const Regions._('US');
|
||||||
|
const Regions _$UY = const Regions._('UY');
|
||||||
|
const Regions _$VE = const Regions._('VE');
|
||||||
|
const Regions _$VN = const Regions._('VN');
|
||||||
|
const Regions _$YE = const Regions._('YE');
|
||||||
|
const Regions _$ZW = const Regions._('ZW');
|
||||||
|
|
||||||
|
Regions _$valueOf(String name) {
|
||||||
|
switch (name) {
|
||||||
|
case 'DZ':
|
||||||
|
return _$DZ;
|
||||||
|
case 'AR':
|
||||||
|
return _$AR;
|
||||||
|
case 'AU':
|
||||||
|
return _$AU;
|
||||||
|
case 'AT':
|
||||||
|
return _$AT;
|
||||||
|
case 'AZ':
|
||||||
|
return _$AZ;
|
||||||
|
case 'BH':
|
||||||
|
return _$BH;
|
||||||
|
case 'BD':
|
||||||
|
return _$BD;
|
||||||
|
case 'BY':
|
||||||
|
return _$BY;
|
||||||
|
case 'BE':
|
||||||
|
return _$BE;
|
||||||
|
case 'BO':
|
||||||
|
return _$BO;
|
||||||
|
case 'BA':
|
||||||
|
return _$BA;
|
||||||
|
case 'BR':
|
||||||
|
return _$BR;
|
||||||
|
case 'BG':
|
||||||
|
return _$BG;
|
||||||
|
case 'CA':
|
||||||
|
return _$CA;
|
||||||
|
case 'CL':
|
||||||
|
return _$CL;
|
||||||
|
case 'CO':
|
||||||
|
return _$CO;
|
||||||
|
case 'CR':
|
||||||
|
return _$CR;
|
||||||
|
case 'HR':
|
||||||
|
return _$HR;
|
||||||
|
case 'CY':
|
||||||
|
return _$CY;
|
||||||
|
case 'CZ':
|
||||||
|
return _$CZ;
|
||||||
|
case 'DK':
|
||||||
|
return _$DK;
|
||||||
|
case 'DO':
|
||||||
|
return _$DO;
|
||||||
|
case 'EC':
|
||||||
|
return _$EC;
|
||||||
|
case 'EG':
|
||||||
|
return _$EG;
|
||||||
|
case 'SV':
|
||||||
|
return _$SV;
|
||||||
|
case 'EE':
|
||||||
|
return _$EE;
|
||||||
|
case 'FI':
|
||||||
|
return _$FI;
|
||||||
|
case 'FR':
|
||||||
|
return _$FR;
|
||||||
|
case 'GE':
|
||||||
|
return _$GE;
|
||||||
|
case 'DE':
|
||||||
|
return _$DE;
|
||||||
|
case 'GH':
|
||||||
|
return _$GH;
|
||||||
|
case 'GR':
|
||||||
|
return _$GR;
|
||||||
|
case 'GT':
|
||||||
|
return _$GT;
|
||||||
|
case 'HN':
|
||||||
|
return _$HN;
|
||||||
|
case 'HK':
|
||||||
|
return _$HK;
|
||||||
|
case 'HU':
|
||||||
|
return _$HU;
|
||||||
|
case 'IS':
|
||||||
|
return _$IS;
|
||||||
|
case 'IN':
|
||||||
|
return _$IN;
|
||||||
|
case 'ID':
|
||||||
|
return _$ID;
|
||||||
|
case 'IQ':
|
||||||
|
return _$IQ;
|
||||||
|
case 'IE':
|
||||||
|
return _$IE;
|
||||||
|
case 'IL':
|
||||||
|
return _$IL;
|
||||||
|
case 'IT':
|
||||||
|
return _$IT;
|
||||||
|
case 'JM':
|
||||||
|
return _$JM;
|
||||||
|
case 'JP':
|
||||||
|
return _$JP;
|
||||||
|
case 'JO':
|
||||||
|
return _$JO;
|
||||||
|
case 'KZ':
|
||||||
|
return _$KZ;
|
||||||
|
case 'KE':
|
||||||
|
return _$KE;
|
||||||
|
case 'KW':
|
||||||
|
return _$KW;
|
||||||
|
case 'LV':
|
||||||
|
return _$LV;
|
||||||
|
case 'LB':
|
||||||
|
return _$LB;
|
||||||
|
case 'LY':
|
||||||
|
return _$LY;
|
||||||
|
case 'LI':
|
||||||
|
return _$LI;
|
||||||
|
case 'LT':
|
||||||
|
return _$LT;
|
||||||
|
case 'LU':
|
||||||
|
return _$LU;
|
||||||
|
case 'MY':
|
||||||
|
return _$MY;
|
||||||
|
case 'MT':
|
||||||
|
return _$MT;
|
||||||
|
case 'MX':
|
||||||
|
return _$MX;
|
||||||
|
case 'ME':
|
||||||
|
return _$ME;
|
||||||
|
case 'MA':
|
||||||
|
return _$MA;
|
||||||
|
case 'NP':
|
||||||
|
return _$NP;
|
||||||
|
case 'NL':
|
||||||
|
return _$NL;
|
||||||
|
case 'NZ':
|
||||||
|
return _$NZ;
|
||||||
|
case 'NI':
|
||||||
|
return _$NI;
|
||||||
|
case 'NG':
|
||||||
|
return _$NG;
|
||||||
|
case 'MK':
|
||||||
|
return _$MK;
|
||||||
|
case 'NO':
|
||||||
|
return _$NO;
|
||||||
|
case 'OM':
|
||||||
|
return _$OM;
|
||||||
|
case 'PK':
|
||||||
|
return _$PK;
|
||||||
|
case 'PA':
|
||||||
|
return _$PA;
|
||||||
|
case 'PG':
|
||||||
|
return _$PG;
|
||||||
|
case 'PY':
|
||||||
|
return _$PY;
|
||||||
|
case 'PE':
|
||||||
|
return _$PE;
|
||||||
|
case 'PH':
|
||||||
|
return _$PH;
|
||||||
|
case 'PL':
|
||||||
|
return _$PL;
|
||||||
|
case 'PT':
|
||||||
|
return _$PT;
|
||||||
|
case 'PR':
|
||||||
|
return _$PR;
|
||||||
|
case 'QA':
|
||||||
|
return _$QA;
|
||||||
|
case 'RO':
|
||||||
|
return _$RO;
|
||||||
|
case 'RU':
|
||||||
|
return _$RU;
|
||||||
|
case 'SA':
|
||||||
|
return _$SA;
|
||||||
|
case 'SN':
|
||||||
|
return _$SN;
|
||||||
|
case 'RS':
|
||||||
|
return _$RS;
|
||||||
|
case 'SG':
|
||||||
|
return _$SG;
|
||||||
|
case 'SK':
|
||||||
|
return _$SK;
|
||||||
|
case 'SI':
|
||||||
|
return _$SI;
|
||||||
|
case 'ZA':
|
||||||
|
return _$ZA;
|
||||||
|
case 'KR':
|
||||||
|
return _$KR;
|
||||||
|
case 'ES':
|
||||||
|
return _$ES;
|
||||||
|
case 'LK':
|
||||||
|
return _$LK;
|
||||||
|
case 'SE':
|
||||||
|
return _$SE;
|
||||||
|
case 'CH':
|
||||||
|
return _$CH;
|
||||||
|
case 'TW':
|
||||||
|
return _$TW;
|
||||||
|
case 'TZ':
|
||||||
|
return _$TZ;
|
||||||
|
case 'TH':
|
||||||
|
return _$TH;
|
||||||
|
case 'TN':
|
||||||
|
return _$TN;
|
||||||
|
case 'TR':
|
||||||
|
return _$TR;
|
||||||
|
case 'UG':
|
||||||
|
return _$UG;
|
||||||
|
case 'UA':
|
||||||
|
return _$UA;
|
||||||
|
case 'AE':
|
||||||
|
return _$AE;
|
||||||
|
case 'GB':
|
||||||
|
return _$GB;
|
||||||
|
case 'US':
|
||||||
|
return _$US;
|
||||||
|
case 'UY':
|
||||||
|
return _$UY;
|
||||||
|
case 'VE':
|
||||||
|
return _$VE;
|
||||||
|
case 'VN':
|
||||||
|
return _$VN;
|
||||||
|
case 'YE':
|
||||||
|
return _$YE;
|
||||||
|
case 'ZW':
|
||||||
|
return _$ZW;
|
||||||
|
default:
|
||||||
|
throw new ArgumentError(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final BuiltSet<Regions> _$values = new BuiltSet<Regions>(const <Regions>[
|
||||||
|
_$DZ,
|
||||||
|
_$AR,
|
||||||
|
_$AU,
|
||||||
|
_$AT,
|
||||||
|
_$AZ,
|
||||||
|
_$BH,
|
||||||
|
_$BD,
|
||||||
|
_$BY,
|
||||||
|
_$BE,
|
||||||
|
_$BO,
|
||||||
|
_$BA,
|
||||||
|
_$BR,
|
||||||
|
_$BG,
|
||||||
|
_$CA,
|
||||||
|
_$CL,
|
||||||
|
_$CO,
|
||||||
|
_$CR,
|
||||||
|
_$HR,
|
||||||
|
_$CY,
|
||||||
|
_$CZ,
|
||||||
|
_$DK,
|
||||||
|
_$DO,
|
||||||
|
_$EC,
|
||||||
|
_$EG,
|
||||||
|
_$SV,
|
||||||
|
_$EE,
|
||||||
|
_$FI,
|
||||||
|
_$FR,
|
||||||
|
_$GE,
|
||||||
|
_$DE,
|
||||||
|
_$GH,
|
||||||
|
_$GR,
|
||||||
|
_$GT,
|
||||||
|
_$HN,
|
||||||
|
_$HK,
|
||||||
|
_$HU,
|
||||||
|
_$IS,
|
||||||
|
_$IN,
|
||||||
|
_$ID,
|
||||||
|
_$IQ,
|
||||||
|
_$IE,
|
||||||
|
_$IL,
|
||||||
|
_$IT,
|
||||||
|
_$JM,
|
||||||
|
_$JP,
|
||||||
|
_$JO,
|
||||||
|
_$KZ,
|
||||||
|
_$KE,
|
||||||
|
_$KW,
|
||||||
|
_$LV,
|
||||||
|
_$LB,
|
||||||
|
_$LY,
|
||||||
|
_$LI,
|
||||||
|
_$LT,
|
||||||
|
_$LU,
|
||||||
|
_$MY,
|
||||||
|
_$MT,
|
||||||
|
_$MX,
|
||||||
|
_$ME,
|
||||||
|
_$MA,
|
||||||
|
_$NP,
|
||||||
|
_$NL,
|
||||||
|
_$NZ,
|
||||||
|
_$NI,
|
||||||
|
_$NG,
|
||||||
|
_$MK,
|
||||||
|
_$NO,
|
||||||
|
_$OM,
|
||||||
|
_$PK,
|
||||||
|
_$PA,
|
||||||
|
_$PG,
|
||||||
|
_$PY,
|
||||||
|
_$PE,
|
||||||
|
_$PH,
|
||||||
|
_$PL,
|
||||||
|
_$PT,
|
||||||
|
_$PR,
|
||||||
|
_$QA,
|
||||||
|
_$RO,
|
||||||
|
_$RU,
|
||||||
|
_$SA,
|
||||||
|
_$SN,
|
||||||
|
_$RS,
|
||||||
|
_$SG,
|
||||||
|
_$SK,
|
||||||
|
_$SI,
|
||||||
|
_$ZA,
|
||||||
|
_$KR,
|
||||||
|
_$ES,
|
||||||
|
_$LK,
|
||||||
|
_$SE,
|
||||||
|
_$CH,
|
||||||
|
_$TW,
|
||||||
|
_$TZ,
|
||||||
|
_$TH,
|
||||||
|
_$TN,
|
||||||
|
_$TR,
|
||||||
|
_$UG,
|
||||||
|
_$UA,
|
||||||
|
_$AE,
|
||||||
|
_$GB,
|
||||||
|
_$US,
|
||||||
|
_$UY,
|
||||||
|
_$VE,
|
||||||
|
_$VN,
|
||||||
|
_$YE,
|
||||||
|
_$ZW,
|
||||||
|
]);
|
||||||
|
|
||||||
|
class _$RegionsMeta {
|
||||||
|
const _$RegionsMeta();
|
||||||
|
Regions get DZ => _$DZ;
|
||||||
|
Regions get AR => _$AR;
|
||||||
|
Regions get AU => _$AU;
|
||||||
|
Regions get AT => _$AT;
|
||||||
|
Regions get AZ => _$AZ;
|
||||||
|
Regions get BH => _$BH;
|
||||||
|
Regions get BD => _$BD;
|
||||||
|
Regions get BY => _$BY;
|
||||||
|
Regions get BE => _$BE;
|
||||||
|
Regions get BO => _$BO;
|
||||||
|
Regions get BA => _$BA;
|
||||||
|
Regions get BR => _$BR;
|
||||||
|
Regions get BG => _$BG;
|
||||||
|
Regions get CA => _$CA;
|
||||||
|
Regions get CL => _$CL;
|
||||||
|
Regions get CO => _$CO;
|
||||||
|
Regions get CR => _$CR;
|
||||||
|
Regions get HR => _$HR;
|
||||||
|
Regions get CY => _$CY;
|
||||||
|
Regions get CZ => _$CZ;
|
||||||
|
Regions get DK => _$DK;
|
||||||
|
Regions get DO => _$DO;
|
||||||
|
Regions get EC => _$EC;
|
||||||
|
Regions get EG => _$EG;
|
||||||
|
Regions get SV => _$SV;
|
||||||
|
Regions get EE => _$EE;
|
||||||
|
Regions get FI => _$FI;
|
||||||
|
Regions get FR => _$FR;
|
||||||
|
Regions get GE => _$GE;
|
||||||
|
Regions get DE => _$DE;
|
||||||
|
Regions get GH => _$GH;
|
||||||
|
Regions get GR => _$GR;
|
||||||
|
Regions get GT => _$GT;
|
||||||
|
Regions get HN => _$HN;
|
||||||
|
Regions get HK => _$HK;
|
||||||
|
Regions get HU => _$HU;
|
||||||
|
Regions get IS => _$IS;
|
||||||
|
Regions get IN => _$IN;
|
||||||
|
Regions get ID => _$ID;
|
||||||
|
Regions get IQ => _$IQ;
|
||||||
|
Regions get IE => _$IE;
|
||||||
|
Regions get IL => _$IL;
|
||||||
|
Regions get IT => _$IT;
|
||||||
|
Regions get JM => _$JM;
|
||||||
|
Regions get JP => _$JP;
|
||||||
|
Regions get JO => _$JO;
|
||||||
|
Regions get KZ => _$KZ;
|
||||||
|
Regions get KE => _$KE;
|
||||||
|
Regions get KW => _$KW;
|
||||||
|
Regions get LV => _$LV;
|
||||||
|
Regions get LB => _$LB;
|
||||||
|
Regions get LY => _$LY;
|
||||||
|
Regions get LI => _$LI;
|
||||||
|
Regions get LT => _$LT;
|
||||||
|
Regions get LU => _$LU;
|
||||||
|
Regions get MY => _$MY;
|
||||||
|
Regions get MT => _$MT;
|
||||||
|
Regions get MX => _$MX;
|
||||||
|
Regions get ME => _$ME;
|
||||||
|
Regions get MA => _$MA;
|
||||||
|
Regions get NP => _$NP;
|
||||||
|
Regions get NL => _$NL;
|
||||||
|
Regions get NZ => _$NZ;
|
||||||
|
Regions get NI => _$NI;
|
||||||
|
Regions get NG => _$NG;
|
||||||
|
Regions get MK => _$MK;
|
||||||
|
Regions get NO => _$NO;
|
||||||
|
Regions get OM => _$OM;
|
||||||
|
Regions get PK => _$PK;
|
||||||
|
Regions get PA => _$PA;
|
||||||
|
Regions get PG => _$PG;
|
||||||
|
Regions get PY => _$PY;
|
||||||
|
Regions get PE => _$PE;
|
||||||
|
Regions get PH => _$PH;
|
||||||
|
Regions get PL => _$PL;
|
||||||
|
Regions get PT => _$PT;
|
||||||
|
Regions get PR => _$PR;
|
||||||
|
Regions get QA => _$QA;
|
||||||
|
Regions get RO => _$RO;
|
||||||
|
Regions get RU => _$RU;
|
||||||
|
Regions get SA => _$SA;
|
||||||
|
Regions get SN => _$SN;
|
||||||
|
Regions get RS => _$RS;
|
||||||
|
Regions get SG => _$SG;
|
||||||
|
Regions get SK => _$SK;
|
||||||
|
Regions get SI => _$SI;
|
||||||
|
Regions get ZA => _$ZA;
|
||||||
|
Regions get KR => _$KR;
|
||||||
|
Regions get ES => _$ES;
|
||||||
|
Regions get LK => _$LK;
|
||||||
|
Regions get SE => _$SE;
|
||||||
|
Regions get CH => _$CH;
|
||||||
|
Regions get TW => _$TW;
|
||||||
|
Regions get TZ => _$TZ;
|
||||||
|
Regions get TH => _$TH;
|
||||||
|
Regions get TN => _$TN;
|
||||||
|
Regions get TR => _$TR;
|
||||||
|
Regions get UG => _$UG;
|
||||||
|
Regions get UA => _$UA;
|
||||||
|
Regions get AE => _$AE;
|
||||||
|
Regions get GB => _$GB;
|
||||||
|
Regions get US => _$US;
|
||||||
|
Regions get UY => _$UY;
|
||||||
|
Regions get VE => _$VE;
|
||||||
|
Regions get VN => _$VN;
|
||||||
|
Regions get YE => _$YE;
|
||||||
|
Regions get ZW => _$ZW;
|
||||||
|
Regions valueOf(String name) => _$valueOf(name);
|
||||||
|
BuiltSet<Regions> get values => _$values;
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class _$RegionsMixin {
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
_$RegionsMeta get Regions => const _$RegionsMeta();
|
||||||
|
}
|
||||||
|
|
||||||
|
Serializer<Regions> _$regionsSerializer = new _$RegionsSerializer();
|
||||||
|
|
||||||
|
class _$RegionsSerializer implements PrimitiveSerializer<Regions> {
|
||||||
|
static const Map<String, Object> _toWire = const <String, Object>{
|
||||||
|
'DZ': 'DZ',
|
||||||
|
'AR': 'AR',
|
||||||
|
'AU': 'AU',
|
||||||
|
'AT': 'AT',
|
||||||
|
'AZ': 'AZ',
|
||||||
|
'BH': 'BH',
|
||||||
|
'BD': 'BD',
|
||||||
|
'BY': 'BY',
|
||||||
|
'BE': 'BE',
|
||||||
|
'BO': 'BO',
|
||||||
|
'BA': 'BA',
|
||||||
|
'BR': 'BR',
|
||||||
|
'BG': 'BG',
|
||||||
|
'CA': 'CA',
|
||||||
|
'CL': 'CL',
|
||||||
|
'CO': 'CO',
|
||||||
|
'CR': 'CR',
|
||||||
|
'HR': 'HR',
|
||||||
|
'CY': 'CY',
|
||||||
|
'CZ': 'CZ',
|
||||||
|
'DK': 'DK',
|
||||||
|
'DO': 'DO',
|
||||||
|
'EC': 'EC',
|
||||||
|
'EG': 'EG',
|
||||||
|
'SV': 'SV',
|
||||||
|
'EE': 'EE',
|
||||||
|
'FI': 'FI',
|
||||||
|
'FR': 'FR',
|
||||||
|
'GE': 'GE',
|
||||||
|
'DE': 'DE',
|
||||||
|
'GH': 'GH',
|
||||||
|
'GR': 'GR',
|
||||||
|
'GT': 'GT',
|
||||||
|
'HN': 'HN',
|
||||||
|
'HK': 'HK',
|
||||||
|
'HU': 'HU',
|
||||||
|
'IS': 'IS',
|
||||||
|
'IN': 'IN',
|
||||||
|
'ID': 'ID',
|
||||||
|
'IQ': 'IQ',
|
||||||
|
'IE': 'IE',
|
||||||
|
'IL': 'IL',
|
||||||
|
'IT': 'IT',
|
||||||
|
'JM': 'JM',
|
||||||
|
'JP': 'JP',
|
||||||
|
'JO': 'JO',
|
||||||
|
'KZ': 'KZ',
|
||||||
|
'KE': 'KE',
|
||||||
|
'KW': 'KW',
|
||||||
|
'LV': 'LV',
|
||||||
|
'LB': 'LB',
|
||||||
|
'LY': 'LY',
|
||||||
|
'LI': 'LI',
|
||||||
|
'LT': 'LT',
|
||||||
|
'LU': 'LU',
|
||||||
|
'MY': 'MY',
|
||||||
|
'MT': 'MT',
|
||||||
|
'MX': 'MX',
|
||||||
|
'ME': 'ME',
|
||||||
|
'MA': 'MA',
|
||||||
|
'NP': 'NP',
|
||||||
|
'NL': 'NL',
|
||||||
|
'NZ': 'NZ',
|
||||||
|
'NI': 'NI',
|
||||||
|
'NG': 'NG',
|
||||||
|
'MK': 'MK',
|
||||||
|
'NO': 'NO',
|
||||||
|
'OM': 'OM',
|
||||||
|
'PK': 'PK',
|
||||||
|
'PA': 'PA',
|
||||||
|
'PG': 'PG',
|
||||||
|
'PY': 'PY',
|
||||||
|
'PE': 'PE',
|
||||||
|
'PH': 'PH',
|
||||||
|
'PL': 'PL',
|
||||||
|
'PT': 'PT',
|
||||||
|
'PR': 'PR',
|
||||||
|
'QA': 'QA',
|
||||||
|
'RO': 'RO',
|
||||||
|
'RU': 'RU',
|
||||||
|
'SA': 'SA',
|
||||||
|
'SN': 'SN',
|
||||||
|
'RS': 'RS',
|
||||||
|
'SG': 'SG',
|
||||||
|
'SK': 'SK',
|
||||||
|
'SI': 'SI',
|
||||||
|
'ZA': 'ZA',
|
||||||
|
'KR': 'KR',
|
||||||
|
'ES': 'ES',
|
||||||
|
'LK': 'LK',
|
||||||
|
'SE': 'SE',
|
||||||
|
'CH': 'CH',
|
||||||
|
'TW': 'TW',
|
||||||
|
'TZ': 'TZ',
|
||||||
|
'TH': 'TH',
|
||||||
|
'TN': 'TN',
|
||||||
|
'TR': 'TR',
|
||||||
|
'UG': 'UG',
|
||||||
|
'UA': 'UA',
|
||||||
|
'AE': 'AE',
|
||||||
|
'GB': 'GB',
|
||||||
|
'US': 'US',
|
||||||
|
'UY': 'UY',
|
||||||
|
'VE': 'VE',
|
||||||
|
'VN': 'VN',
|
||||||
|
'YE': 'YE',
|
||||||
|
'ZW': 'ZW',
|
||||||
|
};
|
||||||
|
static const Map<Object, String> _fromWire = const <Object, String>{
|
||||||
|
'DZ': 'DZ',
|
||||||
|
'AR': 'AR',
|
||||||
|
'AU': 'AU',
|
||||||
|
'AT': 'AT',
|
||||||
|
'AZ': 'AZ',
|
||||||
|
'BH': 'BH',
|
||||||
|
'BD': 'BD',
|
||||||
|
'BY': 'BY',
|
||||||
|
'BE': 'BE',
|
||||||
|
'BO': 'BO',
|
||||||
|
'BA': 'BA',
|
||||||
|
'BR': 'BR',
|
||||||
|
'BG': 'BG',
|
||||||
|
'CA': 'CA',
|
||||||
|
'CL': 'CL',
|
||||||
|
'CO': 'CO',
|
||||||
|
'CR': 'CR',
|
||||||
|
'HR': 'HR',
|
||||||
|
'CY': 'CY',
|
||||||
|
'CZ': 'CZ',
|
||||||
|
'DK': 'DK',
|
||||||
|
'DO': 'DO',
|
||||||
|
'EC': 'EC',
|
||||||
|
'EG': 'EG',
|
||||||
|
'SV': 'SV',
|
||||||
|
'EE': 'EE',
|
||||||
|
'FI': 'FI',
|
||||||
|
'FR': 'FR',
|
||||||
|
'GE': 'GE',
|
||||||
|
'DE': 'DE',
|
||||||
|
'GH': 'GH',
|
||||||
|
'GR': 'GR',
|
||||||
|
'GT': 'GT',
|
||||||
|
'HN': 'HN',
|
||||||
|
'HK': 'HK',
|
||||||
|
'HU': 'HU',
|
||||||
|
'IS': 'IS',
|
||||||
|
'IN': 'IN',
|
||||||
|
'ID': 'ID',
|
||||||
|
'IQ': 'IQ',
|
||||||
|
'IE': 'IE',
|
||||||
|
'IL': 'IL',
|
||||||
|
'IT': 'IT',
|
||||||
|
'JM': 'JM',
|
||||||
|
'JP': 'JP',
|
||||||
|
'JO': 'JO',
|
||||||
|
'KZ': 'KZ',
|
||||||
|
'KE': 'KE',
|
||||||
|
'KW': 'KW',
|
||||||
|
'LV': 'LV',
|
||||||
|
'LB': 'LB',
|
||||||
|
'LY': 'LY',
|
||||||
|
'LI': 'LI',
|
||||||
|
'LT': 'LT',
|
||||||
|
'LU': 'LU',
|
||||||
|
'MY': 'MY',
|
||||||
|
'MT': 'MT',
|
||||||
|
'MX': 'MX',
|
||||||
|
'ME': 'ME',
|
||||||
|
'MA': 'MA',
|
||||||
|
'NP': 'NP',
|
||||||
|
'NL': 'NL',
|
||||||
|
'NZ': 'NZ',
|
||||||
|
'NI': 'NI',
|
||||||
|
'NG': 'NG',
|
||||||
|
'MK': 'MK',
|
||||||
|
'NO': 'NO',
|
||||||
|
'OM': 'OM',
|
||||||
|
'PK': 'PK',
|
||||||
|
'PA': 'PA',
|
||||||
|
'PG': 'PG',
|
||||||
|
'PY': 'PY',
|
||||||
|
'PE': 'PE',
|
||||||
|
'PH': 'PH',
|
||||||
|
'PL': 'PL',
|
||||||
|
'PT': 'PT',
|
||||||
|
'PR': 'PR',
|
||||||
|
'QA': 'QA',
|
||||||
|
'RO': 'RO',
|
||||||
|
'RU': 'RU',
|
||||||
|
'SA': 'SA',
|
||||||
|
'SN': 'SN',
|
||||||
|
'RS': 'RS',
|
||||||
|
'SG': 'SG',
|
||||||
|
'SK': 'SK',
|
||||||
|
'SI': 'SI',
|
||||||
|
'ZA': 'ZA',
|
||||||
|
'KR': 'KR',
|
||||||
|
'ES': 'ES',
|
||||||
|
'LK': 'LK',
|
||||||
|
'SE': 'SE',
|
||||||
|
'CH': 'CH',
|
||||||
|
'TW': 'TW',
|
||||||
|
'TZ': 'TZ',
|
||||||
|
'TH': 'TH',
|
||||||
|
'TN': 'TN',
|
||||||
|
'TR': 'TR',
|
||||||
|
'UG': 'UG',
|
||||||
|
'UA': 'UA',
|
||||||
|
'AE': 'AE',
|
||||||
|
'GB': 'GB',
|
||||||
|
'US': 'US',
|
||||||
|
'UY': 'UY',
|
||||||
|
'VE': 'VE',
|
||||||
|
'VN': 'VN',
|
||||||
|
'YE': 'YE',
|
||||||
|
'ZW': 'ZW',
|
||||||
|
};
|
||||||
|
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const <Type>[Regions];
|
||||||
|
@override
|
||||||
|
final String wireName = 'Regions';
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(Serializers serializers, Regions object,
|
||||||
|
{FullType specifiedType = FullType.unspecified}) =>
|
||||||
|
_toWire[object.name] ?? object.name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Regions deserialize(Serializers serializers, Object serialized,
|
||||||
|
{FullType specifiedType = FullType.unspecified}) =>
|
||||||
|
Regions.valueOf(
|
||||||
|
_fromWire[serialized] ?? (serialized is String ? serialized : ''));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
|
330
lib/model/stream.g.dart
Normal file
330
lib/model/stream.g.dart
Normal file
|
@ -0,0 +1,330 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// @dart=2.7
|
||||||
|
|
||||||
|
part of 'stream.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
const StreamFormatEnum _$streamFormatEnum_mPEG4 =
|
||||||
|
const StreamFormatEnum._('mPEG4');
|
||||||
|
const StreamFormatEnum _$streamFormatEnum_v3GPP =
|
||||||
|
const StreamFormatEnum._('v3GPP');
|
||||||
|
const StreamFormatEnum _$streamFormatEnum_WEBM =
|
||||||
|
const StreamFormatEnum._('WEBM');
|
||||||
|
const StreamFormatEnum _$streamFormatEnum_m4A = const StreamFormatEnum._('m4A');
|
||||||
|
const StreamFormatEnum _$streamFormatEnum_WEBMA_OPUS =
|
||||||
|
const StreamFormatEnum._('WEBMA_OPUS');
|
||||||
|
|
||||||
|
StreamFormatEnum _$streamFormatEnumValueOf(String name) {
|
||||||
|
switch (name) {
|
||||||
|
case 'mPEG4':
|
||||||
|
return _$streamFormatEnum_mPEG4;
|
||||||
|
case 'v3GPP':
|
||||||
|
return _$streamFormatEnum_v3GPP;
|
||||||
|
case 'WEBM':
|
||||||
|
return _$streamFormatEnum_WEBM;
|
||||||
|
case 'm4A':
|
||||||
|
return _$streamFormatEnum_m4A;
|
||||||
|
case 'WEBMA_OPUS':
|
||||||
|
return _$streamFormatEnum_WEBMA_OPUS;
|
||||||
|
default:
|
||||||
|
throw new ArgumentError(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final BuiltSet<StreamFormatEnum> _$streamFormatEnumValues =
|
||||||
|
new BuiltSet<StreamFormatEnum>(const <StreamFormatEnum>[
|
||||||
|
_$streamFormatEnum_mPEG4,
|
||||||
|
_$streamFormatEnum_v3GPP,
|
||||||
|
_$streamFormatEnum_WEBM,
|
||||||
|
_$streamFormatEnum_m4A,
|
||||||
|
_$streamFormatEnum_WEBMA_OPUS,
|
||||||
|
]);
|
||||||
|
|
||||||
|
Serializer<StreamFormatEnum> _$streamFormatEnumSerializer =
|
||||||
|
new _$StreamFormatEnumSerializer();
|
||||||
|
|
||||||
|
class _$StreamFormatEnumSerializer
|
||||||
|
implements PrimitiveSerializer<StreamFormatEnum> {
|
||||||
|
static const Map<String, Object> _toWire = const <String, Object>{
|
||||||
|
'mPEG4': 'MPEG_4',
|
||||||
|
'v3GPP': 'v3GPP',
|
||||||
|
'WEBM': 'WEBM',
|
||||||
|
'm4A': 'M4A',
|
||||||
|
'WEBMA_OPUS': 'WEBMA_OPUS',
|
||||||
|
};
|
||||||
|
static const Map<Object, String> _fromWire = const <Object, String>{
|
||||||
|
'MPEG_4': 'mPEG4',
|
||||||
|
'v3GPP': 'v3GPP',
|
||||||
|
'WEBM': 'WEBM',
|
||||||
|
'M4A': 'm4A',
|
||||||
|
'WEBMA_OPUS': 'WEBMA_OPUS',
|
||||||
|
};
|
||||||
|
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const <Type>[StreamFormatEnum];
|
||||||
|
@override
|
||||||
|
final String wireName = 'StreamFormatEnum';
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(Serializers serializers, StreamFormatEnum object,
|
||||||
|
{FullType specifiedType = FullType.unspecified}) =>
|
||||||
|
_toWire[object.name] ?? object.name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
StreamFormatEnum deserialize(Serializers serializers, Object serialized,
|
||||||
|
{FullType specifiedType = FullType.unspecified}) =>
|
||||||
|
StreamFormatEnum.valueOf(
|
||||||
|
_fromWire[serialized] ?? (serialized is String ? serialized : ''));
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$Stream extends Stream {
|
||||||
|
@override
|
||||||
|
final String url;
|
||||||
|
@override
|
||||||
|
final StreamFormatEnum format;
|
||||||
|
@override
|
||||||
|
final String quality;
|
||||||
|
@override
|
||||||
|
final String mimeType;
|
||||||
|
@override
|
||||||
|
final String codec;
|
||||||
|
@override
|
||||||
|
final bool videoOnly;
|
||||||
|
@override
|
||||||
|
final int bitrate;
|
||||||
|
@override
|
||||||
|
final int initStart;
|
||||||
|
@override
|
||||||
|
final int initEnd;
|
||||||
|
@override
|
||||||
|
final int indexStart;
|
||||||
|
@override
|
||||||
|
final int indexEnd;
|
||||||
|
@override
|
||||||
|
final int width;
|
||||||
|
@override
|
||||||
|
final int height;
|
||||||
|
@override
|
||||||
|
final int fps;
|
||||||
|
|
||||||
|
factory _$Stream([void Function(StreamBuilder) updates]) =>
|
||||||
|
(new StreamBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
_$Stream._(
|
||||||
|
{this.url,
|
||||||
|
this.format,
|
||||||
|
this.quality,
|
||||||
|
this.mimeType,
|
||||||
|
this.codec,
|
||||||
|
this.videoOnly,
|
||||||
|
this.bitrate,
|
||||||
|
this.initStart,
|
||||||
|
this.initEnd,
|
||||||
|
this.indexStart,
|
||||||
|
this.indexEnd,
|
||||||
|
this.width,
|
||||||
|
this.height,
|
||||||
|
this.fps})
|
||||||
|
: super._();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Stream rebuild(void Function(StreamBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
StreamBuilder toBuilder() => new StreamBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is Stream &&
|
||||||
|
url == other.url &&
|
||||||
|
format == other.format &&
|
||||||
|
quality == other.quality &&
|
||||||
|
mimeType == other.mimeType &&
|
||||||
|
codec == other.codec &&
|
||||||
|
videoOnly == other.videoOnly &&
|
||||||
|
bitrate == other.bitrate &&
|
||||||
|
initStart == other.initStart &&
|
||||||
|
initEnd == other.initEnd &&
|
||||||
|
indexStart == other.indexStart &&
|
||||||
|
indexEnd == other.indexEnd &&
|
||||||
|
width == other.width &&
|
||||||
|
height == other.height &&
|
||||||
|
fps == other.fps;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return $jf($jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc($jc(0, url.hashCode),
|
||||||
|
format.hashCode),
|
||||||
|
quality.hashCode),
|
||||||
|
mimeType.hashCode),
|
||||||
|
codec.hashCode),
|
||||||
|
videoOnly.hashCode),
|
||||||
|
bitrate.hashCode),
|
||||||
|
initStart.hashCode),
|
||||||
|
initEnd.hashCode),
|
||||||
|
indexStart.hashCode),
|
||||||
|
indexEnd.hashCode),
|
||||||
|
width.hashCode),
|
||||||
|
height.hashCode),
|
||||||
|
fps.hashCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper('Stream')
|
||||||
|
..add('url', url)
|
||||||
|
..add('format', format)
|
||||||
|
..add('quality', quality)
|
||||||
|
..add('mimeType', mimeType)
|
||||||
|
..add('codec', codec)
|
||||||
|
..add('videoOnly', videoOnly)
|
||||||
|
..add('bitrate', bitrate)
|
||||||
|
..add('initStart', initStart)
|
||||||
|
..add('initEnd', initEnd)
|
||||||
|
..add('indexStart', indexStart)
|
||||||
|
..add('indexEnd', indexEnd)
|
||||||
|
..add('width', width)
|
||||||
|
..add('height', height)
|
||||||
|
..add('fps', fps))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class StreamBuilder implements Builder<Stream, StreamBuilder> {
|
||||||
|
_$Stream _$v;
|
||||||
|
|
||||||
|
String _url;
|
||||||
|
String get url => _$this._url;
|
||||||
|
set url(String url) => _$this._url = url;
|
||||||
|
|
||||||
|
StreamFormatEnum _format;
|
||||||
|
StreamFormatEnum get format => _$this._format;
|
||||||
|
set format(StreamFormatEnum format) => _$this._format = format;
|
||||||
|
|
||||||
|
String _quality;
|
||||||
|
String get quality => _$this._quality;
|
||||||
|
set quality(String quality) => _$this._quality = quality;
|
||||||
|
|
||||||
|
String _mimeType;
|
||||||
|
String get mimeType => _$this._mimeType;
|
||||||
|
set mimeType(String mimeType) => _$this._mimeType = mimeType;
|
||||||
|
|
||||||
|
String _codec;
|
||||||
|
String get codec => _$this._codec;
|
||||||
|
set codec(String codec) => _$this._codec = codec;
|
||||||
|
|
||||||
|
bool _videoOnly;
|
||||||
|
bool get videoOnly => _$this._videoOnly;
|
||||||
|
set videoOnly(bool videoOnly) => _$this._videoOnly = videoOnly;
|
||||||
|
|
||||||
|
int _bitrate;
|
||||||
|
int get bitrate => _$this._bitrate;
|
||||||
|
set bitrate(int bitrate) => _$this._bitrate = bitrate;
|
||||||
|
|
||||||
|
int _initStart;
|
||||||
|
int get initStart => _$this._initStart;
|
||||||
|
set initStart(int initStart) => _$this._initStart = initStart;
|
||||||
|
|
||||||
|
int _initEnd;
|
||||||
|
int get initEnd => _$this._initEnd;
|
||||||
|
set initEnd(int initEnd) => _$this._initEnd = initEnd;
|
||||||
|
|
||||||
|
int _indexStart;
|
||||||
|
int get indexStart => _$this._indexStart;
|
||||||
|
set indexStart(int indexStart) => _$this._indexStart = indexStart;
|
||||||
|
|
||||||
|
int _indexEnd;
|
||||||
|
int get indexEnd => _$this._indexEnd;
|
||||||
|
set indexEnd(int indexEnd) => _$this._indexEnd = indexEnd;
|
||||||
|
|
||||||
|
int _width;
|
||||||
|
int get width => _$this._width;
|
||||||
|
set width(int width) => _$this._width = width;
|
||||||
|
|
||||||
|
int _height;
|
||||||
|
int get height => _$this._height;
|
||||||
|
set height(int height) => _$this._height = height;
|
||||||
|
|
||||||
|
int _fps;
|
||||||
|
int get fps => _$this._fps;
|
||||||
|
set fps(int fps) => _$this._fps = fps;
|
||||||
|
|
||||||
|
StreamBuilder() {
|
||||||
|
Stream._initializeBuilder(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
StreamBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_url = $v.url;
|
||||||
|
_format = $v.format;
|
||||||
|
_quality = $v.quality;
|
||||||
|
_mimeType = $v.mimeType;
|
||||||
|
_codec = $v.codec;
|
||||||
|
_videoOnly = $v.videoOnly;
|
||||||
|
_bitrate = $v.bitrate;
|
||||||
|
_initStart = $v.initStart;
|
||||||
|
_initEnd = $v.initEnd;
|
||||||
|
_indexStart = $v.indexStart;
|
||||||
|
_indexEnd = $v.indexEnd;
|
||||||
|
_width = $v.width;
|
||||||
|
_height = $v.height;
|
||||||
|
_fps = $v.fps;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(Stream other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$Stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(StreamBuilder) updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
_$Stream build() {
|
||||||
|
final _$result = _$v ??
|
||||||
|
new _$Stream._(
|
||||||
|
url: url,
|
||||||
|
format: format,
|
||||||
|
quality: quality,
|
||||||
|
mimeType: mimeType,
|
||||||
|
codec: codec,
|
||||||
|
videoOnly: videoOnly,
|
||||||
|
bitrate: bitrate,
|
||||||
|
initStart: initStart,
|
||||||
|
initEnd: initEnd,
|
||||||
|
indexStart: indexStart,
|
||||||
|
indexEnd: indexEnd,
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
|
fps: fps);
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
|
229
lib/model/stream_item.g.dart
Normal file
229
lib/model/stream_item.g.dart
Normal file
|
@ -0,0 +1,229 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// @dart=2.7
|
||||||
|
|
||||||
|
part of 'stream_item.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$StreamItem extends StreamItem {
|
||||||
|
@override
|
||||||
|
final int duration;
|
||||||
|
@override
|
||||||
|
final String thumbnail;
|
||||||
|
@override
|
||||||
|
final String title;
|
||||||
|
@override
|
||||||
|
final int uploaded;
|
||||||
|
@override
|
||||||
|
final String uploadedDate;
|
||||||
|
@override
|
||||||
|
final String uploaderAvatar;
|
||||||
|
@override
|
||||||
|
final String uploaderName;
|
||||||
|
@override
|
||||||
|
final String uploaderUrl;
|
||||||
|
@override
|
||||||
|
final bool uploaderVerified;
|
||||||
|
@override
|
||||||
|
final String url;
|
||||||
|
@override
|
||||||
|
final int views;
|
||||||
|
|
||||||
|
factory _$StreamItem([void Function(StreamItemBuilder) updates]) =>
|
||||||
|
(new StreamItemBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
_$StreamItem._(
|
||||||
|
{this.duration,
|
||||||
|
this.thumbnail,
|
||||||
|
this.title,
|
||||||
|
this.uploaded,
|
||||||
|
this.uploadedDate,
|
||||||
|
this.uploaderAvatar,
|
||||||
|
this.uploaderName,
|
||||||
|
this.uploaderUrl,
|
||||||
|
this.uploaderVerified,
|
||||||
|
this.url,
|
||||||
|
this.views})
|
||||||
|
: super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(duration, 'StreamItem', 'duration');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(thumbnail, 'StreamItem', 'thumbnail');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(title, 'StreamItem', 'title');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(url, 'StreamItem', 'url');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
StreamItem rebuild(void Function(StreamItemBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
StreamItemBuilder toBuilder() => new StreamItemBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is StreamItem &&
|
||||||
|
duration == other.duration &&
|
||||||
|
thumbnail == other.thumbnail &&
|
||||||
|
title == other.title &&
|
||||||
|
uploaded == other.uploaded &&
|
||||||
|
uploadedDate == other.uploadedDate &&
|
||||||
|
uploaderAvatar == other.uploaderAvatar &&
|
||||||
|
uploaderName == other.uploaderName &&
|
||||||
|
uploaderUrl == other.uploaderUrl &&
|
||||||
|
uploaderVerified == other.uploaderVerified &&
|
||||||
|
url == other.url &&
|
||||||
|
views == other.views;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return $jf($jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc($jc(0, duration.hashCode),
|
||||||
|
thumbnail.hashCode),
|
||||||
|
title.hashCode),
|
||||||
|
uploaded.hashCode),
|
||||||
|
uploadedDate.hashCode),
|
||||||
|
uploaderAvatar.hashCode),
|
||||||
|
uploaderName.hashCode),
|
||||||
|
uploaderUrl.hashCode),
|
||||||
|
uploaderVerified.hashCode),
|
||||||
|
url.hashCode),
|
||||||
|
views.hashCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper('StreamItem')
|
||||||
|
..add('duration', duration)
|
||||||
|
..add('thumbnail', thumbnail)
|
||||||
|
..add('title', title)
|
||||||
|
..add('uploaded', uploaded)
|
||||||
|
..add('uploadedDate', uploadedDate)
|
||||||
|
..add('uploaderAvatar', uploaderAvatar)
|
||||||
|
..add('uploaderName', uploaderName)
|
||||||
|
..add('uploaderUrl', uploaderUrl)
|
||||||
|
..add('uploaderVerified', uploaderVerified)
|
||||||
|
..add('url', url)
|
||||||
|
..add('views', views))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class StreamItemBuilder implements Builder<StreamItem, StreamItemBuilder> {
|
||||||
|
_$StreamItem _$v;
|
||||||
|
|
||||||
|
int _duration;
|
||||||
|
int get duration => _$this._duration;
|
||||||
|
set duration(int duration) => _$this._duration = duration;
|
||||||
|
|
||||||
|
String _thumbnail;
|
||||||
|
String get thumbnail => _$this._thumbnail;
|
||||||
|
set thumbnail(String thumbnail) => _$this._thumbnail = thumbnail;
|
||||||
|
|
||||||
|
String _title;
|
||||||
|
String get title => _$this._title;
|
||||||
|
set title(String title) => _$this._title = title;
|
||||||
|
|
||||||
|
int _uploaded;
|
||||||
|
int get uploaded => _$this._uploaded;
|
||||||
|
set uploaded(int uploaded) => _$this._uploaded = uploaded;
|
||||||
|
|
||||||
|
String _uploadedDate;
|
||||||
|
String get uploadedDate => _$this._uploadedDate;
|
||||||
|
set uploadedDate(String uploadedDate) => _$this._uploadedDate = uploadedDate;
|
||||||
|
|
||||||
|
String _uploaderAvatar;
|
||||||
|
String get uploaderAvatar => _$this._uploaderAvatar;
|
||||||
|
set uploaderAvatar(String uploaderAvatar) =>
|
||||||
|
_$this._uploaderAvatar = uploaderAvatar;
|
||||||
|
|
||||||
|
String _uploaderName;
|
||||||
|
String get uploaderName => _$this._uploaderName;
|
||||||
|
set uploaderName(String uploaderName) => _$this._uploaderName = uploaderName;
|
||||||
|
|
||||||
|
String _uploaderUrl;
|
||||||
|
String get uploaderUrl => _$this._uploaderUrl;
|
||||||
|
set uploaderUrl(String uploaderUrl) => _$this._uploaderUrl = uploaderUrl;
|
||||||
|
|
||||||
|
bool _uploaderVerified;
|
||||||
|
bool get uploaderVerified => _$this._uploaderVerified;
|
||||||
|
set uploaderVerified(bool uploaderVerified) =>
|
||||||
|
_$this._uploaderVerified = uploaderVerified;
|
||||||
|
|
||||||
|
String _url;
|
||||||
|
String get url => _$this._url;
|
||||||
|
set url(String url) => _$this._url = url;
|
||||||
|
|
||||||
|
int _views;
|
||||||
|
int get views => _$this._views;
|
||||||
|
set views(int views) => _$this._views = views;
|
||||||
|
|
||||||
|
StreamItemBuilder() {
|
||||||
|
StreamItem._initializeBuilder(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
StreamItemBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_duration = $v.duration;
|
||||||
|
_thumbnail = $v.thumbnail;
|
||||||
|
_title = $v.title;
|
||||||
|
_uploaded = $v.uploaded;
|
||||||
|
_uploadedDate = $v.uploadedDate;
|
||||||
|
_uploaderAvatar = $v.uploaderAvatar;
|
||||||
|
_uploaderName = $v.uploaderName;
|
||||||
|
_uploaderUrl = $v.uploaderUrl;
|
||||||
|
_uploaderVerified = $v.uploaderVerified;
|
||||||
|
_url = $v.url;
|
||||||
|
_views = $v.views;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(StreamItem other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$StreamItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(StreamItemBuilder) updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
_$StreamItem build() {
|
||||||
|
final _$result = _$v ??
|
||||||
|
new _$StreamItem._(
|
||||||
|
duration: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
duration, 'StreamItem', 'duration'),
|
||||||
|
thumbnail: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
thumbnail, 'StreamItem', 'thumbnail'),
|
||||||
|
title: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
title, 'StreamItem', 'title'),
|
||||||
|
uploaded: uploaded,
|
||||||
|
uploadedDate: uploadedDate,
|
||||||
|
uploaderAvatar: uploaderAvatar,
|
||||||
|
uploaderName: uploaderName,
|
||||||
|
uploaderUrl: uploaderUrl,
|
||||||
|
uploaderVerified: uploaderVerified,
|
||||||
|
url:
|
||||||
|
BuiltValueNullFieldError.checkNotNull(url, 'StreamItem', 'url'),
|
||||||
|
views: views);
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
|
86
lib/model/streams_page.dart
Normal file
86
lib/model/streams_page.dart
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.7
|
||||||
|
|
||||||
|
// ignore_for_file: unused_import
|
||||||
|
|
||||||
|
import 'package:built_collection/built_collection.dart';
|
||||||
|
import 'package:piped_api/model/stream_item.dart';
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'streams_page.g.dart';
|
||||||
|
|
||||||
|
abstract class StreamsPage implements Built<StreamsPage, StreamsPageBuilder> {
|
||||||
|
|
||||||
|
@nullable
|
||||||
|
@BuiltValueField(wireName: r'relatedStreams')
|
||||||
|
BuiltList<StreamItem> get relatedStreams;
|
||||||
|
|
||||||
|
/// The parameter used to get the next page of this page.
|
||||||
|
@nullable
|
||||||
|
@BuiltValueField(wireName: r'nextpage')
|
||||||
|
String get nextpage;
|
||||||
|
|
||||||
|
StreamsPage._();
|
||||||
|
|
||||||
|
static void _initializeBuilder(StreamsPageBuilder b) => b;
|
||||||
|
|
||||||
|
factory StreamsPage([void updates(StreamsPageBuilder b)]) = _$StreamsPage;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<StreamsPage> get serializer => _$StreamsPageSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$StreamsPageSerializer implements StructuredSerializer<StreamsPage> {
|
||||||
|
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [StreamsPage, _$StreamsPage];
|
||||||
|
@override
|
||||||
|
final String wireName = r'StreamsPage';
|
||||||
|
|
||||||
|
@override
|
||||||
|
Iterable<Object> serialize(Serializers serializers, StreamsPage object,
|
||||||
|
{FullType specifiedType = FullType.unspecified}) {
|
||||||
|
final result = <Object>[];
|
||||||
|
if (object.relatedStreams != null) {
|
||||||
|
result
|
||||||
|
..add(r'relatedStreams')
|
||||||
|
..add(serializers.serialize(object.relatedStreams,
|
||||||
|
specifiedType: const FullType(BuiltList, [FullType(StreamItem)])));
|
||||||
|
}
|
||||||
|
if (object.nextpage != null) {
|
||||||
|
result
|
||||||
|
..add(r'nextpage')
|
||||||
|
..add(serializers.serialize(object.nextpage,
|
||||||
|
specifiedType: const FullType(String)));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
StreamsPage deserialize(Serializers serializers, Iterable<Object> serialized,
|
||||||
|
{FullType specifiedType = FullType.unspecified}) {
|
||||||
|
final result = StreamsPageBuilder();
|
||||||
|
|
||||||
|
final iterator = serialized.iterator;
|
||||||
|
while (iterator.moveNext()) {
|
||||||
|
final key = iterator.current as String;
|
||||||
|
iterator.moveNext();
|
||||||
|
final dynamic value = iterator.current;
|
||||||
|
switch (key) {
|
||||||
|
case r'relatedStreams':
|
||||||
|
result.relatedStreams.replace(serializers.deserialize(value,
|
||||||
|
specifiedType: const FullType(BuiltList, [FullType(StreamItem)])) as BuiltList<StreamItem>);
|
||||||
|
break;
|
||||||
|
case r'nextpage':
|
||||||
|
result.nextpage = serializers.deserialize(value,
|
||||||
|
specifiedType: const FullType(String)) as String;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
111
lib/model/streams_page.g.dart
Normal file
111
lib/model/streams_page.g.dart
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// @dart=2.7
|
||||||
|
|
||||||
|
part of 'streams_page.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$StreamsPage extends StreamsPage {
|
||||||
|
@override
|
||||||
|
final BuiltList<StreamItem> relatedStreams;
|
||||||
|
@override
|
||||||
|
final String nextpage;
|
||||||
|
|
||||||
|
factory _$StreamsPage([void Function(StreamsPageBuilder) updates]) =>
|
||||||
|
(new StreamsPageBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
_$StreamsPage._({this.relatedStreams, this.nextpage}) : super._();
|
||||||
|
|
||||||
|
@override
|
||||||
|
StreamsPage rebuild(void Function(StreamsPageBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
StreamsPageBuilder toBuilder() => new StreamsPageBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is StreamsPage &&
|
||||||
|
relatedStreams == other.relatedStreams &&
|
||||||
|
nextpage == other.nextpage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return $jf($jc($jc(0, relatedStreams.hashCode), nextpage.hashCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper('StreamsPage')
|
||||||
|
..add('relatedStreams', relatedStreams)
|
||||||
|
..add('nextpage', nextpage))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class StreamsPageBuilder implements Builder<StreamsPage, StreamsPageBuilder> {
|
||||||
|
_$StreamsPage _$v;
|
||||||
|
|
||||||
|
ListBuilder<StreamItem> _relatedStreams;
|
||||||
|
ListBuilder<StreamItem> get relatedStreams =>
|
||||||
|
_$this._relatedStreams ??= new ListBuilder<StreamItem>();
|
||||||
|
set relatedStreams(ListBuilder<StreamItem> relatedStreams) =>
|
||||||
|
_$this._relatedStreams = relatedStreams;
|
||||||
|
|
||||||
|
String _nextpage;
|
||||||
|
String get nextpage => _$this._nextpage;
|
||||||
|
set nextpage(String nextpage) => _$this._nextpage = nextpage;
|
||||||
|
|
||||||
|
StreamsPageBuilder() {
|
||||||
|
StreamsPage._initializeBuilder(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
StreamsPageBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_relatedStreams = $v.relatedStreams?.toBuilder();
|
||||||
|
_nextpage = $v.nextpage;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(StreamsPage other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$StreamsPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(StreamsPageBuilder) updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
_$StreamsPage build() {
|
||||||
|
_$StreamsPage _$result;
|
||||||
|
try {
|
||||||
|
_$result = _$v ??
|
||||||
|
new _$StreamsPage._(
|
||||||
|
relatedStreams: _relatedStreams?.build(), nextpage: nextpage);
|
||||||
|
} catch (_) {
|
||||||
|
String _$failedField;
|
||||||
|
try {
|
||||||
|
_$failedField = 'relatedStreams';
|
||||||
|
_relatedStreams?.build();
|
||||||
|
} catch (e) {
|
||||||
|
throw new BuiltValueNestedFieldError(
|
||||||
|
'StreamsPage', _$failedField, e.toString());
|
||||||
|
}
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
|
122
lib/model/subtitle.g.dart
Normal file
122
lib/model/subtitle.g.dart
Normal file
|
@ -0,0 +1,122 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// @dart=2.7
|
||||||
|
|
||||||
|
part of 'subtitle.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$Subtitle extends Subtitle {
|
||||||
|
@override
|
||||||
|
final bool autoGenerated;
|
||||||
|
@override
|
||||||
|
final String code;
|
||||||
|
@override
|
||||||
|
final String mimeType;
|
||||||
|
@override
|
||||||
|
final String url;
|
||||||
|
|
||||||
|
factory _$Subtitle([void Function(SubtitleBuilder) updates]) =>
|
||||||
|
(new SubtitleBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
_$Subtitle._({this.autoGenerated, this.code, this.mimeType, this.url})
|
||||||
|
: super._();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Subtitle rebuild(void Function(SubtitleBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
SubtitleBuilder toBuilder() => new SubtitleBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is Subtitle &&
|
||||||
|
autoGenerated == other.autoGenerated &&
|
||||||
|
code == other.code &&
|
||||||
|
mimeType == other.mimeType &&
|
||||||
|
url == other.url;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return $jf($jc(
|
||||||
|
$jc($jc($jc(0, autoGenerated.hashCode), code.hashCode),
|
||||||
|
mimeType.hashCode),
|
||||||
|
url.hashCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper('Subtitle')
|
||||||
|
..add('autoGenerated', autoGenerated)
|
||||||
|
..add('code', code)
|
||||||
|
..add('mimeType', mimeType)
|
||||||
|
..add('url', url))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SubtitleBuilder implements Builder<Subtitle, SubtitleBuilder> {
|
||||||
|
_$Subtitle _$v;
|
||||||
|
|
||||||
|
bool _autoGenerated;
|
||||||
|
bool get autoGenerated => _$this._autoGenerated;
|
||||||
|
set autoGenerated(bool autoGenerated) =>
|
||||||
|
_$this._autoGenerated = autoGenerated;
|
||||||
|
|
||||||
|
String _code;
|
||||||
|
String get code => _$this._code;
|
||||||
|
set code(String code) => _$this._code = code;
|
||||||
|
|
||||||
|
String _mimeType;
|
||||||
|
String get mimeType => _$this._mimeType;
|
||||||
|
set mimeType(String mimeType) => _$this._mimeType = mimeType;
|
||||||
|
|
||||||
|
String _url;
|
||||||
|
String get url => _$this._url;
|
||||||
|
set url(String url) => _$this._url = url;
|
||||||
|
|
||||||
|
SubtitleBuilder() {
|
||||||
|
Subtitle._initializeBuilder(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
SubtitleBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_autoGenerated = $v.autoGenerated;
|
||||||
|
_code = $v.code;
|
||||||
|
_mimeType = $v.mimeType;
|
||||||
|
_url = $v.url;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(Subtitle other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$Subtitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(SubtitleBuilder) updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
_$Subtitle build() {
|
||||||
|
final _$result = _$v ??
|
||||||
|
new _$Subtitle._(
|
||||||
|
autoGenerated: autoGenerated,
|
||||||
|
code: code,
|
||||||
|
mimeType: mimeType,
|
||||||
|
url: url);
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
|
366
lib/model/video_info.g.dart
Normal file
366
lib/model/video_info.g.dart
Normal file
|
@ -0,0 +1,366 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// @dart=2.7
|
||||||
|
|
||||||
|
part of 'video_info.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$VideoInfo extends VideoInfo {
|
||||||
|
@override
|
||||||
|
final BuiltList<Stream> audioStreams;
|
||||||
|
@override
|
||||||
|
final BuiltList<Stream> videoStreams;
|
||||||
|
@override
|
||||||
|
final String description;
|
||||||
|
@override
|
||||||
|
final int dislikes;
|
||||||
|
@override
|
||||||
|
final int duration;
|
||||||
|
@override
|
||||||
|
final String hls;
|
||||||
|
@override
|
||||||
|
final String lbryId;
|
||||||
|
@override
|
||||||
|
final int likes;
|
||||||
|
@override
|
||||||
|
final bool livestream;
|
||||||
|
@override
|
||||||
|
final String proxyUrl;
|
||||||
|
@override
|
||||||
|
final BuiltList<Subtitle> subtitles;
|
||||||
|
@override
|
||||||
|
final String dash;
|
||||||
|
@override
|
||||||
|
final String thumbnailUrl;
|
||||||
|
@override
|
||||||
|
final String title;
|
||||||
|
@override
|
||||||
|
final String uploadDate;
|
||||||
|
@override
|
||||||
|
final String uploader;
|
||||||
|
@override
|
||||||
|
final String uploaderAvatar;
|
||||||
|
@override
|
||||||
|
final String uploaderUrl;
|
||||||
|
@override
|
||||||
|
final bool uploaderVerified;
|
||||||
|
@override
|
||||||
|
final BuiltList<StreamItem> relatedStreams;
|
||||||
|
|
||||||
|
factory _$VideoInfo([void Function(VideoInfoBuilder) updates]) =>
|
||||||
|
(new VideoInfoBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
_$VideoInfo._(
|
||||||
|
{this.audioStreams,
|
||||||
|
this.videoStreams,
|
||||||
|
this.description,
|
||||||
|
this.dislikes,
|
||||||
|
this.duration,
|
||||||
|
this.hls,
|
||||||
|
this.lbryId,
|
||||||
|
this.likes,
|
||||||
|
this.livestream,
|
||||||
|
this.proxyUrl,
|
||||||
|
this.subtitles,
|
||||||
|
this.dash,
|
||||||
|
this.thumbnailUrl,
|
||||||
|
this.title,
|
||||||
|
this.uploadDate,
|
||||||
|
this.uploader,
|
||||||
|
this.uploaderAvatar,
|
||||||
|
this.uploaderUrl,
|
||||||
|
this.uploaderVerified,
|
||||||
|
this.relatedStreams})
|
||||||
|
: super._();
|
||||||
|
|
||||||
|
@override
|
||||||
|
VideoInfo rebuild(void Function(VideoInfoBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
VideoInfoBuilder toBuilder() => new VideoInfoBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is VideoInfo &&
|
||||||
|
audioStreams == other.audioStreams &&
|
||||||
|
videoStreams == other.videoStreams &&
|
||||||
|
description == other.description &&
|
||||||
|
dislikes == other.dislikes &&
|
||||||
|
duration == other.duration &&
|
||||||
|
hls == other.hls &&
|
||||||
|
lbryId == other.lbryId &&
|
||||||
|
likes == other.likes &&
|
||||||
|
livestream == other.livestream &&
|
||||||
|
proxyUrl == other.proxyUrl &&
|
||||||
|
subtitles == other.subtitles &&
|
||||||
|
dash == other.dash &&
|
||||||
|
thumbnailUrl == other.thumbnailUrl &&
|
||||||
|
title == other.title &&
|
||||||
|
uploadDate == other.uploadDate &&
|
||||||
|
uploader == other.uploader &&
|
||||||
|
uploaderAvatar == other.uploaderAvatar &&
|
||||||
|
uploaderUrl == other.uploaderUrl &&
|
||||||
|
uploaderVerified == other.uploaderVerified &&
|
||||||
|
relatedStreams == other.relatedStreams;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return $jf($jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc(
|
||||||
|
$jc($jc(0, audioStreams.hashCode),
|
||||||
|
videoStreams.hashCode),
|
||||||
|
description.hashCode),
|
||||||
|
dislikes.hashCode),
|
||||||
|
duration.hashCode),
|
||||||
|
hls.hashCode),
|
||||||
|
lbryId.hashCode),
|
||||||
|
likes.hashCode),
|
||||||
|
livestream.hashCode),
|
||||||
|
proxyUrl.hashCode),
|
||||||
|
subtitles.hashCode),
|
||||||
|
dash.hashCode),
|
||||||
|
thumbnailUrl.hashCode),
|
||||||
|
title.hashCode),
|
||||||
|
uploadDate.hashCode),
|
||||||
|
uploader.hashCode),
|
||||||
|
uploaderAvatar.hashCode),
|
||||||
|
uploaderUrl.hashCode),
|
||||||
|
uploaderVerified.hashCode),
|
||||||
|
relatedStreams.hashCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper('VideoInfo')
|
||||||
|
..add('audioStreams', audioStreams)
|
||||||
|
..add('videoStreams', videoStreams)
|
||||||
|
..add('description', description)
|
||||||
|
..add('dislikes', dislikes)
|
||||||
|
..add('duration', duration)
|
||||||
|
..add('hls', hls)
|
||||||
|
..add('lbryId', lbryId)
|
||||||
|
..add('likes', likes)
|
||||||
|
..add('livestream', livestream)
|
||||||
|
..add('proxyUrl', proxyUrl)
|
||||||
|
..add('subtitles', subtitles)
|
||||||
|
..add('dash', dash)
|
||||||
|
..add('thumbnailUrl', thumbnailUrl)
|
||||||
|
..add('title', title)
|
||||||
|
..add('uploadDate', uploadDate)
|
||||||
|
..add('uploader', uploader)
|
||||||
|
..add('uploaderAvatar', uploaderAvatar)
|
||||||
|
..add('uploaderUrl', uploaderUrl)
|
||||||
|
..add('uploaderVerified', uploaderVerified)
|
||||||
|
..add('relatedStreams', relatedStreams))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class VideoInfoBuilder implements Builder<VideoInfo, VideoInfoBuilder> {
|
||||||
|
_$VideoInfo _$v;
|
||||||
|
|
||||||
|
ListBuilder<Stream> _audioStreams;
|
||||||
|
ListBuilder<Stream> get audioStreams =>
|
||||||
|
_$this._audioStreams ??= new ListBuilder<Stream>();
|
||||||
|
set audioStreams(ListBuilder<Stream> audioStreams) =>
|
||||||
|
_$this._audioStreams = audioStreams;
|
||||||
|
|
||||||
|
ListBuilder<Stream> _videoStreams;
|
||||||
|
ListBuilder<Stream> get videoStreams =>
|
||||||
|
_$this._videoStreams ??= new ListBuilder<Stream>();
|
||||||
|
set videoStreams(ListBuilder<Stream> videoStreams) =>
|
||||||
|
_$this._videoStreams = videoStreams;
|
||||||
|
|
||||||
|
String _description;
|
||||||
|
String get description => _$this._description;
|
||||||
|
set description(String description) => _$this._description = description;
|
||||||
|
|
||||||
|
int _dislikes;
|
||||||
|
int get dislikes => _$this._dislikes;
|
||||||
|
set dislikes(int dislikes) => _$this._dislikes = dislikes;
|
||||||
|
|
||||||
|
int _duration;
|
||||||
|
int get duration => _$this._duration;
|
||||||
|
set duration(int duration) => _$this._duration = duration;
|
||||||
|
|
||||||
|
String _hls;
|
||||||
|
String get hls => _$this._hls;
|
||||||
|
set hls(String hls) => _$this._hls = hls;
|
||||||
|
|
||||||
|
String _lbryId;
|
||||||
|
String get lbryId => _$this._lbryId;
|
||||||
|
set lbryId(String lbryId) => _$this._lbryId = lbryId;
|
||||||
|
|
||||||
|
int _likes;
|
||||||
|
int get likes => _$this._likes;
|
||||||
|
set likes(int likes) => _$this._likes = likes;
|
||||||
|
|
||||||
|
bool _livestream;
|
||||||
|
bool get livestream => _$this._livestream;
|
||||||
|
set livestream(bool livestream) => _$this._livestream = livestream;
|
||||||
|
|
||||||
|
String _proxyUrl;
|
||||||
|
String get proxyUrl => _$this._proxyUrl;
|
||||||
|
set proxyUrl(String proxyUrl) => _$this._proxyUrl = proxyUrl;
|
||||||
|
|
||||||
|
ListBuilder<Subtitle> _subtitles;
|
||||||
|
ListBuilder<Subtitle> get subtitles =>
|
||||||
|
_$this._subtitles ??= new ListBuilder<Subtitle>();
|
||||||
|
set subtitles(ListBuilder<Subtitle> subtitles) =>
|
||||||
|
_$this._subtitles = subtitles;
|
||||||
|
|
||||||
|
String _dash;
|
||||||
|
String get dash => _$this._dash;
|
||||||
|
set dash(String dash) => _$this._dash = dash;
|
||||||
|
|
||||||
|
String _thumbnailUrl;
|
||||||
|
String get thumbnailUrl => _$this._thumbnailUrl;
|
||||||
|
set thumbnailUrl(String thumbnailUrl) => _$this._thumbnailUrl = thumbnailUrl;
|
||||||
|
|
||||||
|
String _title;
|
||||||
|
String get title => _$this._title;
|
||||||
|
set title(String title) => _$this._title = title;
|
||||||
|
|
||||||
|
String _uploadDate;
|
||||||
|
String get uploadDate => _$this._uploadDate;
|
||||||
|
set uploadDate(String uploadDate) => _$this._uploadDate = uploadDate;
|
||||||
|
|
||||||
|
String _uploader;
|
||||||
|
String get uploader => _$this._uploader;
|
||||||
|
set uploader(String uploader) => _$this._uploader = uploader;
|
||||||
|
|
||||||
|
String _uploaderAvatar;
|
||||||
|
String get uploaderAvatar => _$this._uploaderAvatar;
|
||||||
|
set uploaderAvatar(String uploaderAvatar) =>
|
||||||
|
_$this._uploaderAvatar = uploaderAvatar;
|
||||||
|
|
||||||
|
String _uploaderUrl;
|
||||||
|
String get uploaderUrl => _$this._uploaderUrl;
|
||||||
|
set uploaderUrl(String uploaderUrl) => _$this._uploaderUrl = uploaderUrl;
|
||||||
|
|
||||||
|
bool _uploaderVerified;
|
||||||
|
bool get uploaderVerified => _$this._uploaderVerified;
|
||||||
|
set uploaderVerified(bool uploaderVerified) =>
|
||||||
|
_$this._uploaderVerified = uploaderVerified;
|
||||||
|
|
||||||
|
ListBuilder<StreamItem> _relatedStreams;
|
||||||
|
ListBuilder<StreamItem> get relatedStreams =>
|
||||||
|
_$this._relatedStreams ??= new ListBuilder<StreamItem>();
|
||||||
|
set relatedStreams(ListBuilder<StreamItem> relatedStreams) =>
|
||||||
|
_$this._relatedStreams = relatedStreams;
|
||||||
|
|
||||||
|
VideoInfoBuilder() {
|
||||||
|
VideoInfo._initializeBuilder(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
VideoInfoBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_audioStreams = $v.audioStreams?.toBuilder();
|
||||||
|
_videoStreams = $v.videoStreams?.toBuilder();
|
||||||
|
_description = $v.description;
|
||||||
|
_dislikes = $v.dislikes;
|
||||||
|
_duration = $v.duration;
|
||||||
|
_hls = $v.hls;
|
||||||
|
_lbryId = $v.lbryId;
|
||||||
|
_likes = $v.likes;
|
||||||
|
_livestream = $v.livestream;
|
||||||
|
_proxyUrl = $v.proxyUrl;
|
||||||
|
_subtitles = $v.subtitles?.toBuilder();
|
||||||
|
_dash = $v.dash;
|
||||||
|
_thumbnailUrl = $v.thumbnailUrl;
|
||||||
|
_title = $v.title;
|
||||||
|
_uploadDate = $v.uploadDate;
|
||||||
|
_uploader = $v.uploader;
|
||||||
|
_uploaderAvatar = $v.uploaderAvatar;
|
||||||
|
_uploaderUrl = $v.uploaderUrl;
|
||||||
|
_uploaderVerified = $v.uploaderVerified;
|
||||||
|
_relatedStreams = $v.relatedStreams?.toBuilder();
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(VideoInfo other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$VideoInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(VideoInfoBuilder) updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
_$VideoInfo build() {
|
||||||
|
_$VideoInfo _$result;
|
||||||
|
try {
|
||||||
|
_$result = _$v ??
|
||||||
|
new _$VideoInfo._(
|
||||||
|
audioStreams: _audioStreams?.build(),
|
||||||
|
videoStreams: _videoStreams?.build(),
|
||||||
|
description: description,
|
||||||
|
dislikes: dislikes,
|
||||||
|
duration: duration,
|
||||||
|
hls: hls,
|
||||||
|
lbryId: lbryId,
|
||||||
|
likes: likes,
|
||||||
|
livestream: livestream,
|
||||||
|
proxyUrl: proxyUrl,
|
||||||
|
subtitles: _subtitles?.build(),
|
||||||
|
dash: dash,
|
||||||
|
thumbnailUrl: thumbnailUrl,
|
||||||
|
title: title,
|
||||||
|
uploadDate: uploadDate,
|
||||||
|
uploader: uploader,
|
||||||
|
uploaderAvatar: uploaderAvatar,
|
||||||
|
uploaderUrl: uploaderUrl,
|
||||||
|
uploaderVerified: uploaderVerified,
|
||||||
|
relatedStreams: _relatedStreams?.build());
|
||||||
|
} catch (_) {
|
||||||
|
String _$failedField;
|
||||||
|
try {
|
||||||
|
_$failedField = 'audioStreams';
|
||||||
|
_audioStreams?.build();
|
||||||
|
_$failedField = 'videoStreams';
|
||||||
|
_videoStreams?.build();
|
||||||
|
|
||||||
|
_$failedField = 'subtitles';
|
||||||
|
_subtitles?.build();
|
||||||
|
|
||||||
|
_$failedField = 'relatedStreams';
|
||||||
|
_relatedStreams?.build();
|
||||||
|
} catch (e) {
|
||||||
|
throw new BuiltValueNestedFieldError(
|
||||||
|
'VideoInfo', _$failedField, e.toString());
|
||||||
|
}
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
|
|
@ -16,5 +16,6 @@ export 'package:piped_api/src/model/exception_error.dart';
|
||||||
export 'package:piped_api/src/model/regions.dart';
|
export 'package:piped_api/src/model/regions.dart';
|
||||||
export 'package:piped_api/src/model/stream.dart';
|
export 'package:piped_api/src/model/stream.dart';
|
||||||
export 'package:piped_api/src/model/stream_item.dart';
|
export 'package:piped_api/src/model/stream_item.dart';
|
||||||
|
export 'package:piped_api/src/model/streams_page.dart';
|
||||||
export 'package:piped_api/src/model/subtitle.dart';
|
export 'package:piped_api/src/model/subtitle.dart';
|
||||||
export 'package:piped_api/src/model/video_info.dart';
|
export 'package:piped_api/src/model/video_info.dart';
|
||||||
|
|
|
@ -18,6 +18,7 @@ import 'package:piped_api/model/exception_error.dart';
|
||||||
import 'package:piped_api/model/regions.dart';
|
import 'package:piped_api/model/regions.dart';
|
||||||
import 'package:piped_api/model/stream.dart';
|
import 'package:piped_api/model/stream.dart';
|
||||||
import 'package:piped_api/model/stream_item.dart';
|
import 'package:piped_api/model/stream_item.dart';
|
||||||
|
import 'package:piped_api/model/streams_page.dart';
|
||||||
import 'package:piped_api/model/subtitle.dart';
|
import 'package:piped_api/model/subtitle.dart';
|
||||||
import 'package:piped_api/model/video_info.dart';
|
import 'package:piped_api/model/video_info.dart';
|
||||||
|
|
||||||
|
@ -29,6 +30,7 @@ part 'serializers.g.dart';
|
||||||
Regions,
|
Regions,
|
||||||
Stream,
|
Stream,
|
||||||
StreamItem,
|
StreamItem,
|
||||||
|
StreamsPage,
|
||||||
Subtitle,
|
Subtitle,
|
||||||
VideoInfo,
|
VideoInfo,
|
||||||
])
|
])
|
||||||
|
|
40
lib/serializers.g.dart
Normal file
40
lib/serializers.g.dart
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// @dart=2.7
|
||||||
|
|
||||||
|
part of serializers;
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
Serializers _$serializers = (new Serializers().toBuilder()
|
||||||
|
..add(ChannelInfo.serializer)
|
||||||
|
..add(ExceptionError.serializer)
|
||||||
|
..add(Regions.serializer)
|
||||||
|
..add(Stream.serializer)
|
||||||
|
..add(StreamFormatEnum.serializer)
|
||||||
|
..add(StreamItem.serializer)
|
||||||
|
..add(StreamsPage.serializer)
|
||||||
|
..add(Subtitle.serializer)
|
||||||
|
..add(VideoInfo.serializer)
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(Stream)]),
|
||||||
|
() => new ListBuilder<Stream>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(Stream)]),
|
||||||
|
() => new ListBuilder<Stream>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(Subtitle)]),
|
||||||
|
() => new ListBuilder<Subtitle>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(StreamItem)]),
|
||||||
|
() => new ListBuilder<StreamItem>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(StreamItem)]),
|
||||||
|
() => new ListBuilder<StreamItem>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(StreamItem)]),
|
||||||
|
() => new ListBuilder<StreamItem>()))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
|
|
@ -13,6 +13,7 @@ import 'package:piped_api/src/model/channel_info.dart';
|
||||||
import 'package:piped_api/src/model/exception_error.dart';
|
import 'package:piped_api/src/model/exception_error.dart';
|
||||||
import 'package:piped_api/src/model/regions.dart';
|
import 'package:piped_api/src/model/regions.dart';
|
||||||
import 'package:piped_api/src/model/stream_item.dart';
|
import 'package:piped_api/src/model/stream_item.dart';
|
||||||
|
import 'package:piped_api/src/model/streams_page.dart';
|
||||||
import 'package:piped_api/src/model/video_info.dart';
|
import 'package:piped_api/src/model/video_info.dart';
|
||||||
|
|
||||||
class UnauthenticatedApi {
|
class UnauthenticatedApi {
|
||||||
|
@ -245,6 +246,87 @@ class UnauthenticatedApi {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Gets more channel videos
|
||||||
|
/// Gets more channel videos.
|
||||||
|
///
|
||||||
|
/// Parameters:
|
||||||
|
/// * [channelId] - The channel ID of the YouTube channel you want to get more videos from.
|
||||||
|
/// * [nextpage] - The next page token to get more videos from.
|
||||||
|
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||||
|
/// * [headers] - Can be used to add additional headers to the request
|
||||||
|
/// * [extras] - Can be used to add flags to the request
|
||||||
|
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||||
|
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||||
|
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||||
|
///
|
||||||
|
/// Returns a [Future] containing a [Response] with a [StreamsPage] as data
|
||||||
|
/// Throws [DioError] if API call or serialization fails
|
||||||
|
Future<Response<StreamsPage>> channelNextPage({
|
||||||
|
required String channelId,
|
||||||
|
required String nextpage,
|
||||||
|
CancelToken? cancelToken,
|
||||||
|
Map<String, dynamic>? headers,
|
||||||
|
Map<String, dynamic>? extra,
|
||||||
|
ValidateStatus? validateStatus,
|
||||||
|
ProgressCallback? onSendProgress,
|
||||||
|
ProgressCallback? onReceiveProgress,
|
||||||
|
}) async {
|
||||||
|
final _path = r'/nextpage/channel/{channelId}'.replaceAll('{' r'channelId' '}', channelId.toString());
|
||||||
|
final _options = Options(
|
||||||
|
method: r'GET',
|
||||||
|
headers: <String, dynamic>{
|
||||||
|
...?headers,
|
||||||
|
},
|
||||||
|
extra: <String, dynamic>{
|
||||||
|
'secure': <Map<String, String>>[],
|
||||||
|
...?extra,
|
||||||
|
},
|
||||||
|
validateStatus: validateStatus,
|
||||||
|
);
|
||||||
|
|
||||||
|
final _queryParameters = <String, dynamic>{
|
||||||
|
r'nextpage': encodeQueryParameter(_serializers, nextpage, const FullType(String)),
|
||||||
|
};
|
||||||
|
|
||||||
|
final _response = await _dio.request<Object>(
|
||||||
|
_path,
|
||||||
|
options: _options,
|
||||||
|
queryParameters: _queryParameters,
|
||||||
|
cancelToken: cancelToken,
|
||||||
|
onSendProgress: onSendProgress,
|
||||||
|
onReceiveProgress: onReceiveProgress,
|
||||||
|
);
|
||||||
|
|
||||||
|
StreamsPage _responseData;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const _responseType = FullType(StreamsPage);
|
||||||
|
_responseData = _serializers.deserialize(
|
||||||
|
_response.data!,
|
||||||
|
specifiedType: _responseType,
|
||||||
|
) as StreamsPage;
|
||||||
|
|
||||||
|
} catch (error, stackTrace) {
|
||||||
|
throw DioError(
|
||||||
|
requestOptions: _response.requestOptions,
|
||||||
|
response: _response,
|
||||||
|
type: DioErrorType.other,
|
||||||
|
error: error,
|
||||||
|
)..stackTrace = stackTrace;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Response<StreamsPage>(
|
||||||
|
data: _responseData,
|
||||||
|
headers: _response.headers,
|
||||||
|
isRedirect: _response.isRedirect,
|
||||||
|
requestOptions: _response.requestOptions,
|
||||||
|
redirects: _response.redirects,
|
||||||
|
statusCode: _response.statusCode,
|
||||||
|
statusMessage: _response.statusMessage,
|
||||||
|
extra: _response.extra,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/// Gets Video Information
|
/// Gets Video Information
|
||||||
/// Gets all available Stream information about a video.
|
/// Gets all available Stream information about a video.
|
||||||
///
|
///
|
||||||
|
|
|
@ -110,13 +110,13 @@ class _$StreamItemSerializer implements StructuredSerializer<StreamItem> {
|
||||||
result
|
result
|
||||||
..add(r'uploadedDate')
|
..add(r'uploadedDate')
|
||||||
..add(serializers.serialize(object.uploadedDate,
|
..add(serializers.serialize(object.uploadedDate,
|
||||||
specifiedType: const FullType(String)));
|
specifiedType: const FullType.nullable(String)));
|
||||||
}
|
}
|
||||||
if (object.uploaderAvatar != null) {
|
if (object.uploaderAvatar != null) {
|
||||||
result
|
result
|
||||||
..add(r'uploaderAvatar')
|
..add(r'uploaderAvatar')
|
||||||
..add(serializers.serialize(object.uploaderAvatar,
|
..add(serializers.serialize(object.uploaderAvatar,
|
||||||
specifiedType: const FullType(String)));
|
specifiedType: const FullType.nullable(String)));
|
||||||
}
|
}
|
||||||
if (object.uploaderName != null) {
|
if (object.uploaderName != null) {
|
||||||
result
|
result
|
||||||
|
@ -183,12 +183,14 @@ class _$StreamItemSerializer implements StructuredSerializer<StreamItem> {
|
||||||
break;
|
break;
|
||||||
case r'uploadedDate':
|
case r'uploadedDate':
|
||||||
final valueDes = serializers.deserialize(value,
|
final valueDes = serializers.deserialize(value,
|
||||||
specifiedType: const FullType(String)) as String;
|
specifiedType: const FullType.nullable(String)) as String?;
|
||||||
|
if (valueDes == null) continue;
|
||||||
result.uploadedDate = valueDes;
|
result.uploadedDate = valueDes;
|
||||||
break;
|
break;
|
||||||
case r'uploaderAvatar':
|
case r'uploaderAvatar':
|
||||||
final valueDes = serializers.deserialize(value,
|
final valueDes = serializers.deserialize(value,
|
||||||
specifiedType: const FullType(String)) as String;
|
specifiedType: const FullType.nullable(String)) as String?;
|
||||||
|
if (valueDes == null) continue;
|
||||||
result.uploaderAvatar = valueDes;
|
result.uploaderAvatar = valueDes;
|
||||||
break;
|
break;
|
||||||
case r'uploaderName':
|
case r'uploaderName':
|
||||||
|
|
90
lib/src/model/streams_page.dart
Normal file
90
lib/src/model/streams_page.dart
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
import 'package:piped_api/src/model/stream_item.dart';
|
||||||
|
import 'package:built_collection/built_collection.dart';
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'streams_page.g.dart';
|
||||||
|
|
||||||
|
/// StreamsPage
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [relatedStreams]
|
||||||
|
/// * [nextpage] - The parameter used to get the next page of this page.
|
||||||
|
abstract class StreamsPage implements Built<StreamsPage, StreamsPageBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'relatedStreams')
|
||||||
|
BuiltList<StreamItem>? get relatedStreams;
|
||||||
|
|
||||||
|
/// The parameter used to get the next page of this page.
|
||||||
|
@BuiltValueField(wireName: r'nextpage')
|
||||||
|
String? get nextpage;
|
||||||
|
|
||||||
|
StreamsPage._();
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(StreamsPageBuilder b) => b;
|
||||||
|
|
||||||
|
factory StreamsPage([void updates(StreamsPageBuilder b)]) = _$StreamsPage;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<StreamsPage> get serializer => _$StreamsPageSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$StreamsPageSerializer implements StructuredSerializer<StreamsPage> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [StreamsPage, _$StreamsPage];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'StreamsPage';
|
||||||
|
|
||||||
|
@override
|
||||||
|
Iterable<Object?> serialize(Serializers serializers, StreamsPage object,
|
||||||
|
{FullType specifiedType = FullType.unspecified}) {
|
||||||
|
final result = <Object?>[];
|
||||||
|
if (object.relatedStreams != null) {
|
||||||
|
result
|
||||||
|
..add(r'relatedStreams')
|
||||||
|
..add(serializers.serialize(object.relatedStreams,
|
||||||
|
specifiedType: const FullType(BuiltList, [FullType(StreamItem)])));
|
||||||
|
}
|
||||||
|
if (object.nextpage != null) {
|
||||||
|
result
|
||||||
|
..add(r'nextpage')
|
||||||
|
..add(serializers.serialize(object.nextpage,
|
||||||
|
specifiedType: const FullType.nullable(String)));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
StreamsPage deserialize(Serializers serializers, Iterable<Object?> serialized,
|
||||||
|
{FullType specifiedType = FullType.unspecified}) {
|
||||||
|
final result = StreamsPageBuilder();
|
||||||
|
|
||||||
|
final iterator = serialized.iterator;
|
||||||
|
while (iterator.moveNext()) {
|
||||||
|
final key = iterator.current as String;
|
||||||
|
iterator.moveNext();
|
||||||
|
final Object? value = iterator.current;
|
||||||
|
|
||||||
|
switch (key) {
|
||||||
|
case r'relatedStreams':
|
||||||
|
final valueDes = serializers.deserialize(value,
|
||||||
|
specifiedType: const FullType(BuiltList, [FullType(StreamItem)])) as BuiltList<StreamItem>;
|
||||||
|
result.relatedStreams.replace(valueDes);
|
||||||
|
break;
|
||||||
|
case r'nextpage':
|
||||||
|
final valueDes = serializers.deserialize(value,
|
||||||
|
specifiedType: const FullType.nullable(String)) as String?;
|
||||||
|
if (valueDes == null) continue;
|
||||||
|
result.nextpage = valueDes;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
110
lib/src/model/streams_page.g.dart
Normal file
110
lib/src/model/streams_page.g.dart
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'streams_page.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$StreamsPage extends StreamsPage {
|
||||||
|
@override
|
||||||
|
final BuiltList<StreamItem>? relatedStreams;
|
||||||
|
@override
|
||||||
|
final String? nextpage;
|
||||||
|
|
||||||
|
factory _$StreamsPage([void Function(StreamsPageBuilder)? updates]) =>
|
||||||
|
(new StreamsPageBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
_$StreamsPage._({this.relatedStreams, this.nextpage}) : super._();
|
||||||
|
|
||||||
|
@override
|
||||||
|
StreamsPage rebuild(void Function(StreamsPageBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
StreamsPageBuilder toBuilder() => new StreamsPageBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is StreamsPage &&
|
||||||
|
relatedStreams == other.relatedStreams &&
|
||||||
|
nextpage == other.nextpage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return $jf($jc($jc(0, relatedStreams.hashCode), nextpage.hashCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper('StreamsPage')
|
||||||
|
..add('relatedStreams', relatedStreams)
|
||||||
|
..add('nextpage', nextpage))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class StreamsPageBuilder implements Builder<StreamsPage, StreamsPageBuilder> {
|
||||||
|
_$StreamsPage? _$v;
|
||||||
|
|
||||||
|
ListBuilder<StreamItem>? _relatedStreams;
|
||||||
|
ListBuilder<StreamItem> get relatedStreams =>
|
||||||
|
_$this._relatedStreams ??= new ListBuilder<StreamItem>();
|
||||||
|
set relatedStreams(ListBuilder<StreamItem>? relatedStreams) =>
|
||||||
|
_$this._relatedStreams = relatedStreams;
|
||||||
|
|
||||||
|
String? _nextpage;
|
||||||
|
String? get nextpage => _$this._nextpage;
|
||||||
|
set nextpage(String? nextpage) => _$this._nextpage = nextpage;
|
||||||
|
|
||||||
|
StreamsPageBuilder() {
|
||||||
|
StreamsPage._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
StreamsPageBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_relatedStreams = $v.relatedStreams?.toBuilder();
|
||||||
|
_nextpage = $v.nextpage;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(StreamsPage other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$StreamsPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(StreamsPageBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
_$StreamsPage build() {
|
||||||
|
_$StreamsPage _$result;
|
||||||
|
try {
|
||||||
|
_$result = _$v ??
|
||||||
|
new _$StreamsPage._(
|
||||||
|
relatedStreams: _relatedStreams?.build(), nextpage: nextpage);
|
||||||
|
} catch (_) {
|
||||||
|
late String _$failedField;
|
||||||
|
try {
|
||||||
|
_$failedField = 'relatedStreams';
|
||||||
|
_relatedStreams?.build();
|
||||||
|
} catch (e) {
|
||||||
|
throw new BuiltValueNestedFieldError(
|
||||||
|
'StreamsPage', _$failedField, e.toString());
|
||||||
|
}
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
|
|
@ -17,6 +17,7 @@ import 'package:piped_api/src/model/exception_error.dart';
|
||||||
import 'package:piped_api/src/model/regions.dart';
|
import 'package:piped_api/src/model/regions.dart';
|
||||||
import 'package:piped_api/src/model/stream.dart';
|
import 'package:piped_api/src/model/stream.dart';
|
||||||
import 'package:piped_api/src/model/stream_item.dart';
|
import 'package:piped_api/src/model/stream_item.dart';
|
||||||
|
import 'package:piped_api/src/model/streams_page.dart';
|
||||||
import 'package:piped_api/src/model/subtitle.dart';
|
import 'package:piped_api/src/model/subtitle.dart';
|
||||||
import 'package:piped_api/src/model/video_info.dart';
|
import 'package:piped_api/src/model/video_info.dart';
|
||||||
|
|
||||||
|
@ -28,6 +29,7 @@ part 'serializers.g.dart';
|
||||||
Regions,
|
Regions,
|
||||||
Stream,
|
Stream,
|
||||||
StreamItem,
|
StreamItem,
|
||||||
|
StreamsPage,
|
||||||
Subtitle,
|
Subtitle,
|
||||||
VideoInfo,
|
VideoInfo,
|
||||||
])
|
])
|
||||||
|
|
|
@ -13,6 +13,7 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
||||||
..add(Stream.serializer)
|
..add(Stream.serializer)
|
||||||
..add(StreamFormatEnum.serializer)
|
..add(StreamFormatEnum.serializer)
|
||||||
..add(StreamItem.serializer)
|
..add(StreamItem.serializer)
|
||||||
|
..add(StreamsPage.serializer)
|
||||||
..add(Subtitle.serializer)
|
..add(Subtitle.serializer)
|
||||||
..add(VideoInfo.serializer)
|
..add(VideoInfo.serializer)
|
||||||
..addBuilderFactory(
|
..addBuilderFactory(
|
||||||
|
@ -27,6 +28,9 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
||||||
..addBuilderFactory(
|
..addBuilderFactory(
|
||||||
const FullType(BuiltList, const [const FullType(StreamItem)]),
|
const FullType(BuiltList, const [const FullType(StreamItem)]),
|
||||||
() => new ListBuilder<StreamItem>())
|
() => new ListBuilder<StreamItem>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(StreamItem)]),
|
||||||
|
() => new ListBuilder<StreamItem>())
|
||||||
..addBuilderFactory(
|
..addBuilderFactory(
|
||||||
const FullType(BuiltList, const [const FullType(StreamItem)]),
|
const FullType(BuiltList, const [const FullType(StreamItem)]),
|
||||||
() => new ListBuilder<StreamItem>()))
|
() => new ListBuilder<StreamItem>()))
|
||||||
|
|
12
pubspec.yaml
12
pubspec.yaml
|
@ -4,14 +4,14 @@ description: Automatically generated OpenAPI bindings for Piped.
|
||||||
homepage: homepage
|
homepage: homepage
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.7.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
dio: '^3.0.9'
|
dio: '>=4.0.0 <5.0.0'
|
||||||
built_value: '>=7.1.0 <8.0.0'
|
built_value: '>=8.1.0 <9.0.0'
|
||||||
built_collection: '>=4.3.2 <5.0.0'
|
built_collection: '>=5.1.0 <6.0.0'
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
built_value_generator: '>=7.1.0 <8.0.0'
|
built_value_generator: '>=8.1.0 <9.0.0'
|
||||||
build_runner: any
|
build_runner: any
|
||||||
test: '>=1.3.0 <1.16.0'
|
test: '>=1.16.0 <1.17.0'
|
||||||
|
|
31
test/streams_page_test.dart
Normal file
31
test/streams_page_test.dart
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.7
|
||||||
|
|
||||||
|
// ignore_for_file: unused_import
|
||||||
|
|
||||||
|
import 'package:piped_api/model/streams_page.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
// tests for StreamsPage
|
||||||
|
void main() {
|
||||||
|
final instance = StreamsPageBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(StreamsPage, () {
|
||||||
|
// BuiltList<StreamItem> relatedStreams
|
||||||
|
test('to test the property `relatedStreams`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// The parameter used to get the next page of this page.
|
||||||
|
// String nextpage
|
||||||
|
test('to test the property `nextpage`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue