https://github.com/rr0/case
RR0 Case API
https://github.com/rr0/case
Last synced: 3 months ago
JSON representation
RR0 Case API
- Host: GitHub
- URL: https://github.com/rr0/case
- Owner: RR0
- Created: 2025-05-31T08:29:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-14T10:20:11.000Z (about 1 year ago)
- Last Synced: 2025-08-08T21:57:18.176Z (10 months ago)
- Language: JavaScript
- Size: 160 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RR0 Case API
This API allows to fetch case records from a RR0 server.
## Setup
```shell
npm install
```
## Usage
```js
import { RR0Catalog } from "@rr0/case"
const catalog = new RR0Catalog()
await catalog.init()
/** @type RR0Case */
const roswellCase = catalog.casesFiles.find(url => url.includes("/Roswell/"))
const firstCase = await catalog.fetchCase(roswellCase)
assert.equal(firstCase.title, "Roswell")
const mantellPeople = catalog.peopleFiles.find(url => url.includes("/MantellThomas/"))
const firstPeople = await catalog.fetchPeople(mantellPeople)
assert.equal(firstPeople.title, "Mantell, Thomas Francis")
```
## Build
```shell
npm run build
```
## Test
```shell
npm run test
```
## Deployment
Increase the version number in [`package.json`](package.json), then:
```shell
npm publish
```
will build & test then publish a new version of the package.