Nexmo / nexmo-cli

Nexmo CLI (Command Line Interface)
https://nexmo.com
MIT License
78 stars 52 forks source link

Simplify number:buy and alias numbers:buy #89

Closed leggetter closed 8 years ago

leggetter commented 8 years ago

This change makes it easier to buy a number quickly and also simplifies the underlying numberBuy code.

Usage is now:

number:buy [number_pattern]

If number_pattern is a full number that number will be purchased.

If it’s not a full number and a --country_id option is set then a search is performed using number_pattern as the pattern.

number:buy 5 --country_id GB

Or, just by the first number for a country:

number:buy --country_id US

numbers:buy (plural) has been removed. It threw an exception anyway.

cbetta commented 8 years ago

Love it! Much better syntax.

I'd keep numbers:buy though. We've taken the effort for most commands to accept singular and plural to help fight typos

leggetter commented 8 years ago

I'd keep numbers:buy though.

Fixed in https://github.com/Nexmo/nexmo-cli/pull/89/commits/5d1de0a1bbcd01176ab95ded9ee9802273e5767b