Module: StrawberryAPI::Client::Schedules
- Included in:
- StrawberryAPI::Client
- Defined in:
- lib/strawberry_api/client/schedules.rb
Instance Method Summary collapse
- 
  
    
      #schedule(id:)  ⇒ StrawberryAPI::Schedule 
    
    
  
  
  
  
  
  
  
  
  
    Fetches a schedule. 
- 
  
    
      #schedules  ⇒ Array<StrawberryAPI::Schedule> 
    
    
  
  
  
  
  
  
  
  
  
    Fetches all schedules. 
Instance Method Details
#schedule(id:) ⇒ StrawberryAPI::Schedule
Fetches a schedule
| 22 23 24 25 | # File 'lib/strawberry_api/client/schedules.rb', line 22 def schedule(id:) data = get("/schedules/#{id}").parse['schedule'] data.nil? ? nil : Schedule.new(data) end | 
#schedules ⇒ Array<StrawberryAPI::Schedule>
Fetches all schedules
| 10 11 12 13 14 | # File 'lib/strawberry_api/client/schedules.rb', line 10 def schedules get("/schedules").parse['schedules']&.map do |schedule| Schedule.new(schedule) end end |