Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dgreif/ring-client-example
Example use of the `ring-client-api` npm package
https://github.com/dgreif/ring-client-example
Last synced: 11 days ago
JSON representation
Example use of the `ring-client-api` npm package
- Host: GitHub
- URL: https://github.com/dgreif/ring-client-example
- Owner: dgreif
- Created: 2021-07-17T14:12:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-04T15:27:23.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T03:43:14.506Z (21 days ago)
- Language: TypeScript
- Size: 161 KB
- Stars: 19
- Watchers: 4
- Forks: 18
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ring-client-example
This is an example project that uses the `ring-client-api` npm package to access the Ring API from Node.js. It is intended to show a basic project structure with proper TypeScript configuration.
## Setup
- (Optional) Fork this repository if you want to push changes to your own copy
- Clone the repository to your local environment
- Run `npm i` (assuming you already have [Node.js](https://nodejs.org/) installed)## Authentication
- Run `npm run auth` to start the process. It should prompt you for email/password/token
- You will see a refresh token output like `"refreshToken": "eyJhbGciOi...afa1"`. You need to extract the value from the second part of this output, between the double quotes.
- Create a `.env` file in the root directory of this project and insert the following contents, replacing value with the one you got from the auth command above. _Make sure you don't include the quotes_:```text
RING_REFRESH_TOKEN=eyJhbGciOi...afa1
```## Run the Example
The example can be found in the [example.ts](./example.ts) file. Once you have followed the Authentication steps, you can start it by running `npm start`
## Additional Examples
Additional examples of how to use the `ring-client-api` can be found in