asana 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8259bc1ff36ac9130adcf4d5a41a8583d5ad9b4a4e41d4be53e697b46e87f3be
|
4
|
+
data.tar.gz: 7e7e59b90d0e98614b4a1468516d8c43a4c2455904497c0d1fac48ea8de97aa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdc004d4cc92e222446e8de1c5cbcdfc4ef7686f925fb25cf2af5633b808b3aebd34d3355b2f63325bd0b080a39c5cb9231b01253d254d82f43f51812f9d5a83
|
7
|
+
data.tar.gz: 69b678a01a954d899cbab22c1e2e52143c925871f5cca14400265cab58ffbd3552c1a9220be3f72ca17ad3c93dc1394d3cf660c17e3b31767c3460e79169ef07
|
data/lib/asana/client.rb
CHANGED
@@ -59,8 +59,8 @@ module Asana
|
|
59
59
|
@resource = resource
|
60
60
|
end
|
61
61
|
|
62
|
-
def method_missing(m, *args, &block)
|
63
|
-
@resource.public_send(m, *([@client] + args), &block)
|
62
|
+
def method_missing(m, *args, **kwargs, &block)
|
63
|
+
@resource.public_send(m, *([@client] + args), **kwargs, &block)
|
64
64
|
end
|
65
65
|
|
66
66
|
def respond_to_missing?(m, *)
|
@@ -87,29 +87,29 @@ module Asana
|
|
87
87
|
# Public: Performs a GET request against an arbitrary Asana URL. Allows for
|
88
88
|
# the user to interact with the API in ways that haven't been
|
89
89
|
# reflected/foreseen in this library.
|
90
|
-
def get(url,
|
91
|
-
@http_client.get(url,
|
90
|
+
def get(url, **args)
|
91
|
+
@http_client.get(url, **args)
|
92
92
|
end
|
93
93
|
|
94
94
|
# Public: Performs a POST request against an arbitrary Asana URL. Allows for
|
95
95
|
# the user to interact with the API in ways that haven't been
|
96
96
|
# reflected/foreseen in this library.
|
97
|
-
def post(url,
|
98
|
-
@http_client.post(url,
|
97
|
+
def post(url, **args)
|
98
|
+
@http_client.post(url, **args)
|
99
99
|
end
|
100
100
|
|
101
101
|
# Public: Performs a PUT request against an arbitrary Asana URL. Allows for
|
102
102
|
# the user to interact with the API in ways that haven't been
|
103
103
|
# reflected/foreseen in this library.
|
104
|
-
def put(url,
|
105
|
-
@http_client.put(url,
|
104
|
+
def put(url, **args)
|
105
|
+
@http_client.put(url, **args)
|
106
106
|
end
|
107
107
|
|
108
108
|
# Public: Performs a DELETE request against an arbitrary Asana URL. Allows
|
109
109
|
# for the user to interact with the API in ways that haven't been
|
110
110
|
# reflected/foreseen in this library.
|
111
|
-
def delete(url,
|
112
|
-
@http_client.delete(url,
|
111
|
+
def delete(url, **args)
|
112
|
+
@http_client.delete(url, **args)
|
113
113
|
end
|
114
114
|
|
115
115
|
# Public: Exposes queries for all top-evel endpoints.
|
@@ -55,15 +55,14 @@ module Asana
|
|
55
55
|
#
|
56
56
|
|
57
57
|
# workspace - [str] The workspace to filter tags on.
|
58
|
-
# archived - [bool] Only return tags whose `archived` field takes on the value of this parameter.
|
59
58
|
# options - [Hash] the request I/O options
|
60
59
|
# > offset - [str] 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. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
|
61
60
|
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
62
61
|
# > opt_fields - [list[str]] 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.
|
63
62
|
# > opt_pretty - [bool] 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.
|
64
|
-
def get_tags(client, workspace: nil,
|
63
|
+
def get_tags(client, workspace: nil, options: {})
|
65
64
|
path = "/tags"
|
66
|
-
params = { workspace: workspace
|
65
|
+
params = { workspace: workspace }.reject { |_,v| v.nil? || Array(v).empty? }
|
67
66
|
Collection.new(parse(client.get(path, params: params, options: options)), type: Tag, client: client)
|
68
67
|
end
|
69
68
|
|
@@ -22,7 +22,7 @@ module Asana
|
|
22
22
|
def add_dependencies_for_task(client, task_gid: required("task_gid"), options: {}, **data)
|
23
23
|
path = "/tasks/{task_gid}/addDependencies"
|
24
24
|
path["{task_gid}"] = task_gid
|
25
|
-
|
25
|
+
parse(client.post(path, body: data, options: options)).first
|
26
26
|
end
|
27
27
|
|
28
28
|
# Set dependents for a task
|
@@ -388,7 +388,7 @@ module Asana
|
|
388
388
|
def search_tasks_for_workspace(client, workspace_gid: required("workspace_gid"), text: nil, resource_subtype: nil, assignee_any: nil, assignee_not: nil, assignee_status: nil, projects_any: nil, projects_not: nil, projects_all: nil, sections_any: nil, sections_not: nil, sections_all: nil, tags_any: nil, tags_not: nil, tags_all: nil, teams_any: nil, followers_any: nil, followers_not: nil, created_by_any: nil, created_by_not: nil, assigned_by_any: nil, assigned_by_not: nil, liked_by_any: nil, liked_by_not: nil, commented_on_by_any: nil, commented_on_by_not: nil, due_on_before: nil, due_on_after: nil, due_on: nil, due_at_before: nil, due_at_after: nil, start_on_before: nil, start_on_after: nil, start_on: nil, created_on_before: nil, created_on_after: nil, created_on: nil, created_at_before: nil, created_at_after: nil, completed_on_before: nil, completed_on_after: nil, completed_on: nil, completed_at_before: nil, completed_at_after: nil, modified_on_before: nil, modified_on_after: nil, modified_on: nil, modified_at_before: nil, modified_at_after: nil, is_blocking: nil, is_blocked: nil, has_attachment: nil, completed: nil, is_subtask: nil, sort_by: nil, sort_ascending: nil, options: {})
|
389
389
|
path = "/workspaces/{workspace_gid}/tasks/search"
|
390
390
|
path["{workspace_gid}"] = workspace_gid
|
391
|
-
params = { text: text, resource_subtype: resource_subtype,
|
391
|
+
params = { text: text, resource_subtype: resource_subtype, "assignee.any": assignee_any, "assignee.not": assignee_not, assignee_status: assignee_status, "projects.any": projects_any, "projects.not": projects_not, "projects.all": projects_all, "sections.any": sections_any, "sections.not": sections_not, "sections.all": sections_all, "tags.any": tags_any, "tags.not": tags_not, "tags.all": tags_all, "teams.any": teams_any, "followers.any": followers_any, "followers.not": followers_not, "created_by.any": created_by_any, "created_by.not": created_by_not, "assigned_by.any": assigned_by_any, "assigned_by.not": assigned_by_not, "liked_by.any": liked_by_any, "liked_by.not": liked_by_not, "commented_on_by.any": commented_on_by_any, "commented_on_by.not": commented_on_by_not, due_on_before: due_on_before, due_on_after: due_on_after, due_on: due_on, due_at_before: due_at_before, due_at_after: due_at_after, start_on_before: start_on_before, start_on_after: start_on_after, start_on: start_on, created_on_before: created_on_before, created_on_after: created_on_after, created_on: created_on, created_at_before: created_at_before, created_at_after: created_at_after, completed_on_before: completed_on_before, completed_on_after: completed_on_after, completed_on: completed_on, completed_at_before: completed_at_before, completed_at_after: completed_at_after, modified_on_before: modified_on_before, modified_on_after: modified_on_after, modified_on: modified_on, modified_at_before: modified_at_before, modified_at_after: modified_at_after, is_blocking: is_blocking, is_blocked: is_blocked, has_attachment: has_attachment, completed: completed, is_subtask: is_subtask, sort_by: sort_by, sort_ascending: sort_ascending }.reject { |_,v| v.nil? || Array(v).empty? }
|
392
392
|
Collection.new(parse(client.get(path, params: params, options: options)), type: Task, client: client)
|
393
393
|
end
|
394
394
|
|
@@ -33,7 +33,7 @@ module Asana
|
|
33
33
|
# options - [Hash] the request I/O options
|
34
34
|
# > opt_fields - [list[str]] 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.
|
35
35
|
# > opt_pretty - [bool] 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.
|
36
|
-
def get_user(client, user_gid: required("user_gid"), options
|
36
|
+
def get_user(client, user_gid: required("user_gid"), **options)
|
37
37
|
path = "/users/{user_gid}"
|
38
38
|
path["{user_gid}"] = user_gid
|
39
39
|
User.new(parse(client.get(path, options: options)).first, client: client)
|
data/lib/asana/version.rb
CHANGED
@@ -28,7 +28,7 @@ module Asana
|
|
28
28
|
def {{operationId}}(client, {{#pathParams}}{{paramName}}: required("{{paramName}}"), {{/pathParams}}{{#queryParams}}{{#neq baseName 'opt_pretty' 'opt_fields' 'offset' 'limit'}}{{paramName}}: nil, {{/neq}}{{/queryParams}}options: {}{{#eq httpMethod 'POST' 'PUT'}}, **data{{/eq}})
|
29
29
|
path = "{{path}}"{{#pathParams}}
|
30
30
|
path["{ {{~baseName~}} }"] = {{paramName}}{{/pathParams}}{{^moreThanCommon queryParams}}
|
31
|
-
params = { {{#queryParams}}{{#neq baseName 'opt_pretty' 'opt_fields' 'offset' 'limit'}}{{#unless @first}}, {{/unless}}{{paramName}}: {{paramName}}{{/neq}}{{/queryParams}} }.reject { |_,v| v.nil? || Array(v).empty? }{{/moreThanCommon}}
|
31
|
+
params = { {{#queryParams}}{{#neq baseName 'opt_pretty' 'opt_fields' 'offset' 'limit'}}{{#unless @first}}, {{/unless}}{{#neq paramName (fixSearchParams paramName)}}"{{/neq}}{{fixSearchParams paramName}}{{#neq paramName (fixSearchParams paramName)}}"{{/neq}}: {{paramName}}{{/neq}}{{/queryParams}} }.reject { |_,v| v.nil? || Array(v).empty? }{{/moreThanCommon}}
|
32
32
|
{{#returnContainer}}Collection.new({{/returnContainer}}{{^returnContainer}}{{#firstClassResponseObject returnType}}{{firstClassResponseObject returnType}}.new({{/firstClassResponseObject}}{{/returnContainer}}parse(client.{{toLowerCase httpMethod}}(path, {{^moreThanCommon queryParams}}params: params, {{/moreThanCommon}}{{#eq httpMethod 'POST' 'PUT'}}body: data, {{/eq}}{{#queryParams.length}}params: params, {{/queryParams.length}}options: options)){{^returnContainer}}.first{{/returnContainer}}{{#returnContainer}}, type: {{#if (firstClassResponseObject returnType)}}{{firstClassResponseObject returnType}}{{else}}Resource{{/if}}{{/returnContainer}}{{#returnContainer}}, client: client){{/returnContainer}}{{^returnContainer}}{{#firstClassResponseObject returnType}}, client: client){{/firstClassResponseObject}}{{/returnContainer}}
|
33
33
|
end
|
34
34
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Txus
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|