Git Product home page Git Product logo

go-clickup's Introduction

go-clickup

Go Reference

This is unofficial Go client library for ClickUp.

Features

  • Create space, folder, list, task and more.
  • Get Space, folder, list, task and more.

This package cover almost ClickUp API. For APIs that are not supported, see Progress.

API doc

https://clickup.com/api

Requirements

  • Go >= 1.21

Installation

It is go gettable

go get github.com/raksul/go-clickup

Example

mkdir my-clickup-app && cd my-clickup-app

cat > go.mod <<-END
  module my-clickup-app

  require github.com/raksul/go-clickup main
END

cat > main.go <<-END
  package main

  import (
	  "context"

	  "github.com/raksul/go-clickup/clickup"
  )

  func main() {
	  client := clickup.NewClient(nil, "api_key")

	  teams, _, _ := client.Teams.GetTeams(context.Background())
	  println(teams[0].Name)

	  for _, member := range teams[0].Members {
		  println(member.User.ID)
		  println(member.User.Username)
	  }
    println(teams[0].ID)

	  spaces, _, _ := client.Spaces.GetSpaces(context.Background(), teams[0].ID, false)
	  println(spaces[0].ID)

	  space, _, _ := client.Spaces.GetSpace(context.Background(), spaces[0].ID)
	  println(space.Name)
  }
END

go mod tidy
go run main.go

Code structure

The code structure of this package was inspired by google/go-github and andygrunwald/go-jira. There is one main part (the client).

Contribution

Bug reports and pull requests are welcome.

Contribution, in any kind of way, is highly welcome! It doesn't matter if you are not able to write code. Creating issues or holding talks and help other people to use go-clickup is contribution, too! A few examples:

  • Correct typos in the README / documentation
  • Reporting bugs
  • Implement a new feature or endpoint
  • Sharing the love of go-clickup and help people to get use to it
  • Writing test code

If you are new to pull requests, checkout Collaborating on projects using issues and pull requests / Creating a pull request.

Progress

  • Rate Limit
  • Error Handling
  • Attachments
    • Create Task Attachment
  • Authorization
    • Get Access Token
    • Get Authorized User
    • Get Authorized Teams
  • Checklists
    • Create Checklist
    • Edit Checklist
    • Delete Checklist
    • Create Checklist Item
    • Edit Checklist Item
    • Delete Checklist Item
  • Comments
    • Create Task Comment
    • Create Chat View Comment
    • Create List Comment
    • Get Task Comment
    • Get Chat View Comment
    • Get List Comment
    • Update Comment
    • Delete Comment
  • Custom Fields
    • Get Accessible Custom Fields
    • Set Custom Field Value
    • Remove Custom Field Value
  • Dependencies
    • Add Dependency
    • Delete Dependency
    • Add Task Link
    • Delete Task Link
  • Folders
    • Create Folder
    • Update Folder
    • Delete Folder
    • Get Folders
    • Get Folder
  • Goals
    • Create Goal
    • Update Goal
    • Delete Goal
    • Get Goals
    • Get Goal
    • Create Key Result
    • Edit Key Result
    • Delete Key Result
  • Guests (only available to enterprise teams)
    • Invite Guest To Workspace
    • Edit Guest On Workspace
    • Remove Guest From Workspace
    • Get Guest
    • Add Guest To Task
    • Remove Guest From Task
    • Add Guest To List
    • Remove Guest From List
    • Add Guest To Folder
    • Remove Guest From Folder
  • Lists
    • Create List
    • Create Folderless List
    • Update List
    • Delete List
    • Get Lists
    • Get Folderless Lists
    • Get List
    • Add Task To List
    • Remove Task From List
  • Members
    • Get Task Members
    • Get List Members
  • Shared Hierarchy
    • Shared Hierarchy
  • Spaces
    • Create Space
    • Update Space
    • Delete Space
    • Get Spaces
    • Get Space
  • Tags
    • Get Space Tags
    • Create Space Tag
    • Edit Space tag
    • Delete Space Tag
    • Add Tag To Task
    • Remove Tag From Task
  • Tasks
    • Create Task
    • Update task
    • Delete Task
    • Get Tasks
    • Get Task
    • Get Filtered Team Tasks
    • Get Task's Time in Status
    • Get Bulk Tasks' Time in Status
  • Task Templates
    • Get Task Templates
    • Create Task From Template
  • Teams
    • Get Teams
    • Get Workspace Seats
    • Get Workspace Plan
  • Time Tracking 2.0
    • Get time entries within a date range
    • Get singular time entry
    • Get time entry history
    • Get running time entry
    • Create a time entry
    • Remove tags from time entries
    • Get all tags from time entries
    • Add tags from time entries
    • Change tag names from time entries
    • Start a time Entry
    • Stop a time Entry
    • Delete a time Entry
    • Update a time Entry
  • Users (only available to enterprise teams)
    • Invite User To Workspace
    • Edit User On Workspace
    • Remove User From Workspace
    • Get User
  • User Groups
    • Get User Group
    • Create User Group
    • Update User Group
    • Delete User Group
  • Views
    • Create Team View
    • Create Space View
    • Create Folder View
    • Create List View
    • Get Team Views
    • Get Space Views
    • Get Folder Views
    • Get List Views
    • Get View
    • Get View Tasks
    • Update View
    • Delete View
  • Webhooks
    • Create Webhook
    • Update Webhook
    • Delete Webhook
    • Get Webhooks
  • Custom Task Types
    • Get Custom Task Types

License

This project is released under the terms of the MIT license.

go-clickup's People

Contributors

a-thug avatar catdevman avatar freehaha avatar heldeen avatar kyuuuuuji avatar mjburtenshaw avatar rek avatar shogath avatar tkowalski29 avatar w-haibara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-clickup's Issues

Task points float value

Clickup provides ability to add custom value points and they can be float, so if you try to get task with float points it will return json unmarshal error
json: cannot unmarshal number 0.5 into Go struct field Task.points of type int

Removing due date

The Clickup API docs say you can remove a field during an update by passing a null. Is there a way to remove the due date using the TaskRequest struct and calling the UpdateTask method. I've tried using 0 for the due date but that has no effect.

Add GetSeats and GetPlan

I am working on a Terraform Provider for ClickUp here and I noticed that GetSeats and GetPlan was missing. So I thought I would add them. Wasn't sure if you required issues for PR so I am making this just to cover my bases.

#46

Adds two new functions on the TeamsService: GetSeats and GetPlan. I tried to follow the best I could with coding style and structure that already exists. Please let me know if you need anything before it can be merged.

JSON Marshalling Issue

Hi,

It looks like in many places the property Orderindex is incorrectly typed as an int examples:

Orderindex int `json:"orderindex"`

Orderindex int `json:"orderindex"`

This leads to errors such as json: cannot unmarshal number 2.5 into Go struct field Item.tasks.checklists.items.orderindex of type int (SQLSTATE HV000) when attempting to obtain data where the orderindex isn't an exact integer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.