Skip to content

Commit 929cfcb

Browse files
committed
dep bump, remove flutter example, new sdk, new formatting
1 parent 0715d9b commit 929cfcb

File tree

200 files changed

+3619
-3231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+3619
-3231
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 2.2.6
2+
3+
* dep bump
4+
* remove flutter example
5+
* new sdk
6+
* new formatting
7+
18
## 2.2.5+7
29

310
* Issue #11

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ To use this package, add the dependency to your pubspec.yaml file:
8080
```yaml
8181
dependencies:
8282
...
83-
yt: ^2.2.5+7
83+
yt: ^2.2.6
8484
```
8585
8686
## Obtaining Authorization Credentials

bin/yt.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ import 'package:yt/yt.dart';
44

55
void main(List<String> arguments) async {
66
CommandRunner('yt', 'A command line interface for connecting to Youtube')
7-
..argParser.addOption('log-level',
8-
allowed: ['all', 'debug', 'info', 'warning', 'error', 'off'],
9-
defaultsTo: 'off')
7+
..argParser.addOption(
8+
'log-level',
9+
allowed: ['all', 'debug', 'info', 'warning', 'error', 'off'],
10+
defaultsTo: 'off',
11+
)
1012
..addCommand(YoutubeAuthorizeCommand())
1113
..addCommand(YoutubeBroadcastCommand())
1214
..addCommand(YoutubeChannelsCommand())

example/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ environment:
99
sdk: ">=3.1.0 <4.0.0"
1010

1111
dependencies:
12-
googleapis: ^11.4.0
12+
googleapis: ^14.0.0
1313
googleapis_auth: ^2.0.0
14-
lints: ^2.1.1
15-
yaml: ^3.1.2
14+
lints: ^6.0.0
15+
yaml: ^3.1.3
1616
yt:
1717
path: ../../yt

lib/meta.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ library;
66
import 'dart:convert' show json;
77

88
final pubSpec = json.decode(
9-
'{"description":"Native Dart interface to multiple YouTube REST APIs including the Data API.","homepage":"https://github.com/faithoflifedev/yt","documentation":"null","repository":"https://github.com/faithoflifedev/yt","issueTracker":"null","name":"yt","publish_to":"null","version":"2.2.5+7"}');
9+
'{"description":"Native Dart interface to multiple YouTube REST APIs including the Data and Live Streaming API.","homepage":"https://github.com/faithoflifedev/yt","documentation":"null","repository":"https://github.com/faithoflifedev/yt","issueTracker":"null","name":"yt","publish_to":"null","version":"2.2.6"}',
10+
);

lib/src/broadcast.dart

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,28 @@ class Broadcast extends YouTubeApiHelper {
2222
String? onBehalfOfContentOwnerChannel,
2323
String? pageToken,
2424
}) {
25-
return _rest.list(accept, buildParts(partList, part),
26-
broadcastStatus: broadcastStatus,
27-
broadcastType: broadcastType,
28-
id: id,
29-
maxResults: maxResults,
30-
mine: mine,
31-
onBehalfOfContentOwner: onBehalfOfContentOwner,
32-
onBehalfOfContentOwnerChannel: onBehalfOfContentOwnerChannel,
33-
pageToken: pageToken);
25+
return _rest.list(
26+
accept,
27+
buildParts(partList, part),
28+
broadcastStatus: broadcastStatus,
29+
broadcastType: broadcastType,
30+
id: id,
31+
maxResults: maxResults,
32+
mine: mine,
33+
onBehalfOfContentOwner: onBehalfOfContentOwner,
34+
onBehalfOfContentOwnerChannel: onBehalfOfContentOwnerChannel,
35+
pageToken: pageToken,
36+
);
3437
}
3538

3639
///Creates a broadcast.
37-
Future<LiveBroadcastItem> insert(
38-
{required Map<String, dynamic> body,
39-
String part = 'snippet,status,contentDetails',
40-
List<String> partList = const [],
41-
String? onBehalfOfContentOwner,
42-
String? onBehalfOfContentOwnerChannel}) {
40+
Future<LiveBroadcastItem> insert({
41+
required Map<String, dynamic> body,
42+
String part = 'snippet,status,contentDetails',
43+
List<String> partList = const [],
44+
String? onBehalfOfContentOwner,
45+
String? onBehalfOfContentOwnerChannel,
46+
}) {
4347
return _rest.insert(
4448
// _authHeader,
4549
accept,
@@ -52,12 +56,13 @@ class Broadcast extends YouTubeApiHelper {
5256
}
5357

5458
///Updates a broadcast. For example, you could modify the broadcast settings defined in the [LiveBroadcastItem] resource's [LiveBroadcastItem.contentDetails] object.
55-
Future<LiveBroadcastItem> update(
56-
{required Map<String, dynamic> body,
57-
String part = 'snippet,status,contentDetails',
58-
List<String> partList = const [],
59-
String? onBehalfOfContentOwner,
60-
String? onBehalfOfContentOwnerChannel}) {
59+
Future<LiveBroadcastItem> update({
60+
required Map<String, dynamic> body,
61+
String part = 'snippet,status,contentDetails',
62+
List<String> partList = const [],
63+
String? onBehalfOfContentOwner,
64+
String? onBehalfOfContentOwnerChannel,
65+
}) {
6166
return _rest.update(
6267
// _authHeader,
6368
accept,
@@ -135,13 +140,17 @@ class Broadcast extends YouTubeApiHelper {
135140

136141
LiveBroadcastResponse liveBroadcastResponse;
137142

138-
liveBroadcastResponse =
139-
await list(broadcastStatus: 'upcoming', maxResults: 50);
143+
liveBroadcastResponse = await list(
144+
broadcastStatus: 'upcoming',
145+
maxResults: 50,
146+
);
140147

141148
liveBroadcastList.addAll(liveBroadcastResponse.items);
142149

143-
liveBroadcastResponse =
144-
await list(broadcastStatus: 'active', maxResults: 50);
150+
liveBroadcastResponse = await list(
151+
broadcastStatus: 'active',
152+
maxResults: 50,
153+
);
145154

146155
liveBroadcastList.addAll(liveBroadcastResponse.items);
147156

lib/src/channels.dart

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,24 @@ import 'provider/data/channels.dart';
66
class Channels extends YouTubeApiHelper {
77
final ChannelClient _rest;
88

9-
Channels({
10-
required super.dio,
11-
super.token,
12-
super.apiKey,
13-
}) : _rest = ChannelClient(dio);
9+
Channels({required super.dio, super.token, super.apiKey})
10+
: _rest = ChannelClient(dio);
1411

1512
/// Returns a collection of zero or more channel resources that match the request criteria.
16-
Future<ChannelResponse> list(
17-
{String part =
18-
'contentDetails,id,localizations,snippet,status,brandingSettings',
19-
List<String> partList = const [],
20-
String? categoryId,
21-
String? forUsername,
22-
String? id,
23-
bool? managedByMe,
24-
bool? mine,
25-
String? hl,
26-
int? maxResults,
27-
String? onBehalfOfContentOwner,
28-
String? pageToken}) async {
13+
Future<ChannelResponse> list({
14+
String part =
15+
'contentDetails,id,localizations,snippet,status,brandingSettings',
16+
List<String> partList = const [],
17+
String? categoryId,
18+
String? forUsername,
19+
String? id,
20+
bool? managedByMe,
21+
bool? mine,
22+
String? hl,
23+
int? maxResults,
24+
String? onBehalfOfContentOwner,
25+
String? pageToken,
26+
}) async {
2927
return _rest.list(
3028
apiKey,
3129
accept,
@@ -43,12 +41,17 @@ class Channels extends YouTubeApiHelper {
4341
}
4442

4543
/// Modifies a Channels For example, you could change a Channels title, description, or privacy status.
46-
Future<ChannelItem> update(
47-
{String part = 'contentDetails,id,localizations,player,snippet,status',
48-
List<String> partList = const [],
49-
required Map<String, dynamic> body,
50-
String? onBehalfOfContentOwner}) async {
44+
Future<ChannelItem> update({
45+
String part = 'contentDetails,id,localizations,player,snippet,status',
46+
List<String> partList = const [],
47+
required Map<String, dynamic> body,
48+
String? onBehalfOfContentOwner,
49+
}) async {
5150
return await _rest.update(
52-
accept, contentType, buildParts(partList, part), body);
51+
accept,
52+
contentType,
53+
buildParts(partList, part),
54+
body,
55+
);
5356
}
5457
}

0 commit comments

Comments
 (0)