Git Product home page Git Product logo

clickup-php-forked's Introduction

clickup-php

A simple wrapper for ClickUp API (v1-BETA).

Install

composer require "howyi/clickup-php"

Usage

Generate client

// create Client (required: API_TOKEN)
$client = new ClickUp\Client('API_TOKEN');

get

// me
$client->user();
// -> \ClickUp\Objects\User


// all affiliated teams
$client->teams()->objects();
// -> \ClickUp\Objects\Team[]

// team by team id
$team = $client->team($teamId);
// team by name
$team = $client->teams()->getByName('team_name');
// -> \ClickUp\Objects\Team


// spaces in team
$team->spaces()->objects();
// -> \ClickUp\Objects\Space[]

// space by space id
$space = $team->space(888);
// space by name
$space = $team->spaces()->getByName('spaaaaace');
// -> \ClickUp\Objects\Space


// projects in space
$space->projects()->objects();
// -> \ClickUp\Objects\Project[]

// project by project id
$project = $space->project(11111);
// project by name
$project = $space->projects()->getByName('super cool project');
// -> \ClickUp\Objects\Project

// lists in project
$project->taskLists()->objects();
// -> \ClickUp\Objects\TaskList[]

// list by list id
$taskList = $project->taskList(9999);
// list by name
$taskList = $project->taskLists()->getByName('T A S K L I S T');
// -> \ClickUp\Objects\TaskList

// tasks by list
$tasks = $taskList->tasks()->objects();
// -> \ClickUp\Objects\Task[]

// task by task id
$task = $taskList->task(3333);
// -> \ClickUp\Objects\Task

create

/**
 * create task list in project
 * @see https://jsapi.apiary.io/apis/clickup/reference/0/list/create-list.html
 */
$project->createTaskList(['name' => 'newTaskList']);

/**
 * create task in list
 * @see https://jsapi.apiary.io/apis/clickup/reference/0/task/create-task-in-list?console=1.html
 */
$taskList->createTask(['name' => 'my second task']);

update

/**
 * update task list
 * @see https://jsapi.apiary.io/apis/clickup/reference/0/list/edit-list.html
 */
$taskList->edit(['name' => 'renamed task list']);

/**
 * update task
 * @see https://jsapi.apiary.io/apis/clickup/reference/0/task/edit-task.html
 */
$task->edit(['name' => 'renamed task']);

clickup-php-forked's People

Contributors

johnwedgbury avatar dependabot-preview[bot] avatar

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.