Implement support for searching.

This commit is contained in:
Kavin 2022-07-07 18:34:25 +01:00
parent abb6f6e71c
commit 45dcedf2ef
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD
27 changed files with 2237 additions and 2 deletions

View file

@ -0,0 +1,53 @@
import 'package:test/test.dart';
import 'package:piped_api/piped_api.dart';
// tests for ChannelItem
void main() {
final instance = ChannelItemBuilder();
// TODO add properties to the builder and call build()
group(ChannelItem, () {
// The description of the channel.
// String description
test('to test the property `description`', () async {
// TODO
});
// The name of the channel.
// 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
});
// The thumbnail of the channel.
// String thumbnail
test('to test the property `thumbnail`', () async {
// TODO
});
// The relative URL of the channel.
// String url
test('to test the property `url`', () async {
// TODO
});
// Whether the channel is verified.
// bool verified
test('to test the property `verified`', () async {
// TODO
});
// The number of videos the channel has.
// int videos
test('to test the property `videos`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,35 @@
import 'package:test/test.dart';
import 'package:piped_api/piped_api.dart';
// tests for PlaylistItem
void main() {
final instance = PlaylistItemBuilder();
// TODO add properties to the builder and call build()
group(PlaylistItem, () {
// The name of the playlist.
// String name
test('to test the property `name`', () async {
// TODO
});
// The thumbnail of the playlist.
// String thumbnail
test('to test the property `thumbnail`', () async {
// TODO
});
// The relative URL of the playlist.
// String url
test('to test the property `url`', () async {
// TODO
});
// The number of videos in the playlist.
// int videos
test('to test the property `videos`', () async {
// TODO
});
});
}

View file

@ -0,0 +1,9 @@
import 'package:test/test.dart';
import 'package:piped_api/piped_api.dart';
// tests for SearchFilter
void main() {
group(SearchFilter, () {
});
}

107
test/search_item_test.dart Normal file
View file

@ -0,0 +1,107 @@
import 'package:test/test.dart';
import 'package:piped_api/piped_api.dart';
// tests for SearchItem
void main() {
final instance = SearchItemBuilder();
// TODO add properties to the builder and call build()
group(SearchItem, () {
// 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
});
// 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
});
});
}

View file

@ -0,0 +1,34 @@
import 'package:test/test.dart';
import 'package:piped_api/piped_api.dart';
// tests for SearchPage
void main() {
final instance = SearchPageBuilder();
// TODO add properties to the builder and call build()
group(SearchPage, () {
// Whether the search query was corrected.
// bool corrected
test('to test the property `corrected`', () async {
// TODO
});
// BuiltList<SearchItem> items
test('to test the property `items`', () async {
// TODO
});
// The parameter used to get the next page of this page.
// String nextpage
test('to test the property `nextpage`', () async {
// TODO
});
// The suggested search query.
// String suggestion
test('to test the property `suggestion`', () async {
// TODO
});
});
}