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

Implements #26: Add info command #55

Merged
merged 2 commits into from
Jan 27, 2018
Merged

Implements #26: Add info command #55

merged 2 commits into from
Jan 27, 2018

Conversation

delebedev
Copy link
Contributor

Implements #26

I was a bit sloppy and haven't added all proposed fields, only stuff I've found personally useful:

> mas info 747648890

Telegram 2.27 [Free]
By: TELEGRAM MESSENGER LLP
Released: 11 Oct 2016
Minimum OS: 10.8
Size: 8.7 MB
From: https://itunes.apple.com/us/app/telegram/id747648890?mt=12&uo=4

@rodionovd
Copy link
Contributor

Yay! Will look into this, thanks 🌟

}
}

private struct AppInfoFormatter {
Copy link

Choose a reason for hiding this comment

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

Could you pull this out into a separate swift class? I just made an enhancement request about release notes, and I think I can implement it using this class by adding a formatUpdateNotes function of sorts. Then just throw that into the outdated command.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Aghassi the thing is that I'm still not sure what kind of metadata should be displayed here (e.g. what about an app description, ratings, etc). Maybe it'd be even better to let the user decide what they want. This is basically the only reason why this PR is not merged yet.

Copy link

Choose a reason for hiding this comment

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

In that case, maybe we add a flag? Something like --simple, which would be the default and give some basic stuff (description, rating, size). Then, another flag like --detailed that gives more (author, description, rating, size, minimum OS etc.). Finally, there could be a "custom" flag where the user would have to pass in specific fields? That one seems a tad tedious and not so useful though. Just brainstorming a bit, none of these are right or wrong.

Choose a reason for hiding this comment

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

maybe a config file to explicitly supply a list of metadata you want?

Copy link

Choose a reason for hiding this comment

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

@garnett Any update on this?

Copy link

Choose a reason for hiding this comment

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

My (admittedly unsolicited) two cents:

Default to simple and flag --verbose to show all available fields. I would guess anyone truly needing a custom display could grep the output.

Of course you can do more, but releasing something simple is better than releasing nothing due to indecision!

Copy link
Member

Choose a reason for hiding this comment

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

This is a great discussion, but for now, I've merged this PR as it stands. @Aghassi if you'd still like AppInfoFormatter to be split out can you open a new issue or PR?

@phatblat
Copy link
Member

Thanks @garnett! This is a great addition, so I'm merging it as-is. More fields can be added as necessary.

@phatblat phatblat merged commit a7b3c29 into mas-cli:master Jan 27, 2018
@phatblat phatblat mentioned this pull request Jan 27, 2018
@phatblat phatblat added this to the 1.4 milestone Jan 28, 2018
@phatblat phatblat mentioned this pull request Feb 17, 2018
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.

6 participants