citeright-sdk-js
Version:
An SDK to connect to the CiteRight API.
39 lines (30 loc) • 1.31 kB
Markdown
CiteRight exposes much of its functionality through a publicly
accessible API. This SDK will help developers use the API to create
applications of their own that use CiteRight user data.
Before you start, please contact our support and get a Client Identifier
for your application.
To install, simply install this NPM package
npm install citeright-sdk-js
To use this package, simply construct a new SDK instance, using the
endpoint and application identifier provided by support.
const sdk = new CiteRightSDK(
"https://api.citeright.net/api",
"yourApplicationClientIdentifier",
);
sdk.login("citeright_user_username", "citeright_user_password")
.then((user: UserDTO) => {
// Do whatever you want!
// Like... get a list of items for the connected user
sdk.getItems("search term").then((items: ItemDTO[]) => {
});
});
- Log in to npmjs.com using local command "npm login"
- Commit changes to remote repository (local copy must be clean to continue)
- type: npm run publish-node-module
## Additional Documentation
To learn more about our API, refer to our API docs, located at
https://api.citeright.net/api-docs/.