refactor(code_push_protocol): rename url to upload_url (#585)
This commit is contained in:
+2
-2
@@ -14,7 +14,7 @@ class CreatePatchArtifactResponse {
|
||||
required this.platform,
|
||||
required this.hash,
|
||||
required this.size,
|
||||
required this.url,
|
||||
required this.uploadUrl,
|
||||
});
|
||||
|
||||
/// Converts a Map<String, dynamic> to a [CreatePatchArtifactResponse]
|
||||
@@ -38,7 +38,7 @@ class CreatePatchArtifactResponse {
|
||||
final int size;
|
||||
|
||||
/// The upload URL for the artifact.
|
||||
final String url;
|
||||
final String uploadUrl;
|
||||
|
||||
static int _parseStringToInt(dynamic value) => int.parse(value as String);
|
||||
|
||||
|
||||
+3
-2
@@ -20,10 +20,11 @@ CreatePatchArtifactResponse _$CreatePatchArtifactResponseFromJson(
|
||||
hash: $checkedConvert('hash', (v) => v as String),
|
||||
size: $checkedConvert(
|
||||
'size', (v) => CreatePatchArtifactResponse._parseStringToInt(v)),
|
||||
url: $checkedConvert('url', (v) => v as String),
|
||||
uploadUrl: $checkedConvert('upload_url', (v) => v as String),
|
||||
);
|
||||
return val;
|
||||
},
|
||||
fieldKeyMap: const {'uploadUrl': 'upload_url'},
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CreatePatchArtifactResponseToJson(
|
||||
@@ -33,5 +34,5 @@ Map<String, dynamic> _$CreatePatchArtifactResponseToJson(
|
||||
'platform': instance.platform,
|
||||
'hash': instance.hash,
|
||||
'size': CreatePatchArtifactResponse._parseIntToString(instance.size),
|
||||
'url': instance.url,
|
||||
'upload_url': instance.uploadUrl,
|
||||
};
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ class CreateReleaseArtifactResponse {
|
||||
required this.platform,
|
||||
required this.hash,
|
||||
required this.size,
|
||||
required this.url,
|
||||
required this.uploadUrl,
|
||||
});
|
||||
|
||||
/// Converts a Map<String, dynamic> to a [CreateReleaseArtifactResponse]
|
||||
@@ -38,7 +38,7 @@ class CreateReleaseArtifactResponse {
|
||||
final int size;
|
||||
|
||||
/// The upload URL for the artifact.
|
||||
final String url;
|
||||
final String uploadUrl;
|
||||
|
||||
static int _parseStringToInt(dynamic value) => int.parse(value as String);
|
||||
|
||||
|
||||
+3
-2
@@ -20,10 +20,11 @@ CreateReleaseArtifactResponse _$CreateReleaseArtifactResponseFromJson(
|
||||
hash: $checkedConvert('hash', (v) => v as String),
|
||||
size: $checkedConvert('size',
|
||||
(v) => CreateReleaseArtifactResponse._parseStringToInt(v)),
|
||||
url: $checkedConvert('url', (v) => v as String),
|
||||
uploadUrl: $checkedConvert('upload_url', (v) => v as String),
|
||||
);
|
||||
return val;
|
||||
},
|
||||
fieldKeyMap: const {'uploadUrl': 'upload_url'},
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CreateReleaseArtifactResponseToJson(
|
||||
@@ -33,5 +34,5 @@ Map<String, dynamic> _$CreateReleaseArtifactResponseToJson(
|
||||
'platform': instance.platform,
|
||||
'hash': instance.hash,
|
||||
'size': CreateReleaseArtifactResponse._parseIntToString(instance.size),
|
||||
'url': instance.url,
|
||||
'upload_url': instance.uploadUrl,
|
||||
};
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ void main() {
|
||||
platform: 'android',
|
||||
hash: '1234',
|
||||
size: 9876,
|
||||
url: 'https://example.com',
|
||||
uploadUrl: 'https://example.com',
|
||||
);
|
||||
expect(
|
||||
CreatePatchArtifactResponse.fromJson(request.toJson()).toJson(),
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ void main() {
|
||||
platform: 'android',
|
||||
hash: '1234',
|
||||
size: 9876,
|
||||
url: 'https://example.com',
|
||||
uploadUrl: 'https://example.com',
|
||||
);
|
||||
expect(
|
||||
CreateReleaseArtifactResponse.fromJson(response.toJson()).toJson(),
|
||||
|
||||
Reference in New Issue
Block a user