A simple command line interface (CLI) utility to fetch and display the recent activities of a GitHub user using GitHub API.
- Version:
- 1.0.0
- Source:
Members
(inner) authToken :string
Authorization token required in test mode.
Type:
- string
- Source:
(inner, constant) testMode :boolean
Run the program in test mode.
Type:
- boolean
- Source:
Methods
(inner) Main()
The application entry point function
- Source:
(inner) logRequestHeaders(res)
Log request headers to stderr.
Parameters:
Name | Type | Description |
---|---|---|
res |
object | The response object. |
- Source:
(inner) logResponse(res)
Log response headers and body to stderr.
Parameters:
Name | Type | Description |
---|---|---|
res |
object | The response object. |
- Source:
(inner) output(githubUserEvents)
Display output in terminal.
Parameters:
Name | Type | Description |
---|---|---|
githubUserEvents |
Array | Output GitHub user events. |
- Source:
(async, inner) processCmd(test)
Command processer function.
Parameters:
Name | Type | Description |
---|---|---|
test |
string | Test descriptor. |
- Source:
(inner) requestAPI(endpoint, etag) → {Promise}
Call to GitHub Rest API.
Parameters:
Name | Type | Description |
---|---|---|
endpoint |
string | GitHub endpoint url. |
etag |
string | Etag header used to make conditional request. |
- Source:
Returns:
Promise object that will fulfill upon processing the request.
- Type
- Promise