piped_dart/README.md

89 lines
2.7 KiB
Markdown
Raw Normal View History

2022-06-05 08:34:50 +00:00
# piped_api
2022-02-06 12:22:59 +00:00
This is an API specification for Piped API instances.
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 1.0.0
2022-06-05 08:34:50 +00:00
- Build package: org.openapitools.codegen.languages.DartDioClientCodegen
2022-02-06 12:22:59 +00:00
For more information, please visit [https://github.com/TeamPiped/Piped/issues](https://github.com/TeamPiped/Piped/issues)
## Requirements
2022-06-05 08:34:50 +00:00
Dart 2.7.0 or later OR Flutter 1.12 or later
2022-02-06 12:22:59 +00:00
## Installation & Usage
### Github
If this Dart package is published to Github, please include the following in pubspec.yaml
2022-06-05 08:34:50 +00:00
```
name: piped_api
version: 1.0.0
description: Automatically generated OpenAPI bindings for Piped.
2022-02-06 12:22:59 +00:00
dependencies:
piped_api:
2022-06-05 08:34:50 +00:00
git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
version: 'any'
2022-02-06 12:22:59 +00:00
```
2022-06-05 08:34:50 +00:00
### Local
To use the package in your local drive, please include the following in pubspec.yaml
```
2022-02-06 12:22:59 +00:00
dependencies:
piped_api:
path: /path/to/piped_api
```
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```dart
2022-06-05 08:34:50 +00:00
import 'package:piped_api/api.dart';
2022-02-06 12:22:59 +00:00
2022-06-05 08:34:50 +00:00
final api = UnauthenticatedApi();
final channelId = UCs6KfncB4OV6Vug4o_bzijg; // String | The channel ID of the YouTube channel you want to get information about.
2022-02-06 12:22:59 +00:00
try {
final response = await api.channelInfoId(channelId);
print(response);
2022-06-05 08:34:50 +00:00
} catch (e) {
2022-02-06 12:22:59 +00:00
print("Exception when calling UnauthenticatedApi->channelInfoId: $e\n");
}
```
## Documentation for API Endpoints
All URIs are relative to *https://pipedapi.kavin.rocks*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
2022-06-05 08:34:50 +00:00
*UnauthenticatedApi* | [**channelInfoId**](doc/UnauthenticatedApi.md#channelinfoid) | **GET** /channel/{channelId} | Gets Channel Information
*UnauthenticatedApi* | [**channelInfoName**](doc/UnauthenticatedApi.md#channelinfoname) | **GET** /c/{name} | Gets Channel Information
*UnauthenticatedApi* | [**channelInfoUsername**](doc/UnauthenticatedApi.md#channelinfousername) | **GET** /user/{username} | Gets Channel Information
*UnauthenticatedApi* | [**streamInfo**](doc/UnauthenticatedApi.md#streaminfo) | **GET** /streams/{videoId} | Gets Video Information
*UnauthenticatedApi* | [**trending**](doc/UnauthenticatedApi.md#trending) | **GET** /trending | Gets all Trending Videos
2022-02-06 12:22:59 +00:00
## Documentation For Models
- [ChannelInfo](doc/ChannelInfo.md)
- [ExceptionError](doc/ExceptionError.md)
- [Regions](doc/Regions.md)
- [Stream](doc/Stream.md)
- [StreamItem](doc/StreamItem.md)
2022-02-07 13:25:54 +00:00
- [Subtitle](doc/Subtitle.md)
2022-02-06 12:22:59 +00:00
- [VideoInfo](doc/VideoInfo.md)
## Documentation For Authorization
All endpoints do not require authorization.
## Author
kavin@kavin.rocks