anilist/airingschedule.go
2022-02-03 17:23:29 +01:00

54 lines
1.2 KiB
Go

package anilist
func (api *Api) GetAiringSchedule(vars AiringScheduleQuery, onError func(error)) <-chan *AiringSchedule {
resp := responseObj[*page[AiringSchedule]]{}
return requestPaged(api, getAiringScheduleQuery, vars.toMap(), &resp, onError)
}
const (
getAiringScheduleQuery = `query (
$id: Int,
$mediaId: Int,
$episode: Int,
$airingAt: Int,
$notYetAired: Boolean,
$id_in: [Int],
$id_not_in: [Int],
$mediaId_in: [Int],
$mediaId_not_in: [Int],
$episode_in: [Int],
$episode_not_in: [Int],
$episode_greater: Int,
$episode_lesser: Int,
$airingAt_greater: Int,
$airingAt_lesser: Int,
$sort: [AiringSort],
$page: Int
)
{
Page (page: $page) {
pageInfo ` + subSelectionPageInfo + `
airingSchedules (
id: $id,
mediaId: $mediaId,
episode: $episode,
airingAt: $airingAt,
notYetAired: $notYetAired,
id_in: $id_in,
id_not_in: $id_not_in,
mediaId_in: $mediaId_in,
mediaId_not_in: $mediaId_not_in,
episode_in: $episode_in,
episode_not_in: $episode_not_in,
episode_greater: $episode_greater,
episode_lesser: $episode_lesser,
airingAt_greater: $airingAt_greater,
airingAt_lesser: $airingAt_lesser,
sort: $sort,
) ` + subSelectionAiringSchedule + `
}
}`
)