@brandboostinggmbh/awork-sdk

1.0.16 • Public • Published

Awork SDK

An (almost) complete JavaScript API wrapper for project management software Awork. The goal of this project is to provide a comprehensive set of tools to interact with the Awork REST API when working with JavaScript. This library can be imported as a CommonJS or ES module and supports autocompletion via .d.ts files.

Please be aware: Awork is a product of awork GmbH. This project is maintained by Brand Boosting GmbH and is not endorsed by awork GmbH in any way.

Resources:

Found a bug?

This library is quite new and there may be bugs. Please open an issue if you think you encountered a bug.

ToDos

We are trying to maintain this project as actively as possible. Please open an issue if you have a specific feature request.

  • [ ] Documenting the OAuthClient and OAuthServer Class
  • [ ] EasyOAuth Service for serverless applications
  • [ ] Migrate to TypeScript
  • [ ] Write actually useful tests
  • [ ] Write Reference Home Page

Installation:

$ npm i @brandboostinggmbh/awork-sdk
import { Awork } from '@brandboostinggmbh/awork-sdk/dist'
const awork = new Awork({ apiKey: YOUR_API_KEY })

Usage:

Most endpoints include the CRUD operations (get, list, create, update and delete). Sometimes there are additional business operations. (setArchived, removeProjectMember, addTags) Nested endpoints can be chained. (eg. awork.projects.files(YOUR_PROJECT_ID).list())

Get a specific project
await awork.projects.get( YOUR_PROJECT_ID )
Get a list of teams
await awork.teams.list()
Create a new user
await awork.users.create({
        firstName: 'John', 
        lastName: 'Smith',
        birthDate: '2021-09-21T08:30:26.7764709+00:00',
        gender: 'Male',
        title: 'Dr.',
        position: 'Manager',
        language: 'de-DE',
        capacityPerWeek: null,
        accountId: null
})
Update a specific task
await awork.tasks.update(YOUR_TASK_ID, {
    plannedDuration: 3600,
    remainingDuration: 1800,
    name: 'Fly me to the Moon',
    description: 'I want to be up there.',
    isPrio: false,
    startOn: null,
    dueOn: '2021-10-23T14:16:29.3420729Z',
    laneOrder: 0
})
Delete a company
await awork.companies.delete('ff11b111-11b1-1111-ab1111b11b11')
Add tag to specific task
await awork.tasks.tags(taskId).addTags([
    {
        name: 'CI/CD',
        color: 'blue'
    }
])
Create TaskList inside specific project
await awork.projects.taskLists(YOUR_PROJECT_ID).create({
    name: 'Moon Flight Preperations',
    order: 0
})
Pagination and filtering
await awork.projects.taskLists(YOUR_PROJECT_ID).list(
    {
        page: 2,
        pageSize: 20,
        filterBy: "Name eq 'Moon Flight Preperations'"
    }
)

Acknowledgements

Thanks to Nils Czernig at Awork for providing us with an unlimited demo workspace.

Readme

Keywords

none

Package Sidebar

Install

npm i @brandboostinggmbh/awork-sdk

Weekly Downloads

21

Version

1.0.16

License

MIT

Unpacked Size

6.22 MB

Total Files

591

Last publish

Collaborators

  • michaelbitzer
  • cojohnny
  • kevinsieger
  • chiarapurger