Skip to content

Vijay-Duke/Groovy-Asana-Api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

Groovy-Asana-Api

INFORMATION
Groovy-Asana-Api is a Api written in Java & Groovy. You can find the .Jar file in dist directory. Groovy-Asana-Api does not have any external dependency. You Can you this Jar with any JVM Languages by adding Groovy-all-1.8.0.jar or higher into build path.



Asana asana = new Asana("API KEY");

Asana has Following Operations

  • Task Operations
  • Project Operations
  • Tag Operations
  • Stories Operations
  • User Operations
  • Workspace Operations

TASK OPERATIONS
Create Task


TaskBuilder createTask = new TaskBuilder.CreateBuilder("Workspace_id")
			.assignee("USER_ID")
                        .name("Test Task")
                        .notes("Test Notesz")
                        .addNewTagsByCommaSeparatedNames("Tag1,Tag2,Tag3")//create Tag on fly
                        .build();
Task task = asana.TaskOperations().createTask(createTask);

Update Task


TaskBuilder taskBuilder = new TaskBuilder.UpdateTaskBuilder("TASK_ID)
					 .updateName(updateName)
					 .build();
task updatedTask = asana.TaskOperations().updateTask(taskBuilder);

Get Task


Task t = asana.TaskOperations().getTaskById("Task_ID");

Delete Task


 asana.TaskOperations().deleteTask(t.getId());

PROJECT OPERATIONS
Create Project


ProjectBuilder projectCreator = new ProjectBuilder.CreateBuilder("WORKSPACE_ID")
						  .name("Just Fluf")
						  .notes("No Stuff")
						  .addFollower("5690619671404")
						  .build();
Project p =asana.ProjectOperations().createProject(projectCreator);

update Project


ProjectBuilder projectUpdater = new ProjectBuilder.UpdateBuilder("PROJECT_ID")
						  .name("Just Fluf Updated")
						  .archived(false)
						  .notes("No Stuff")
						  .addFollower("USER_ID")
						  .build();
asana.ProjectOperations().updateProject(projectUpdater);

delete project


asana.ProjectOperations().deleteProject("PROJECT_ID");

get Project


asana.ProjectOperations().getProjectById("PROJECT_ID");

TAG OPERATIONS
create Tag


TagBuilder tagBuilder = new TagBuilder.CreateBuilder("WORKSPACE_ID")
				      .name("Tag 2")
				      .notes("Noitesz 2")
				      .build();
Tag tag = asana.TagOperations().createTag(tagBuilder);

Update Tag


TagBuilder tagBuilder = new TagBuilder.UpdateBuilder("WORKSPACE_ID")
				.name("updated Tag 2")
				.notes("Noitesz 2")
				.build();
Tag tag = asana.TagOperations().updateTag(tagBuilder);

Get Tag


asana.TagOperations().getTagById("WORKSPACE_ID");

STORIES OPERATIONS
Aviliable Opertions :

  • Get Stories For A Task
  • Get Stories For A Project
  • Get Story By Id
  • Comment On Task
  • Comment On Project

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published