Giter Club home page Giter Club logo

laravel-asana's Introduction

Asana for Laravel

Latest Stable Version Total Downloads


Installation

To get the latest version of Laravel Asana simply require it in your composer.json file.

"torann/laravel-asana": "0.1.*@dev"

You'll then need to run composer install to download it and have the autoloader updated.

Create configuration file using artisan

$ php artisan config:publish torann/laravel-asana

Now add Asana in your providers array app/config/app.php

'Torann\LaravelAsana\ServiceProvider'

Quick Examples

Get a specific user

Asana::getUserInfo($user_id);

Get current user

Will return the user's info of the owner of the API key.

Asana::getCurrentUser();

Get all users in all workspaces

Will return the user's info of the owner of the API key.

Asana::getUsers();

Get task

Asana::getTask($task_id);

Get a task's sub-tasks

Asana::getSubTasks($task_id);

Creating a task

Asana::createTask(array(
   'workspace' => '176825', // Workspace ID
   'name'      => 'Hello World!', // Name of task
   'assignee'  => '[email protected]', // Assign task to...
   'followers' => array('3714136', '5900783') // We add some followers to the task... (this time by ID)
));

Adding task to project

Asana::addProjectToTask($task_id, $project_id);

Remove task from a project

Asana::removeProjectToTask($task_id, $project_id);

Get task stories

Asana::getTaskStories($task_id);

Commenting on a task

Asana::commentOnTask($task_id, "Please please! Don't assign me this task!");

Add a tag to a task

Asana::addTagToTask($task_id, $tag_id);

Remove a tag from a task

Asana::removeTagFromTask($task_id, $tag_id);

Create a project

Asana::createProject(array(
    "workspace" => "1768",
    "name"      => "Foo Project!",
    "notes"     => "This is a test project"
));

Getting projects in all workspaces

Asana::getProjects();

Get projects in a workspace

$archived = false;

Asana::getProjectsInWorkspace($workspace_id, $archived);

Updating project info

Asana::updateProject($project_id, array(
    'name' => 'This is a new cool project!',
    'notes' => 'At first, it wasn't cool, but after this name change, it is!'
));

Get project tasks

Asana::getProjectTasks($project_id);

Get project stories

Asana::getProjectStories($project_id);

Get a specific story

Asana::getSingleStory($story_id);

Comment on a project

$text = "Such fun!";

Asana::commentOnProject($project_id, $text)

Get a specific tag

Asana::getTag($tag_id);

Get tags

Asana::getTags();

Update tag

// $data - array - An array containing fields to update, see Asana API if needed.

Asana::updateTag($tag_id, $data);

Get tasks with tag

Asana::getTasksWithTag($tag_id);

Get workspaces

Asana::getWorkspaces();

Update workspace

$data = array('name' => '');

Asana::updateWorkspace($workspace_i, $data);

Get workspace tasks

// Assignee can either be 'me' or a user's ID

Asana::getWorkspaceTasks($workspace_id, $assignee);

Get workspace tags

Asana::getWorkspaceTags($workspace_id);

Get workspace users

Asana::getWorkspaceUsers($workspace_id);

Filtering

If you specify an assignee, you must also specify a workspace to filter on.

Asana::getTasksByFilter(array(
    'assignee'  => 1121,
    'project'   => 37373729,
    'workspace' => 111221
));

laravel-asana's People

Contributors

torann avatar anshad avatar

Watchers

James Cloos 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.