mirror of
https://github.com/TeamPiped/piped_dart.git
synced 2024-08-14 22:27:49 +00:00
Implement support for searching.
This commit is contained in:
parent
abb6f6e71c
commit
45dcedf2ef
27 changed files with 2237 additions and 2 deletions
21
doc/ChannelItem.md
Normal file
21
doc/ChannelItem.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# piped_api.model.ChannelItem
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:piped_api/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**description** | **String** | The description of the channel. | [optional]
|
||||
**name** | **String** | The name of the channel. | [optional]
|
||||
**subscribers** | **int** | The number of subscribers the channel has. | [optional]
|
||||
**thumbnail** | **String** | The thumbnail of the channel. | [optional]
|
||||
**url** | **String** | The relative URL of the channel. | [optional]
|
||||
**verified** | **bool** | Whether the channel is verified. | [optional]
|
||||
**videos** | **int** | The number of videos the channel has. | [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)
|
||||
|
||||
|
18
doc/PlaylistItem.md
Normal file
18
doc/PlaylistItem.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# piped_api.model.PlaylistItem
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:piped_api/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | The name of the playlist. | [optional]
|
||||
**thumbnail** | **String** | The thumbnail of the playlist. | [optional]
|
||||
**url** | **String** | The relative URL of the playlist. | [optional]
|
||||
**videos** | **int** | The number of videos in the playlist. | [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)
|
||||
|
||||
|
14
doc/SearchFilter.md
Normal file
14
doc/SearchFilter.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
# piped_api.model.SearchFilter
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:piped_api/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
30
doc/SearchItem.md
Normal file
30
doc/SearchItem.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
# piped_api.model.SearchItem
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:piped_api/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**duration** | **int** | The duration of the video in seconds. |
|
||||
**thumbnail** | **String** | The thumbnail of the playlist. |
|
||||
**title** | **String** | The title of the video. |
|
||||
**uploaded** | **int** | The date in unix epoch the video was uploaded. | [optional]
|
||||
**uploadedDate** | **String** | The relative date the video was uploaded on. | [optional]
|
||||
**uploaderAvatar** | **String** | The avatar of the channel of the video. | [optional]
|
||||
**uploaderName** | **String** | The name of the channel of the video. | [optional]
|
||||
**uploaderUrl** | **String** | The relative URL of the channel of the video. | [optional]
|
||||
**uploaderVerified** | **bool** | Whether or not the channel has a verified badge. | [optional]
|
||||
**url** | **String** | The relative URL of the playlist. |
|
||||
**views** | **int** | The number of views the video has. | [optional]
|
||||
**description** | **String** | The description of the channel. | [optional]
|
||||
**name** | **String** | The name of the playlist. | [optional]
|
||||
**subscribers** | **int** | The number of subscribers the channel has. | [optional]
|
||||
**verified** | **bool** | Whether the channel is verified. | [optional]
|
||||
**videos** | **int** | The number of videos in the playlist. | [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)
|
||||
|
||||
|
18
doc/SearchPage.md
Normal file
18
doc/SearchPage.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# piped_api.model.SearchPage
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:piped_api/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**corrected** | **bool** | Whether the search query was corrected. | [optional]
|
||||
**items** | [**BuiltList<SearchItem>**](SearchItem.md) | | [optional]
|
||||
**nextpage** | **String** | The parameter used to get the next page of this page. | [optional]
|
||||
**suggestion** | **String** | The suggested search query. | [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)
|
||||
|
||||
|
|
@ -15,6 +15,8 @@ Method | HTTP request | Description
|
|||
[**channelNextPage**](UnauthenticatedApi.md#channelnextpage) | **GET** /nextpage/channel/{channelId} | Gets more channel videos
|
||||
[**comments**](UnauthenticatedApi.md#comments) | **GET** /comments/{videoId} | Gets Comments
|
||||
[**commentsNextPage**](UnauthenticatedApi.md#commentsnextpage) | **GET** /nextpage/comments/{videoId} | Gets more comments
|
||||
[**search**](UnauthenticatedApi.md#search) | **GET** /search | Searches for videos, channels, and playlists.
|
||||
[**searchNextPage**](UnauthenticatedApi.md#searchnextpage) | **GET** /nextpage/search | Gets more search results
|
||||
[**streamInfo**](UnauthenticatedApi.md#streaminfo) | **GET** /streams/{videoId} | Gets Video Information
|
||||
[**trending**](UnauthenticatedApi.md#trending) | **GET** /trending | Gets all Trending Videos
|
||||
|
||||
|
@ -281,6 +283,98 @@ 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)
|
||||
|
||||
# **search**
|
||||
> SearchPage search(q, filter)
|
||||
|
||||
Searches for videos, channels, and playlists.
|
||||
|
||||
Searches for videos, channels, and playlists.
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:piped_api/api.dart';
|
||||
|
||||
final api = PipedApi().getUnauthenticatedApi();
|
||||
final String q = Techlore; // String | The search query string.
|
||||
final SearchFilter filter = ; // SearchFilter | The filter parameter specifies a filter query that restricts the results to items that match the filter.
|
||||
|
||||
try {
|
||||
final response = api.search(q, filter);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
print('Exception when calling UnauthenticatedApi->search: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**q** | **String**| The search query string. |
|
||||
**filter** | [**SearchFilter**](.md)| The filter parameter specifies a filter query that restricts the results to items that match the filter. |
|
||||
|
||||
### Return type
|
||||
|
||||
[**SearchPage**](SearchPage.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)
|
||||
|
||||
# **searchNextPage**
|
||||
> SearchPage searchNextPage(nextpage, q, filter)
|
||||
|
||||
Gets more search results
|
||||
|
||||
Gets more search results.
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:piped_api/api.dart';
|
||||
|
||||
final api = PipedApi().getUnauthenticatedApi();
|
||||
final String nextpage = nextpage_example; // String | The next page token to get more search results from.
|
||||
final String q = Techlore; // String | The search query string.
|
||||
final SearchFilter filter = ; // SearchFilter | The filter parameter specifies a filter query that restricts the results to items that match the filter.
|
||||
|
||||
try {
|
||||
final response = api.searchNextPage(nextpage, q, filter);
|
||||
print(response);
|
||||
} catch on DioError (e) {
|
||||
print('Exception when calling UnauthenticatedApi->searchNextPage: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**nextpage** | **String**| The next page token to get more search results from. |
|
||||
**q** | **String**| The search query string. |
|
||||
**filter** | [**SearchFilter**](.md)| The filter parameter specifies a filter query that restricts the results to items that match the filter. |
|
||||
|
||||
### Return type
|
||||
|
||||
[**SearchPage**](SearchPage.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**
|
||||
> VideoInfo streamInfo(videoId)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue