|
- package haodanku
-
- import (
- "applet/app/utils"
- )
-
- type HdkReal struct {
- WireId string `json:"wire_id"`
- CateId []string `json:"cate_id"`
- Images []string `json:"images"`
- Platform string `json:"platform"`
- Starttime interface{} `json:"starttime"`
- Endtime string `json:"endtime"`
- List []struct {
- Content string `json:"content,omitempty"`
- ItemId string `json:"item_id,omitempty"`
- } `json:"list"`
- }
-
- // 好单库详情接口
- func HaodankuRealTime(topic, pageId, pageSize, selectTime string) (res []HdkReal, err error) {
- params := map[string]string{
- "version": "v2.1.0",
- "min_size": pageSize,
- "min_id": pageId,
- }
- if topic != "" {
- params["type"] = topic
- }
- resp, err := SendReq("http://v2.api.haodanku.com/wire_report", params)
- if err != nil {
- return nil, err
- }
- var featuredList struct {
- Data []HdkReal `json:"data"`
- }
- utils.Unserialize(resp, &featuredList)
- res = featuredList.Data
- return res, nil
- }
|