Skip to content

Commit

Permalink
Generated from OpenAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
rossgrambo-zz committed Aug 13, 2020
1 parent d95f511 commit 2f8f10f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
10 changes: 10 additions & 0 deletions samples/TagsBaseSample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ tagsbase:
.data("field", "value")
.option("pretty", true)
.execute();
deleteTag: >-
import com.asana.Client;
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
JsonElement result = client.tags.deleteTag(tagGid)
.option("pretty", true)
.execute();
getTag: >-
import com.asana.Client;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/asana/resources/gen/ProjectsBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public CollectionRequest<Project> getProjectsForWorkspace(String workspaceGid, B
}
/**
* Get task count of a project
* Get an object that holds task count fields. **All fields are excluded by default**. You must [opt in](#input-output-options) using &#x60;opt_fields&#x60; to get any information from this endpoint. This endpoint has an additional [rate limit](#standard-rate-limits) and each field counts especially high against our [cost limits](#cost-limits). Milestones are just tasks, so they are included in the &#x60;num_tasks&#x60;, &#x60;num_incomplete_tasks&#x60;, and &#x60;num_completed_tasks&#x60; counts.
* Get an object that holds task count fields. **All fields are excluded by default**. You must [opt in](/docs/input-output-options) using &#x60;opt_fields&#x60; to get any information from this endpoint. This endpoint has an additional [rate limit](/docs/standard-rate-limits) and each field counts especially high against our [cost limits](/docs/cost-limits). Milestones are just tasks, so they are included in the &#x60;num_tasks&#x60;, &#x60;num_incomplete_tasks&#x60;, and &#x60;num_completed_tasks&#x60; counts.
* @param projectGid Globally unique identifier for the project. (required)
* @param offset Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. &#x27;Note: You can only pass in an offset that was returned to you via a previously paginated request.&#x27; (optional)
* @param limit Results per page. The number of objects to return per page. The value must be between 1 and 100. (optional)
Expand Down
28 changes: 27 additions & 1 deletion src/main/java/com/asana/resources/gen/TagsBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,32 @@ public ItemRequest<Tag> createTagForWorkspace(String workspaceGid) throws IOExce
return createTagForWorkspace(workspaceGid, null, false);
}
/**
* Delete a tag
* A specific, existing tag can be deleted by making a DELETE request on the URL for that tag. Returns an empty data record.
* @param tagGid Globally unique identifier for the tag. (required)
* @param offset Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. &#x27;Note: You can only pass in an offset that was returned to you via a previously paginated request.&#x27; (optional)
* @param limit Results per page. The number of objects to return per page. The value must be between 1 and 100. (optional)
* @param optFields Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. (optional)
* @param optPretty Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. (optional)
* @return ItemRequest(JsonElement)
* @throws IOException If we fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ItemRequest<JsonElement> deleteTag(String tagGid, String offset, Integer limit, List<String> optFields, Boolean optPretty) throws IOException {
String path = "/tags/{tag_gid}".replace("{tag_gid}", tagGid);

ItemRequest<JsonElement> req = new ItemRequest<JsonElement>(this, JsonElement.class, path, "DELETE")
.query("opt_pretty", optPretty)
.query("opt_fields", optFields)
.query("limit", limit)
.query("offset", offset);

return req;
}

public ItemRequest<JsonElement> deleteTag(String tagGid) throws IOException {
return deleteTag(tagGid, null, (int)Client.DEFAULTS.get("page_size"), null, false);
}
/**
* Get a tag
* Returns the complete tag record for a single tag.
* @param tagGid Globally unique identifier for the tag. (required)
Expand Down Expand Up @@ -168,7 +194,7 @@ public CollectionRequest<Tag> getTagsForWorkspace(String workspaceGid) throws IO
}
/**
* Update a tag
* Updates the properties of a tag. Only the fields provided in the &#x60;data&#x60; block will be updated; any unspecified fields will remain unchanged. When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the task. Returns the complete updated tag record.
* Updates the properties of a tag. Only the fields provided in the &#x60;data&#x60; block will be updated; any unspecified fields will remain unchanged. When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the tag. Returns the complete updated tag record.
* @param tagGid Globally unique identifier for the tag. (required)
* @param offset Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. &#x27;Note: You can only pass in an offset that was returned to you via a previously paginated request.&#x27; (optional)
* @param limit Results per page. The number of objects to return per page. The value must be between 1 and 100. (optional)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/asana/resources/gen/TasksBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public ItemRequest<Task> getTask(String taskGid) throws IOException {
}
/**
* Get multiple tasks
* Returns the compact task records for some filtered set of tasks. Use one or more of the parameters provided to filter the tasks returned. You must specify a &#x60;project&#x60; or &#x60;tag&#x60; if you do not specify &#x60;assignee&#x60; and &#x60;workspace&#x60;. For more complex task retrieval, use [workspaces/{workspace_gid}/tasks/search](#search-tasks-in-a-workspace).
* Returns the compact task records for some filtered set of tasks. Use one or more of the parameters provided to filter the tasks returned. You must specify a &#x60;project&#x60; or &#x60;tag&#x60; if you do not specify &#x60;assignee&#x60; and &#x60;workspace&#x60;. For more complex task retrieval, use [workspaces/{workspace_gid}/tasks/search](/docs/search-tasks-in-a-workspace).
* @param modifiedSince Only return tasks that have been modified since the given time. *Note: A task is considered “modified” if any of its properties change, or associations between it and other objects are modified (e.g. a task being added to a project). A task is not considered modified just because another object it is associated with (e.g. a subtask) is modified. Actions that count as modifying the task include assigning, renaming, completing, and adding stories.* (optional)
* @param completedSince Only return tasks that are either incomplete or that have been completed since this time. (optional)
* @param workspace The workspace to filter tasks on. *Note: If you specify &#x60;workspace&#x60;, you must also specify the &#x60;assignee&#x60; to filter on.* (optional)
Expand Down

0 comments on commit 2f8f10f

Please sign in to comment.