1.1.12 • Published 5 years ago

restyped-staffjoy-api v1.1.12

Weekly downloads
161
License
MIT
Repository
github
Last release
5 years ago

RESTyped Staffjoy API

Staffjoy API in TypeScript with type checking for URL endpoints and query params. To learn more about the RESTyped specification, check out the official repo.

How to use it

npm install restyped-staffjoy-api

You'll need a client that supports restyped restyped-axios.

Example

import axios from 'restyped-axios'
import { StaffjoyAPI } from 'restyped-staffjoy-api'

const client = axios.create<StaffjoyAPI>({
   baseURL: 'https://api.tryhabitat.com/api',
   auth: {
      username: process.env.STAFFING_SECRET,
      password: '' //just need jwt secret for auth
   }
})

client.request({
  url: '/attendance',
  params: {
     startDate: 2017-12-15,
     endDate: 2017-12-15
  }
}).then((res) => {
  const { shifts, timeclocks, user_id } = res.data.data[0]
})
1.1.15

5 years ago

1.1.14

5 years ago

1.1.13

5 years ago

1.1.12

5 years ago

1.1.11

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago