Documentation ¶
Index ¶
- Constants
- type ApiOrderCreateResponse
- type ApiOrderCreateResult
- type ApiOrderCreateSoonOrderResponse
- type ApiOrderCreateSoonOrderResult
- type ApiOrderQueryResponse
- type ApiOrderQueryResult
- type ApiUserInfoResponse
- type ApiUserInfoResult
- type Client
- func (c *Client) ApiOrderCreate(ctx context.Context, notMustParams ...*gorequest.Params) (*ApiOrderCreateResult, error)
- func (c *Client) ApiOrderCreateSoonOrder(ctx context.Context, notMustParams ...*gorequest.Params) (*ApiOrderCreateSoonOrderResult, error)
- func (c *Client) ApiOrderQuery(ctx context.Context, thirdOrderId string, notMustParams ...*gorequest.Params) (*ApiOrderQueryResult, error)
- func (c *Client) ApiUserInfo(ctx context.Context, notMustParams ...*gorequest.Params) (*ApiUserInfoResult, error)
- func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun)
- func (c *Client) DefaultHttp()
- func (c *Client) GetAppKey() string
- func (c *Client) GetAppSecret() string
- func (c *Client) GetCinemaList(ctx context.Context, cityId int, notMustParams ...*gorequest.Params) (*GetCinemaListResult, error)
- func (c *Client) GetCityArea(ctx context.Context, cityId int, notMustParams ...*gorequest.Params) (*GetCityAreaResult, error)
- func (c *Client) GetCityList(ctx context.Context, notMustParams ...*gorequest.Params) (*GetCityListResult, error)
- func (c *Client) GetHotList(ctx context.Context, cityId int, notMustParams ...*gorequest.Params) (*GetHotListResult, error)
- func (c *Client) GetScheduleList(ctx context.Context, cinemaId int, notMustParams ...*gorequest.Params) (*GetScheduleListResult, error)
- func (c *Client) GetSeat(ctx context.Context, showId string, notMustParams ...*gorequest.Params) (*GetSeatResult, error)
- func (c *Client) GetShowDate(ctx context.Context, cityId, filmId int, notMustParams ...*gorequest.Params) (*GetShowDateResult, error)
- func (c *Client) GetShowList(ctx context.Context, notMustParams ...*gorequest.Params) (*GetShowListResult, error)
- func (c *Client) GetSoonList(ctx context.Context, cityId int, notMustParams ...*gorequest.Params) (*GetSoonListResult, error)
- func (c *Client) GetVersion(ctx context.Context, notMustParams ...*gorequest.Params) (*GetVersionResult, error)
- func (c *Client) GradeToFloat64(i interface{}) float64
- func (c *Client) Post(ctx context.Context, _method string, notMustParams ...*gorequest.Params) ([]byte, error)
- func (c *Client) SetHttp(app *gorequest.App)
- type ClientConfig
- type GetCinemaListResponse
- type GetCinemaListResult
- type GetCityAreaResponse
- type GetCityAreaResult
- type GetCityListResponse
- type GetCityListResponseDataList
- type GetCityListResult
- type GetHotListResponse
- type GetHotListResult
- type GetScheduleListResponse
- type GetScheduleListResult
- type GetSeatResponse
- type GetSeatResult
- type GetSeatSeats
- type GetShowDateResponse
- type GetShowDateResult
- type GetShowListResponse
- type GetShowListResult
- type GetSoonListResponse
- type GetSoonListResult
- type GetVersionResponse
- type GetVersionResult
Constants ¶
const (
LogTable = "pintoto"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiOrderCreateResponse ¶ added in v1.0.44
type ApiOrderCreateResult ¶
type ApiOrderCreateResult struct { Result ApiOrderCreateResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type ApiOrderCreateSoonOrderResponse ¶ added in v1.0.47
type ApiOrderCreateSoonOrderResponse struct { Code int `json:"code"` Message string `json:"message"` Data struct { ThirdOrderId string `json:"third_order_id"` // 接入方的订单号 Ticket string `json:"ticket"` TicketStatus int `json:"ticketStatus"` OrderId string `json:"order_id"` } `json:"data"` Success bool `json:"success"` }
type ApiOrderCreateSoonOrderResult ¶
type ApiOrderCreateSoonOrderResult struct { Result ApiOrderCreateSoonOrderResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type ApiOrderQueryResponse ¶ added in v1.0.44
type ApiOrderQueryResponse struct { Success bool `json:"success"` Message string `json:"message"` Data struct { AppKey string `json:"appKey"` // 下单appKey ThirdOrderId string `json:"thirdOrderId"` // 接入方的订单号 OrderStatus int `json:"orderStatus"` // 订单状态:2-受理中,3-待出票,4-已出票待结算,5-已结算,10-订单关闭 OrderStatusStr string `json:"orderStatusStr"` // 订单状态说明 InitPrice int `json:"initPrice"` // 订单市场价:分 OrderPrice int `json:"orderPrice"` // 订单成本价:分,接入方可拿次字段作为下单成本价 Seat string `json:"seat"` // 座位:英文逗号隔开 OrderNum int `json:"orderNum"` // 座位数 ReservedPhone string `json:"reservedPhone"` // 下单预留手机号码 CreateTime string `json:"createTime"` // 下单时间 ReadyTicketTime string `json:"readyTicketTime"` // 待出票时间 TicketTime string `json:"ticketTime"` // 出票时间 NotifyUrl string `json:"notifyUrl"` // 回调通知地址 CloseTime interface{} `json:"closeTime"` // 关闭时间 CloseCause interface{} `json:"closeCause"` // 关闭原因 TicketCode []struct { Code string `json:"code"` Type int `json:"type"` Url string `json:"url"` } `json:"ticketCode"` // 取票码,type为1时,为字符串,type为2时,为取票码原始截图。 理论上一个取票码包含各字符串和原始截图, 原始截图可能不和字符串同步返回,有滞后性。 } `json:"data"` Code int `json:"code"` }
type ApiOrderQueryResult ¶
type ApiOrderQueryResult struct { Result ApiOrderQueryResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type ApiUserInfoResponse ¶ added in v1.0.47
type ApiUserInfoResponse struct { Success bool `json:"success"` Message string `json:"message"` Data struct { Nickname string `json:"nickname"` // 用户昵称 Mobile int64 `json:"mobile"` // 注册号码 Balance float64 `json:"balance"` // 账户余额 FreezeAmount float64 `json:"freeze_amount"` // 冻结金额 } `json:"data"` Code int `json:"code"` }
type ApiUserInfoResult ¶
type ApiUserInfoResult struct { Result ApiUserInfoResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type Client ¶ added in v1.0.47
type Client struct {
// contains filtered or unexported fields
}
Client 实例
func NewClient ¶ added in v1.0.47
func NewClient(config *ClientConfig) (*Client, error)
NewClient 创建实例化
func (*Client) ApiOrderCreate ¶ added in v1.0.47
func (c *Client) ApiOrderCreate(ctx context.Context, notMustParams ...*gorequest.Params) (*ApiOrderCreateResult, error)
ApiOrderCreate 下单api https://www.showdoc.com.cn/1154868044931571/5891022916496848
func (*Client) ApiOrderCreateSoonOrder ¶ added in v1.0.47
func (c *Client) ApiOrderCreateSoonOrder(ctx context.Context, notMustParams ...*gorequest.Params) (*ApiOrderCreateSoonOrderResult, error)
ApiOrderCreateSoonOrder 秒出单下单 https://www.showdoc.com.cn/1154868044931571/6437295495912025
func (*Client) ApiOrderQuery ¶ added in v1.0.47
func (c *Client) ApiOrderQuery(ctx context.Context, thirdOrderId string, notMustParams ...*gorequest.Params) (*ApiOrderQueryResult, error)
ApiOrderQuery 订单查询 https://www.showdoc.com.cn/1154868044931571/5965244588489845
func (*Client) ApiUserInfo ¶ added in v1.0.47
func (c *Client) ApiUserInfo(ctx context.Context, notMustParams ...*gorequest.Params) (*ApiUserInfoResult, error)
ApiUserInfo 账号信息查询 https://www.showdoc.com.cn/1154868044931571/6269224958928211
func (*Client) ConfigSLogClientFun ¶ added in v1.0.162
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun)
ConfigSLogClientFun 日志配置
func (*Client) GetAppSecret ¶ added in v1.0.47
func (*Client) GetCinemaList ¶ added in v1.0.47
func (c *Client) GetCinemaList(ctx context.Context, cityId int, notMustParams ...*gorequest.Params) (*GetCinemaListResult, error)
GetCinemaList 影院列表 https://www.showdoc.com.cn/1154868044931571/5866426126744792
func (*Client) GetCityArea ¶ added in v1.0.47
func (c *Client) GetCityArea(ctx context.Context, cityId int, notMustParams ...*gorequest.Params) (*GetCityAreaResult, error)
GetCityArea 城市下区域 https://www.showdoc.com.cn/1154868044931571/6243539682553126
func (*Client) GetCityList ¶ added in v1.0.47
func (c *Client) GetCityList(ctx context.Context, notMustParams ...*gorequest.Params) (*GetCityListResult, error)
GetCityList 城市列表 https://www.showdoc.com.cn/1154868044931571/5865562425538244
func (*Client) GetHotList ¶ added in v1.0.47
func (c *Client) GetHotList(ctx context.Context, cityId int, notMustParams ...*gorequest.Params) (*GetHotListResult, error)
GetHotList 正在热映 https://www.showdoc.com.cn/1154868044931571/5866125707634369
func (*Client) GetScheduleList ¶ added in v1.0.47
func (c *Client) GetScheduleList(ctx context.Context, cinemaId int, notMustParams ...*gorequest.Params) (*GetScheduleListResult, error)
GetScheduleList 场次排期 https://www.showdoc.com.cn/1154868044931571/5866708808899217
func (*Client) GetSeat ¶ added in v1.0.47
func (c *Client) GetSeat(ctx context.Context, showId string, notMustParams ...*gorequest.Params) (*GetSeatResult, error)
GetSeat 座位 https://www.showdoc.com.cn/1154868044931571/5866824368760475
func (*Client) GetShowDate ¶ added in v1.0.47
func (c *Client) GetShowDate(ctx context.Context, cityId, filmId int, notMustParams ...*gorequest.Params) (*GetShowDateResult, error)
GetShowDate 包含某电影的日期 https://www.showdoc.com.cn/1154868044931571/6091788579441818
func (*Client) GetShowList ¶ added in v1.0.47
func (c *Client) GetShowList(ctx context.Context, notMustParams ...*gorequest.Params) (*GetShowListResult, error)
GetShowList 包含某电影的影院 https://www.showdoc.com.cn/1154868044931571/6067372188376779
func (*Client) GetSoonList ¶ added in v1.0.47
func (c *Client) GetSoonList(ctx context.Context, cityId int, notMustParams ...*gorequest.Params) (*GetSoonListResult, error)
GetSoonList 即将上映 https://www.showdoc.com.cn/1154868044931571/5866125707634369
func (*Client) GetVersion ¶ added in v1.0.47
func (c *Client) GetVersion(ctx context.Context, notMustParams ...*gorequest.Params) (*GetVersionResult, error)
GetVersion 获取同步版本号 https://www.showdoc.com.cn/1154868044931571/6566701084841699
func (*Client) GradeToFloat64 ¶ added in v1.0.47
type ClientConfig ¶ added in v1.0.52
ClientConfig 实例配置
type GetCinemaListResponse ¶ added in v1.0.47
type GetCinemaListResponse struct { Code int `json:"code"` Message string `json:"message"` Data struct { List []struct { CinemaId int `json:"cinemaId"` // 影院id CityId int `json:"cityId"` // 城市id CinemaName string `json:"cinemaName"` // 影院名称 Address string `json:"address"` // 影院地址 Latitude float64 `json:"latitude"` // 纬度 Longitude float64 `json:"longitude"` // 经度 Phone string `json:"phone"` // 影院电话 RegionName string `json:"regionName"` // 地区名称 IsAcceptSoonOrder int `json:"isAcceptSoonOrder"` // 是否支持秒出票,0为不支持,1为支持 NetPrice int `json:"netPrice"` // 当前影院最低价的排期 } `json:"list"` } `json:"data"` Success bool `json:"success"` }
type GetCinemaListResult ¶
type GetCinemaListResult struct { Result GetCinemaListResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type GetCityAreaResponse ¶ added in v1.0.44
type GetCityAreaResult ¶
type GetCityAreaResult struct { Result GetCityAreaResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type GetCityListResponse ¶ added in v1.0.44
type GetCityListResponse struct { Code int `json:"code"` Message string `json:"message"` Data struct { List []GetCityListResponseDataList `json:"list"` } `json:"data"` Success bool `json:"success"` }
type GetCityListResponseDataList ¶ added in v1.0.44
type GetCityListResult ¶
type GetCityListResult struct { Result GetCityListResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type GetHotListResponse ¶ added in v1.0.47
type GetHotListResponse struct { Code int `json:"code"` Message string `json:"message"` Data struct { HasMore int `json:"hasMore"` List []struct { Director string `json:"director"` // 导演 PublishDate string `json:"publishDate"` // 影片上映日期 VersionTypes string `json:"versionTypes"` // 上映类型 Language string `json:"language"` // 语言 ShowStatus int `json:"showStatus"` // 放映状态:1 正在热映。2 即将上映 Pic string `json:"pic"` // 海报URL地址 FilmTypes string `json:"filmTypes"` // 影片类型 LikeNum int `json:"likeNum"` // 想看人数 Duration int64 `json:"duration"` // 时长,分钟 Cast string `json:"cast"` // 主演 FilmId int `json:"filmId"` // 影片id Grade string `json:"grade"` // 评分 Intro string `json:"intro"` // 简介 Name string `json:"name"` // 影片名 } `json:"list"` } `json:"data"` Success bool `json:"success"` }
type GetHotListResult ¶
type GetHotListResult struct { Result GetHotListResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type GetScheduleListResponse ¶ added in v1.0.47
type GetScheduleListResponse struct { Code int `json:"code"` Message string `json:"message"` Data struct { List []struct { PlanType string `json:"planType"` // 影厅类型 2D 3D ShowTime string `json:"showTime"` // 放映时间 NetPrice int `json:"netPrice"` // 参考价,单位:分 Language string `json:"language"` // 语言 ShowDate string `json:"showDate"` // Duration int64 `json:"duration"` // 时长,分钟 ShowId string `json:"showId"` // 场次标识 StopSellTime string `json:"stopSellTime"` // 停售时间 CinemaId int `json:"cinemaId"` // 影院id CinemaName string `json:"cinemaName"` // FilmId int `json:"filmId"` // 影片id ScheduleArea string `json:"scheduleArea"` // 该排期的分区座位价格信息,当此字段有值的时候,代表座位里面支持分区价格。 如果调用的是秒出票下单, 那价格必须计算正确,才能正确出票成功,即必须处理好座位分区价格 FilmName string `json:"filmName"` // 影片名字 HallName string `json:"hallName"` // 影厅名 ShowVersionType string `json:"showVersionType"` // 场次类型 } `json:"list"` DiscountRule struct { UpDiscountRate float64 `json:"upDiscountRate"` // 影院最高成本折扣,当价格大于等于39元时候,可取此字段 DownDiscountRate float64 `json:"downDiscountRate"` // 影院最高成本折扣,当价格小于39元时候,可取此字段 } `json:"discountRule"` } `json:"data"` Success bool `json:"success"` }
type GetScheduleListResult ¶
type GetScheduleListResult struct { Result GetScheduleListResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type GetSeatResponse ¶ added in v1.0.47
type GetSeatResponse struct { Code int `json:"code"` Message string `json:"message"` Data struct { SeatData struct { Restrictions int `json:"restrictions"` Seats []GetSeatSeats `json:"seats"` } `json:"seatData"` } `json:"data"` Success bool `json:"success"` }
type GetSeatResult ¶
type GetSeatResult struct { Result GetSeatResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type GetSeatSeats ¶
type GetSeatSeats struct { Area string `json:"area"` // 本座位所在的区域,根据场次排期接口的 scheduleArea 字段, 可得到当前座位的分区价格 ColumnNo string `json:"columnNo"` // 列 Lovestatus int `json:"lovestatus"` // 0为非情侣座;1为情侣座左;2为情侣座右 RowNo string `json:"rowNo"` // 行 SeatId string `json:"seatId"` // 座位标识符,锁座位和秒出票的时候需要用到 SeatNo string `json:"seatNo"` // 座位名 Status string `json:"status"` // N可售,LK不可售 }
type GetShowDateResponse ¶ added in v1.0.47
type GetShowDateResult ¶
type GetShowDateResult struct { Result GetShowDateResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type GetShowListResponse ¶ added in v1.0.47
type GetShowListResponse struct { Code int `json:"code"` Message string `json:"message"` Data struct { HasMore int `json:"hasMore"` List []struct { Address string `json:"address"` ShowId string `json:"showId"` Distance string `json:"distance"` CinemaId int `json:"cinemaId"` CinemaName string `json:"cinemaName"` Latitude float64 `json:"latitude"` ShowTime string `json:"showTime"` HallName string `json:"hallName"` Longitude float64 `json:"longitude"` } `json:"list"` } `json:"data"` Success bool `json:"success"` }
type GetShowListResult ¶
type GetShowListResult struct { Result GetShowListResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type GetSoonListResponse ¶ added in v1.0.47
type GetSoonListResponse struct { Code int `json:"code"` Message string `json:"message"` Data struct { HasMore int `json:"hasMore"` List []struct { Director string `json:"director"` // 导演 PublishDate string `json:"publishDate"` // 影片上映日期 VersionTypes string `json:"versionTypes"` // 上映类型 Language string `json:"language"` // 语言 ShowStatus int `json:"showStatus"` // 放映状态:1 正在热映。2 即将上映 Pic string `json:"pic"` // 海报URL地址 FilmTypes string `json:"filmTypes"` // 影片类型 LikeNum int `json:"likeNum"` // 想看人数 Duration int64 `json:"duration"` // 时长,分钟 Cast string `json:"cast"` // 主演 FilmId int `json:"filmId"` // 影片id Grade interface{} `json:"grade"` // 评分 Intro string `json:"intro"` // 简介 Name string `json:"name"` // 影片名 } `json:"list"` } `json:"data"` Success bool `json:"success"` }
type GetSoonListResult ¶
type GetSoonListResult struct { Result GetSoonListResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type GetVersionResponse ¶ added in v1.0.47
type GetVersionResult ¶
type GetVersionResult struct { Result GetVersionResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
Source Files ¶
- api.go
- api.order.create-soon-order.go
- api.order.create.go
- api.order.query.go
- api.user.info.go
- client.go
- config.go
- const.go
- get.go
- movie_info_get_cinema_list.go
- movie_info_get_city_area.go
- movie_info_get_city_list.go
- movie_info_get_hot_list.go
- movie_info_get_schedule_list.go
- movie_info_get_sea.go
- movie_info_get_show_date.go
- movie_info_get_show_list.go
- movie_info_get_soon_list.go
- movieapi.movie-info.get-version.go
- request.go
- sign.go