Created
June 12, 2019 11:07
-
-
Save ShivamGoyal1899/0a5c68997caa5b0956f61c4a6f18f71e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future<BatchCreateMediaItemsResponse> createMediaItem( | |
String uploadToken, String albumId, String description) { | |
// Construct the request with the token, albumId and description. | |
final BatchCreateMediaItemsRequest request = | |
BatchCreateMediaItemsRequest.inAlbum(uploadToken, albumId, description); | |
// Make the API call to create the media item. The response contains a | |
// media item. | |
return client | |
.batchCreateMediaItems(request) | |
.then((BatchCreateMediaItemsResponse response) { | |
// Print and return the response. | |
print(response.newMediaItemResults[0].toJson()); | |
return response; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment