Skip to content

Commit 89981dd

Browse files
authored
fix(save): implement save method
* fix(save): ensure module's save method works Add `save` method to baseResourceConveter, which invokes `fileExporter.save`. * docs(readme): update API section Enumerate all sections. * style(manifest): format * docs(readme): fix typo Replace `octokit` reference with `grc`. * fix(save): add save method to module GH-16, GH-17, GH-18
1 parent 7e22c30 commit 89981dd

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ $ npm i --save github-resource-converter
314314
<dt><code>--base-url</code></dt>
315315
<dd><p>The GitHub REST API v3 URL origin, or a GitHub Enterprise URL origin and path-prefix.</p>
316316
<table>
317-
<tbody><tr><th>Default value:</th><td><samp>https://api.github.com</samp></td></tr></tbody>
317+
<tbody><tr><th>Default value:</th><td><code>https://api.github.com</code></td></tr></tbody>
318318
</table>
319319
</dd>
320320
<dt><code>--dest, -d</code></dt>
@@ -418,7 +418,7 @@ $ github-resource-converter --version
418418
419419
## 4. API
420420
421-
> [![beaker][icon-octicon-beaker] Test the `github-resource-converter (grc)` API in your Web browser][runkit-grc-url].
421+
> [![beaker][icon-octicon-beaker] Test the `github-resource-converter (grc)` API in your Web browser ![link-external][icon-octicon-link-external]][runkit-grc-url].
422422
423423
### 4.1. `grc.authenticate({token, type, key}): void`
424424
@@ -427,7 +427,7 @@ $ github-resource-converter --version
427427
> 1. If you can see the information by visiting the site without being logged in, you don't have to be authenticated to retrieve the same information through the API.
428428
> 1. If you want to change data, you have to be authenticated.
429429
>
430-
> octokit/rest.js. (2018). GitHub. Retrieved 21 March 2018, from <https://github.com/octokit/rest.js#authentication>
430+
> octokit/rest.js. (2018). GitHub. Retrieved 21 March 2018, from <https://github.com/octokit/rest.js#authentication> ![link-external][icon-octicon-link-external]
431431
432432
#### 4.1.1. Parameters
433433
@@ -458,11 +458,16 @@ Retrieve all open and closed Issues and Pull Requests from a GitHub project.
458458
/repos/:owner/:repo/pulls
459459
```
460460
461-
> ![info][icon-octicon-info] See
461+
> **![info][icon-octicon-info] `grc.getAll` combines the results of `grc.issues.getForRepo` and `grc.pullRequests.getForRepo` into a single `Array<object>`.**
462+
>
463+
> For more information, see
464+
>
465+
> 1. [`grc.issues.getForRepo`](#43-grcissuesgetforrepoowner-repo-promise) and
466+
> 1. [`grc.pullRequests.getForRepo`](#46-grcpullrequestsgetforrepoowner-repo-promise) below.
462467
463468
### 4.3. `grc.issues.getForRepo({owner, repo}): Promise`
464469
465-
A proxy method for [`octokit.issues.getForRepo` ![link-external][icon-octicon-link-external]](https://octokit.github.io/rest.js/#api-Issues-getForRepo).
470+
Retrieve all open and closed **issues** for a repository with this proxy method for [`octokit.issues.getForRepo` ![link-external][icon-octicon-link-external]](https://octokit.github.io/rest.js/#api-Issues-getForRepo).
466471
467472
![GET][rest-get-img]
468473
@@ -636,8 +641,7 @@ A proxy method for [`octokit.issues.getForRepo` ![link-external][icon-octicon-li
636641
637642
### 4.4. `grc.logger`
638643
639-
A proxy for a [`trentm/node-bunyan` ![link-external][icon-octicon-link-external]][node-bunyan-url] logger instance,
640-
using a `LONG` [`thlorenz/bunyan-format` ![link-external][icon-octicon-link-external]][bunyan-format-url] writeable
644+
A [`trentm/node-bunyan` ![link-external][icon-octicon-link-external]][node-bunyan-url] logger instance that uses the `LONG` [`thlorenz/bunyan-format` ![link-external][icon-octicon-link-external]][bunyan-format-url] writeable
641645
stream for output.
642646
643647
> ![info][icon-octicon-info] **`bunyan.INFO`** is the default log LEVEL.
@@ -947,17 +951,15 @@ Contains default values for `api`, `cli`, and `meta`data.
947951
948952
### 4.6. `grc.pullRequests.getForRepo({owner, repo}): Promise`
949953
950-
Retrieve an array of all open and closed pull requests for a GitHub or GitHub Enterprise repository.
954+
Retrieve an array of all open and closed pull requests for a GitHub or GitHub Enterprise repository with this proxy method for
955+
[`octokit.pullRequests.getAll` ![link-external][icon-octicon-link-external]](https://octokit.github.io/rest.js/#api-PullRequests-getAll).
951956
952957
![GET][rest-get-img]
953958
954959
```http
955960
/repos/:owner/:repo/pulls
956961
```
957962
958-
> ![info][icon-octicon-info] `getForRepo` is a proxy for
959-
> [`octokit.pullRequests.getAll`](https://octokit.github.io/rest.js/#api-PullRequests-getAll).
960-
961963
#### 4.6.1. Parameters
962964
963965
<table>
@@ -1208,7 +1210,7 @@ Export a collection of Issues or Pull Requests to your local filesystem.
12081210
12091211
### 4.8. `grc.toCsv({data=[]}): Promise`
12101212
1211-
Converts (deeply) nested JSON into CSV format.
1213+
Converts (deeply) nested JSON into CSV format, returning a `Promise<string>`.
12121214
12131215
#### 4.8.1. Parameters
12141216

0 commit comments

Comments
 (0)