Class: Asana::Resources::TypeaheadBase
- Defined in:
- lib/asana/resources/gen/typeahead_base.rb
Direct Known Subclasses
Class Method Summary collapse
- .inherited(base) ⇒ Object
-
.typeahead_for_workspace(client, workspace_gid: required("workspace_gid"), resource_type: nil, type: nil, query: nil, count: nil, options: {}) ⇒ Object
Get objects via typeahead.
Methods inherited from Resource
#initialize, #method_missing, #refresh, #respond_to_missing?, #to_h, #to_s
Methods included from ResponseHelper
Constructor Details
This class inherits a constructor from Asana::Resources::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Asana::Resources::Resource
Class Method Details
.inherited(base) ⇒ Object
10 11 12 |
# File 'lib/asana/resources/gen/typeahead_base.rb', line 10 def self.inherited(base) Registry.register(base) end |
.typeahead_for_workspace(client, workspace_gid: required("workspace_gid"), resource_type: nil, type: nil, query: nil, count: nil, options: {}) ⇒ Object
Get objects via typeahead
25 26 27 28 29 30 |
# File 'lib/asana/resources/gen/typeahead_base.rb', line 25 def typeahead_for_workspace(client, workspace_gid: required("workspace_gid"), resource_type: nil, type: nil, query: nil, count: nil, options: {}) path = "/workspaces/{workspace_gid}/typeahead" path["{workspace_gid}"] = workspace_gid params = { resource_type: resource_type, type: type, query: query, count: count }.reject { |_,v| v.nil? || Array(v).empty? } Collection.new(parse(client.get(path, params: params, options: )), type: Resource, client: client) end |