nuxt-clockify
v0.1.3
Published
My new Nuxt module
Downloads
4
Readme
nuxt-clockify
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
- 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
- Add
nuxt-clockify
to themodules
section ofnuxt.config.ts
export default defineNuxtConfig({
modules: ["nuxt-clockify"],
});
- create
.env
from.env.example
cp .env.example .env
- add your api token to the field
NUXT_CLOCKIFY_API
in the.env
NUXT_CLOCKIFY_API=token
- last thing you need to do is add this in the
nuxt.config.ts
in theruntimeConfig
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();