Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
Added pattern support tonumbers:list (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexLakatos committed Jun 13, 2017
1 parent da9b3f2 commit 67b97b9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).

## [0.3.9][]

* Added `numbers:list` and `nl` with search support using the `pattern` flag

## [0.3.8][]

* Adding search support to `number:list` using the `pattern` flag
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ Alias: `nexmo pc`

- `--size` the amount of results to return
- `--page` the page of results to return
- `--pattern <pattern>` to be matched in number (use * to match end or start of number)

```
> nexmo numbers:list
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nexmo-cli",
"version": "0.3.8",
"version": "0.3.9",
"description": "Nexmo Command Line Interface",
"main": "lib/request.js",
"scripts": {
Expand Down
10 changes: 10 additions & 0 deletions src/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,17 @@ commander
.description('List of numbers assigned to the account')
.option('--page <page>', 'the page of results to return', /^\d*$/i, 1)
.option('--size <size>', 'the amount of results to return', /^\d*$/i, 100)
.option('--pattern <pattern>', 'to be matched in number (use * to match end or start of number)')
.alias('nl')
.on('--help', () => {
emitter.log(' Examples:');
emitter.log(' ');
emitter.log(' $ nexmo numbers:list --page 2');
emitter.log(' $ nexmo numbers:list --page 2 --size 20');
emitter.log(' $ nexmo numbers:list --pattern 445*');
emitter.log(' $ nexmo numbers:list --pattern *445');
emitter.log(' ');
})
.action(request.numbersList.bind(request));

commander
Expand Down

0 comments on commit 67b97b9

Please sign in to comment.