0.2.0 • Published 11 months ago

@rezkit/tour-manager v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

RezKit Tour Manager Client (JS)

Idiomatic TypeScript/JavaScript client to interact with the RezKit tour manager API.

Installation

npm

npm add @rezkit/tours

yarn

yarn add @rezkit/tours

Usage

Configure Credentials

API credentials can be provided either as a string of static credentials. Credentials can also be provided dynamically via a callback function which takes the request as a parameter.

Example: Use dynamic environment variables for API key

import {CredentialProvider} from "@rezkit/tours";
import {AxiosRequestConfig} from "axios";
import TourManager from "@rezkit/tours";

// envProvider creates a function that returns the credentials from the specified env var
function envProvider(envKey: string): CredentialProvider {
    return async function (req: AxiosRequestConfig): Promise<string> {
        return process.env[envKey]
    }
}

const client = new TourManager({ api_key: envProvider('RK_API_KEY') })
0.4.0-beta.3

11 months ago

0.4.0-beta.4

11 months ago

0.4.0-beta.5

11 months ago

0.3.0-beta.2

1 year ago

0.3.0-beta.3

1 year ago

0.3.0-beta.1

1 year ago

0.3.0-beta.6

1 year ago

0.3.0-beta.7

1 year ago

0.3.0-beta.4

1 year ago

0.3.0-beta.5

1 year ago

0.4.0-beta.1

1 year ago

0.4.0-beta.2

1 year ago

0.2.0

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago