Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Leif Shackelford committed May 31, 2022
0 parents commit 64ded3a
Show file tree
Hide file tree
Showing 21 changed files with 3,067 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.nyc_output
.DS_Store
node_modules
coverage/
/config
/docs
/esm
10 changes: 10 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/.nyc_output
/docker
/meteor
/server
/nexe
/tests
/tests_cache
/test
/coverage
node_modules
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
os:
- linux
- osx
dist: trusty
language: node_js
node_js:
- '14'
- '16'
before_install:
- npm config set progress=false
script: npm run travis
after_script:
- cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
deploy:
provider: npm
on:
branch: main
skip_cleanup: true
email: [email protected]
api_key:
secure: F87ylXrJlP4dXSFTlJoCzK8SxFde5tN9+iRVxemjLAuvso+QM8j4V+7GH4XWKgYdb4POgqqWdPjB0wv04Ke/ItIpGrCx0R0llYhPDjbWbuYaNTYBAv96KAo2biwoJtT4RzG3zPldlO0h891gV+jg8BGDidmk47vNt4Nw5YSPJq9xSM1MQ0mGycmAaell3PwVlO9fDyGv4EHE2Dedb3UWVf/fDpNOAvp8oonnczHJWy9fm30K5JCmeHnLuZNHTymK0iT0a0WQ62uaSVSrHaKZTFXnsYQTtsPkLaZVN/ja/n+1asQh0gNW71P5NKhCjafppuDb0l1EIcHG6AjI+RFKX2ageXZX4k3D0ZsAhAtHJoHugoqBLVzMnJsxzEvHZa88vTuvkxexp3AXWc6kHkUoON95UlPs6s+5DjgKiRhPykrLKQJMCnq3OnOo0Wsb8TfF/g+IkbPrb2PYe+bbhier/pzrkUnIEFXfRyPrCW+JMr1fjN9EK7cyaABagb/4r7aMp+0IUl6kYOIrh/gU8AvjLjVBqz3pr4VXLkRRWY0DSSb1V3BP2akgDTBpIx6sDKiiM4vxLv2urOthi827hGwQeXg4/UrvueZriZCsx/lLPK2lugr1xxZLPaGbz6tt2XuOjbtcAtVfcDc1rih8pVfiLaAQ7CPnCzM+KiGL8MCPPxQ=
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!-- ## fetch [![Build Status](https://travis-ci.org/cannabis-labeling-api/fetch.svg?branch=master)](https://travis-ci.org/cannabis-labeling-api/fetch) [![Coverage Status](https://coveralls.io/repos/github/cannabis-labeling-api/fetch/badge.svg?branch=master)](https://coveralls.io/github/cannabis-labeling-api/fetch?branch=master)
[![NPM](https://nodei.co/npm/@cannabis-labeling-api/fetch.png?downloads=true)](https://nodei.co/npm/cannabis-labeling-api/fetch/) -->

# Introduction
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

Retrieve information from the UAPI from node or (cli)

# More information:

- [Hosted Documentation](https://cannabis-labeling-api.github.io/universal-cannabis-api/)
- [Google Doc](https://docs.google.com/document/d/1KXGiw4Gjb3kKb8SEOZmzRyIonxqCjKSbJpgsifr9uZw)

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="http://chroma.io"><img src="https://avatars.githubusercontent.com/u/4080925?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Leif Shackelford</b></sub></a><br /><a href="https://github.com/Cannabis-Labeling-API/universal-cannabis-api/commits?author=1e1f" title="Code">💻</a></td>
</tr>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!# fetch
19 changes: 19 additions & 0 deletions dist/fetch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import "isomorphic-fetch";
export interface FetchOptions {
uri?: string;
body?: any;
mode?: string;
method?: string;
apiKey?: string;
baseHeaders?: {
[x: string]: string;
};
additionalHeaders?: {
[x: string]: string;
};
}
export declare function getPostHeaders({ baseHeaders, additionalHeaders, }: Partial<FetchOptions>): {
[x: string]: string;
};
export declare const getOptions: (_options: FetchOptions | string) => any;
export declare const uapiFetch: (_options: FetchOptions | string) => Promise<Response>;
86 changes: 86 additions & 0 deletions dist/fetch.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/fetch.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { uapiFetch, FetchOptions, getOptions } from "./fetch";
export { FetchOptions };
export interface WellKnown {
endpoint: string;
'path-components'?: string;
vendor?: string;
example?: {
qr: string;
};
}
export declare const Endpoints: {
case: {
get: string;
post: string;
};
each: {
get: string;
post: string;
};
regulator: {
get: string;
post: string;
};
};
export declare const getQr: (qr: string, route?: string, options?: FetchOptions) => Promise<any>;
export declare const postQr: (qr: string, route?: string, options?: FetchOptions) => Promise<unknown>;
export { postQr as putQr };
export { uapiFetch };
export { getOptions };
export declare const fetchEndpointInfo: (qr: string, apiKey?: string) => Promise<WellKnown>;
153 changes: 153 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 64ded3a

Please sign in to comment.