1 | # @36node/fastman
|
2 |
|
3 | [![version][0]][1] [![downloads][2]][3]
|
4 |
|
5 | ## Install
|
6 |
|
7 | ```bash
|
8 | yarn global add @36node/fastman
|
9 | ```
|
10 |
|
11 | ## Usage
|
12 |
|
13 | ### 1. config api key
|
14 |
|
15 | ```sh
|
16 | $ fastman -h
|
17 | Usage: cli [options] [command]
|
18 |
|
19 | Options:
|
20 | -V, --version output the version number
|
21 | -h, --help output usage information
|
22 |
|
23 | Commands:
|
24 | config [options] config fastman, like postman api key eg..
|
25 | ls list collections exist in postman
|
26 | import [file] import a collection file to postman
|
27 | export [name] [dist] export collection file with name, saved in dist
|
28 | ```
|
29 |
|
30 | ### 1. Config postman apiKey
|
31 |
|
32 | You can get your key from the [integrations dashboard](https://go.postman.co/integrations/services/pm_pro_api)
|
33 |
|
34 | ```sh
|
35 | fastman config -a <your-api-key>
|
36 | ```
|
37 |
|
38 | ### 2. ls collections of postman
|
39 |
|
40 | ```sh
|
41 | # list collections in postman, display id and name
|
42 | $ fastman ls
|
43 | 190e1e16-7e25-4be8-97e1-2f012f941ce4 collection1
|
44 | 1f768e27-5f39-4a5f-8ce8-7a028e504fcf collection2
|
45 | 2923edc5-f23c-47f9-b5d4-4657676681d2 collection3
|
46 | ```
|
47 |
|
48 | ### 3. export collection of postman to collection file
|
49 |
|
50 | ```sh
|
51 | # specify dist
|
52 | $ fastman export collection1 ./try_collection.json
|
53 |
|
54 | # empty dist, auto saved in <name>.postman_collection.json
|
55 | $ fastman export collection1
|
56 | ```
|
57 |
|
58 | ### 4. import collection by collection file
|
59 |
|
60 | ```sh
|
61 | # if collection name existed in postman, update it, or else create new collection.
|
62 | $ fastman import ./.try_collection.json
|
63 | ```
|
64 |
|
65 | ## Contributing
|
66 |
|
67 | 1. Fork it!
|
68 | 2. Create your feature branch: `git checkout -b my-new-feature`
|
69 | 3. Commit your changes: `git commit -am 'Add some feature'`
|
70 | 4. Push to the branch: `git push origin my-new-feature`
|
71 | 5. Submit a pull request :D
|
72 |
|
73 | ## Author
|
74 |
|
75 | **fastman** © [36node](https://github.com/36node), Released under the [MIT](./LICENSE) License.
|
76 |
|
77 | Authored and maintained by 36node with help from contributors ([list](https://github.com/36node/template-cli/contributors)).
|
78 |
|
79 | > [github.com/zzswang](https://github.com/zzswang) · GitHub [@36node](https://github.com/36node)
|
80 |
|
81 | [0]: https://img.shields.io/npm/v/@36node/fastman.svg?style=flat
|
82 | [1]: https://npmjs.com/package/@36node/fastman
|
83 | [2]: https://img.shields.io/npm/dm/@36node/fastman.svg?style=flat
|
84 | [3]: https://npmjs.com/package/@36node/fastman
|