Repository: added updatedAt and license fields
MODIFY
CHANGELOG.md
CHANGELOG.md
+## v5.0.3
+
+- `Repository`: added `updatedAt` and `license` fields.
+
## v5.0.2
- Fixed pollPublicEventsReceivedByUser to use the correct API URL https://github.com/DirectMyFile/github.dart/pull/150

MODIFY
lib/src/common.g.dart
lib/src/common.g.dart
@@ -161,6 +161,12 @@ TeamRepository _$TeamRepositoryFromJson(Map<String, dynamic> json) {
..pushedAt = json['pushed_at'] == null
? null
: DateTime.parse(json['pushed_at'] as String)
+ ..updatedAt = json['updated_at'] == null
+ ? null
+ : DateTime.parse(json['updated_at'] as String)
+ ..license = json['license'] == null
+ ? null
+ : LicenseKind.fromJson(json['license'] as Map<String, dynamic>)
..permissions = json['permissions'] == null
? null
: TeamRepositoryPermissions.fromJson(
@@ -219,7 +225,13 @@ Repository _$RepositoryFromJson(Map<String, dynamic> json) {
: DateTime.parse(json['created_at'] as String)
..pushedAt = json['pushed_at'] == null
? null
- : DateTime.parse(json['pushed_at'] as String);
+ : DateTime.parse(json['pushed_at'] as String)
+ ..updatedAt = json['updated_at'] == null
+ ? null
+ : DateTime.parse(json['updated_at'] as String)
+ ..license = json['license'] == null
+ ? null
+ : LicenseKind.fromJson(json['license'] as Map<String, dynamic>);
}
CloneUrls _$CloneUrlsFromJson(Map<String, dynamic> json) {

MODIFY
lib/src/common/model/repos.dart
lib/src/common/model/repos.dart
@@ -122,6 +122,11 @@ class Repository {
@JsonKey(name: "pushed_at")
DateTime pushedAt;
+ @JsonKey(name: 'updated_at')
+ DateTime updatedAt;
+
+ LicenseKind license;
+
static Repository fromJSON(Map<String, dynamic> input) {
if (input == null) return null;
return _$RepositoryFromJson(input);

MODIFY
pubspec.yaml
pubspec.yaml
name: github
-version: 5.0.2
+version: 5.0.3-dev
author: Kenneth Endfinger <kaendfinger@gmail.com>
description: GitHub API Client Library
homepage: https://github.com/DirectMyFile/github.dart

Repository: added updatedAt and license fields