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/movieapiv2/movie_info_get_ShowDate.go

40 lines
971 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package movieapiv2
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
func (app *App) GetShowDate(param GetShowDate) (result GetShowDateResult, err error) {
// api params
params := map[string]interface{}{}
b, _ := json.Marshal(&param)
var m map[string]interface{}
_ = json.Unmarshal(b, &m)
for k, v := range m {
params[k] = v
}
body, err := app.request("movieapi/movie-info/get-show-date", params)
if err != nil {
return
}
if err = json.Unmarshal(body, &result); err != nil {
return
}
return
}