mirror of
https://github.com/TeamPiped/piped_dart.git
synced 2024-08-14 22:27:49 +00:00
Update to latest openapi code.
This commit is contained in:
parent
fd20ae95b1
commit
26f755fc52
49 changed files with 1224 additions and 452 deletions
125
test/content_item_test.dart
Normal file
125
test/content_item_test.dart
Normal file
|
@ -0,0 +1,125 @@
|
|||
import 'package:test/test.dart';
|
||||
import 'package:piped_api/piped_api.dart';
|
||||
|
||||
// tests for ContentItem
|
||||
void main() {
|
||||
final instance = ContentItemBuilder();
|
||||
// TODO add properties to the builder and call build()
|
||||
|
||||
group(ContentItem, () {
|
||||
// The type of the content item.
|
||||
// String type
|
||||
test('to test the property `type`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The duration of the video in seconds.
|
||||
// int duration
|
||||
test('to test the property `duration`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The thumbnail of the playlist.
|
||||
// String thumbnail
|
||||
test('to test the property `thumbnail`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The title of the video.
|
||||
// String title
|
||||
test('to test the property `title`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The date in unix epoch the video was uploaded.
|
||||
// int uploaded
|
||||
test('to test the property `uploaded`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The relative date the video was uploaded on.
|
||||
// String uploadedDate
|
||||
test('to test the property `uploadedDate`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The avatar of the channel of the video.
|
||||
// String uploaderAvatar
|
||||
test('to test the property `uploaderAvatar`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The name of the channel of the video.
|
||||
// String uploaderName
|
||||
test('to test the property `uploaderName`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The relative URL of the channel of the video.
|
||||
// String uploaderUrl
|
||||
test('to test the property `uploaderUrl`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Whether or not the channel has a verified badge.
|
||||
// bool uploaderVerified
|
||||
test('to test the property `uploaderVerified`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The relative URL of the playlist.
|
||||
// String url
|
||||
test('to test the property `url`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The number of views the video has.
|
||||
// int views
|
||||
test('to test the property `views`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Whether or not the video is a short video.
|
||||
// bool isShort
|
||||
test('to test the property `isShort`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The short description of the video.
|
||||
// String shortDescription
|
||||
test('to test the property `shortDescription`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The description of the channel.
|
||||
// String description
|
||||
test('to test the property `description`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The name of the playlist.
|
||||
// String name
|
||||
test('to test the property `name`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The number of subscribers the channel has.
|
||||
// int subscribers
|
||||
test('to test the property `subscribers`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Whether the channel is verified.
|
||||
// bool verified
|
||||
test('to test the property `verified`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// The number of videos in the playlist.
|
||||
// int videos
|
||||
test('to test the property `videos`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
import 'package:test/test.dart';
|
||||
import 'package:piped_api/piped_api.dart';
|
||||
|
||||
|
||||
/// tests for SearchApi
|
||||
void main() {
|
||||
final instance = PipedApi().getSearchApi();
|
||||
|
@ -9,21 +8,23 @@ void main() {
|
|||
group(SearchApi, () {
|
||||
// Searches for videos, channels, and playlists.
|
||||
//
|
||||
// Searches for videos, channels, and playlists.
|
||||
// Searches for videos, channels, and playlists.
|
||||
//
|
||||
//Future<SearchPage> search(String q, SearchFilter filter) async
|
||||
test('test search', () async {
|
||||
// TODO
|
||||
print((await instance.search(q: "cat videos", filter: SearchFilter.all))
|
||||
.data
|
||||
?.items
|
||||
?.first);
|
||||
});
|
||||
|
||||
// Gets more search results
|
||||
//
|
||||
// Gets more search results.
|
||||
// Gets more search results.
|
||||
//
|
||||
//Future<SearchPage> searchNextPage(String nextpage, String q, SearchFilter filter) async
|
||||
test('test searchNextPage', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue