You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-library/service/pintoto/movie_info_get_show_date.go

39 lines
967 B

3 years ago
package pintoto
import (
"encoding/json"
)
type GetShowDate struct {
FilmId int `json:"filmId"` // 影片id由热映/即将上映接口获得
CityId int `json:"cityId"` // 城市id由城市列表接口获得
}
type GetShowDateResult struct {
Code int `json:"code"`
Message string `json:"message"`
Data struct {
DateList []string `json:"dateList"`
} `json:"data"`
Success bool `json:"success"`
}
// GetShowDate 包含某电影的日期 https://www.showdoc.com.cn/1154868044931571/6091788579441818
2 years ago
func (app *App) GetShowDate(cityId, filmId int) (result GetShowDateResult, err error) {
// 参数
param := NewParams()
param.Set("cityId", cityId)
param.Set("filmId", filmId)
// 转换
params := app.NewParamsWith(param)
// 请求
3 years ago
body, err := app.request("https://movieapi2.pintoto.cn/movieapi/movie-info/get-show-date", params)
if err != nil {
return
}
if err = json.Unmarshal(body, &result); err != nil {
return
}
return
}