Class: Asana::Resources::TimePeriodsBase
- Defined in:
- lib/asana/resources/gen/time_periods_base.rb
Direct Known Subclasses
Class Method Summary collapse
-
.get_time_period(client, time_period_gid: required("time_period_gid"), options: {}) ⇒ Object
Get a time period.
-
.get_time_periods(client, start_on: nil, end_on: nil, workspace: nil, options: {}) ⇒ Object
start_on - [date] ISO 8601 date string.
- .inherited(base) ⇒ Object
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
.get_time_period(client, time_period_gid: required("time_period_gid"), options: {}) ⇒ Object
Get a time period
21 22 23 24 25 |
# File 'lib/asana/resources/gen/time_periods_base.rb', line 21 def get_time_period(client, time_period_gid: required("time_period_gid"), options: {}) path = "/time_periods/{time_period_gid}" path["{time_period_gid}"] = time_period_gid parse(client.get(path, options: )).first end |
.get_time_periods(client, start_on: nil, end_on: nil, workspace: nil, options: {}) ⇒ Object
start_on - [date] ISO 8601 date string
38 39 40 41 42 |
# File 'lib/asana/resources/gen/time_periods_base.rb', line 38 def get_time_periods(client, start_on: nil, end_on: nil, workspace: nil, options: {}) path = "/time_periods" params = { start_on: start_on, end_on: end_on, workspace: workspace }.reject { |_,v| v.nil? || Array(v).empty? } Collection.new(parse(client.get(path, params: params, options: )), type: Resource, client: client) end |