ittybittyapps / appstoreconnect-cli

An easy to use command-line tool for interacting with the Apple AppStore Connect API
MIT License
172 stars 17 forks source link

Implement ReadProfileCommand, also add filter profile by ID feature to ListProfilesCommand #216

Closed DechengMa closed 3 years ago

DechengMa commented 3 years ago

Closing #211

šŸ“ Summary of Changes

Changes proposed in this pull request:

āš ļø Items of Note

This PR will expose the internal Id to user

šŸ§šŸ—’ Reviewer Notes

šŸ’ Example

ID will be shown in this command:

asc profiles list
+------------+--------------------------------------+---------------------+----------+--------+---------------------+----------------------+----------------------+
| ID         | UUID                                 | Name                | Platform | State  | Type                | Created Date         | Expiration Date      |
+------------+--------------------------------------+---------------------+----------+--------+---------------------+----------------------+----------------------+

The id can be accepted as filter in ListProfilesCommand:

swift run asc profiles list --filter-id <filter-id>

Also implemented ReadProfileCommand

asc profiles read <id> [--download-path <path>]

šŸ”Ø How To Test

swift run asc profiles list 1N2Z3LUSP8 --download-path ./../
swift run asc profiles read 1N2Z3LUSP8 --download-path ../../
orj commented 3 years ago

The issue in question here is actually asking for a seperate command @DechengMa. For consistency we should have a read command as well as a list command. And also for consistency if we want to filter items in the list they should be provided via --filter arguments.

orj commented 3 years ago

@DechengMa This doesn't actually quite do what #211 was asking. That issue was asking for a filter on UUID. Which technically can't be done with the API. But we could do it on the client side. But having looked back at that issue I'm not sure why I was even asking for that feature. I didn't record my motivations well enough.