Skip to content

Commit

Permalink
Merge d9c66c6 into 2b440aa
Browse files Browse the repository at this point in the history
  • Loading branch information
markspolakovs committed Dec 29, 2020
2 parents 2b440aa + d9c66c6 commit f6d4c6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion timeslot.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,15 @@ func (s *Session) GetTimeslot(id int) (timeslot Timeslot, err error) {
}

// GetCurrentTimeslot retrieves the current timeslot.
// If there is no show on air, returns the zero value for Timeslot.
// This consumes one API request.
func (s *Session) GetCurrentTimeslot() (timeslot Timeslot, err error) {
if err = s.get("/timeslot/currenttimeslot").Into(&timeslot); err != nil {
return
}
err = timeslot.populateTimeslotTimes()
if timeslot.TimeslotID != 0 {
err = timeslot.populateTimeslotTimes()
}
return
}

Expand Down

0 comments on commit f6d4c6f

Please sign in to comment.