Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add edit id for commands #13

Merged
merged 3 commits into from Jun 4, 2020
Merged

Add edit id for commands #13

merged 3 commits into from Jun 4, 2020

Conversation

Vacxe
Copy link
Owner

@Vacxe Vacxe commented Jun 2, 2020

Purpose:
For example we want to upload APK to internal testing channel. We should do it in the same transaction (edit id). Unfortunately we can't upload it to any channel without this chain. Also any transaction should be committed.

edit create --config service_account.json --package-name com.any.package
apk upload --config service_account.json --package-name com.any.package --edit-id <my-transaction-id> --apk app-release.apk
tracks update --config service_account.json --package-name com.any.package --edit-id <my-transaction-id> --track "internal" --apk-version-code <my-version-code>
edit validate --config service_account.json --package-name com.any.package --edit-id <my-transaction-id>
edit commit --config service_account.json --package-name com.any.package --edit-id <my-transaction-id>

val language: String by option("--language", "-l", help = "The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Latin American Spanish, pass \"es-419\".").required()

override fun run(api: PlayStoreApi) = api.listingsGet(ListingsGetModel(packageName, language))
override fun run(api: PlayStoreApi) = api.listingsList(EditModel(packageName, editId))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

language variable is not used, is it intentional?

class DeleteAll : EditCommand(name = "deleteAll", actionDescription = "Deletes all localized listings from an edit") {
val language: String by option("--language", "-l", help = "The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Latin American Spanish, pass \"es-419\".").required()

override fun run(api: PlayStoreApi) = api.listingsDeleteAll(EditModel(packageName, editId))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

language variable is not used, is it intentional?


val track = Track().setReleases(listOf(release))

return edits.tracks().update(model.packageName, model.editId, model.track, track).execute()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this have the same logic as others model.editId ?: edits.insert(model.packageName, null).execute()? as I see TracksUpdateModel#editId is nullable

@Vacxe
Copy link
Owner Author

Vacxe commented Jun 2, 2020

@aafanasev thanks for the review

@Vacxe Vacxe merged commit b880c58 into master Jun 4, 2020
@Vacxe Vacxe deleted the commit-changes branch June 4, 2020 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants