Skip to content

Commit 2f8f10f

Browse files
committed
Generated from OpenAPI
1 parent d95f511 commit 2f8f10f

4 files changed

Lines changed: 39 additions & 3 deletions

File tree

samples/TagsBaseSample.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ tagsbase:
2323
.data("field", "value")
2424
.option("pretty", true)
2525
.execute();
26+
deleteTag: >-
27+
import com.asana.Client;
28+
29+
30+
Client client = Client.accessToken("PERSONAL_ACCESS_TOKEN");
31+
32+
33+
JsonElement result = client.tags.deleteTag(tagGid)
34+
.option("pretty", true)
35+
.execute();
2636
getTag: >-
2737
import com.asana.Client;
2838

src/main/java/com/asana/resources/gen/ProjectsBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public CollectionRequest<Project> getProjectsForWorkspace(String workspaceGid, B
328328
}
329329
/**
330330
* Get task count of a project
331-
* 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.
331+
* 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.
332332
* @param projectGid Globally unique identifier for the project. (required)
333333
* @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)
334334
* @param limit Results per page. The number of objects to return per page. The value must be between 1 and 100. (optional)

src/main/java/com/asana/resources/gen/TagsBase.java

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,32 @@ public ItemRequest<Tag> createTagForWorkspace(String workspaceGid) throws IOExce
6262
return createTagForWorkspace(workspaceGid, null, false);
6363
}
6464
/**
65+
* Delete a tag
66+
* A specific, existing tag can be deleted by making a DELETE request on the URL for that tag. Returns an empty data record.
67+
* @param tagGid Globally unique identifier for the tag. (required)
68+
* @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)
69+
* @param limit Results per page. The number of objects to return per page. The value must be between 1 and 100. (optional)
70+
* @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)
71+
* @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)
72+
* @return ItemRequest(JsonElement)
73+
* @throws IOException If we fail to call the API, e.g. server error or cannot deserialize the response body
74+
*/
75+
public ItemRequest<JsonElement> deleteTag(String tagGid, String offset, Integer limit, List<String> optFields, Boolean optPretty) throws IOException {
76+
String path = "/tags/{tag_gid}".replace("{tag_gid}", tagGid);
77+
78+
ItemRequest<JsonElement> req = new ItemRequest<JsonElement>(this, JsonElement.class, path, "DELETE")
79+
.query("opt_pretty", optPretty)
80+
.query("opt_fields", optFields)
81+
.query("limit", limit)
82+
.query("offset", offset);
83+
84+
return req;
85+
}
86+
87+
public ItemRequest<JsonElement> deleteTag(String tagGid) throws IOException {
88+
return deleteTag(tagGid, null, (int)Client.DEFAULTS.get("page_size"), null, false);
89+
}
90+
/**
6591
* Get a tag
6692
* Returns the complete tag record for a single tag.
6793
* @param tagGid Globally unique identifier for the tag. (required)
@@ -168,7 +194,7 @@ public CollectionRequest<Tag> getTagsForWorkspace(String workspaceGid) throws IO
168194
}
169195
/**
170196
* Update a tag
171-
* 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.
197+
* 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.
172198
* @param tagGid Globally unique identifier for the tag. (required)
173199
* @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)
174200
* @param limit Results per page. The number of objects to return per page. The value must be between 1 and 100. (optional)

src/main/java/com/asana/resources/gen/TasksBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ public ItemRequest<Task> getTask(String taskGid) throws IOException {
317317
}
318318
/**
319319
* Get multiple tasks
320-
* 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).
320+
* 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).
321321
* @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)
322322
* @param completedSince Only return tasks that are either incomplete or that have been completed since this time. (optional)
323323
* @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)

0 commit comments

Comments
 (0)