Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@timetac/js-client-library

Package Overview
Dependencies
Maintainers
1
Versions
214
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@timetac/js-client-library

TimeTac API JS client library

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.3K
decreased by-56.66%
Maintainers
1
Weekly downloads
 
Created
Source

TimeTac Client Library

TimeTac Client Library is a thin wrapper for client to make api request.

Installation

Use the package manager yarn or npm to install TimeTac Client Library.

Using yarn:

yarn add @timetac/js-client-library

Using npm:

npm install @timetac/js-client-library

Usage

import Api from "@timetac/js-client-library"
//Only account name is required.
const environment = {
  host: 'go-dev.timetac.com',
  account: <ACCOUNT_NAME>,
  version: '3'
}

const authCredentials = {
  grant_type: 'password',
  client_id: 'WEB_APP',
  client_secret: '',
  username: <USER_NAME>,
  password: <PASSWORD>'
}

const api = new Api(environment);

async() => {
  await api.authentication.login(authCredentials);

  api.timeTrackings.read()
    .then(timetrackings => {
      console.log(timetrackings)
    });

  api.users.getMe().then(meData => {
    console.log(meData);
  });

  api.absenceDays.read(
    new RequestParams<AbsenceDay>()
    .eq('user_id', '1')
    .gteq('date', '2020-01-01')
  );

  api.absenceDay.read({
    user_id: '1',
    date: '2020-01-01',
    _op__date: 'gteq'
  })
}

List of supported endpoints

  • api.oauth
  • api.timeTrackings
  • api.users
  • api.serverCommunication

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Apache License 2.0

Keywords

FAQs

Package last updated on 23 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc