0.1.3 • Published 2 years ago

nuxt-clockify v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

nuxt-clockify

npm version npm downloads License

new clockify module for nuxt. NOT PRODUCTION READY! based on clockify-ts (I only use its return types for now)

Features

  • Can get time entries ✅
  • Can get current user ✅

Quick Setup

  1. Add nuxt-clockify dependency to your project
# Using pnpm
pnpm add -D nuxt-clockify

# Using yarn
yarn add --dev nuxt-clockify

# Using npm
npm install --save-dev nuxt-clockify
  1. Add nuxt-clockify to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: ["nuxt-clockify"],
});
  1. create .env from .env.example
cp .env.example .env
  1. add your api token to the field NUXT_CLOCKIFY_API in the .env
NUXT_CLOCKIFY_API=token
  1. last thing you need to do is add this in the nuxt.config.ts in the runtimeConfig
 clockifyApi: "",

That's it! You can now use nuxt-clockify in your Nuxt app ✨

Development

import { useClockify, useClockifyDurationToHours } from "#clockify";
//get clockify class to work with
const clockify = useClockify();

//getting time entries
const timeEntryResponse = await clockify.timeEntries();
0.1.3

2 years ago