goal_ten_api

package module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService() contracts.ServiceProvider

Types

type Client

type Client struct {
	BaseUrl string
}

func (*Client) BaiduHots

func (c *Client) BaiduHots() ([]Hot, error)

func (*Client) BiliHots

func (c *Client) BiliHots() ([]Hot, error)

func (*Client) DouyinHots

func (c *Client) DouyinHots() ([]Hot, error)

func (*Client) ToutiaoHotNews

func (c *Client) ToutiaoHotNews() ([]Hot, error)

func (*Client) ToutiaoHots

func (c *Client) ToutiaoHots() ([]Hot, error)

func (*Client) WeiboHots

func (c *Client) WeiboHots() ([]Hot, error)

func (*Client) ZhihuHots

func (c *Client) ZhihuHots() ([]Hot, error)

type Config

type Config struct {
	BaseUrl string
}

type Hot

type Hot struct {
	Name string `json:"name"`
	Url  string `json:"url"`
	Hot  string `json:"hot,omitempty"`
}

type HotResponse

type HotResponse struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data []Hot  `json:"data"`
}

type Service

type Service struct {
}

func (Service) Register

func (s Service) Register(application contracts.Application)

func (Service) Start

func (s Service) Start() error

func (Service) Stop

func (s Service) Stop()

type TenAPI

type TenAPI interface {
	BaiduHots() ([]Hot, error)
	DouyinHots() ([]Hot, error)
	WeiboHots() ([]Hot, error)
	ZhihuHots() ([]Hot, error)
	BiliHots() ([]Hot, error)

	//ToutiaoHots 头条热搜
	ToutiaoHots() ([]Hot, error)

	// ToutiaoHotNews 头条热点新闻
	ToutiaoHotNews() ([]Hot, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL