search

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SubmitPages

func SubmitPages(clt *core.Client, req *SubmitPagesRequest) error

小程序开发者可以通过本接口提交小程序页面url及参数信息,让微信可以更及时的收录到小程序的页面信息,开发者提交的页面信息将可能被用于小程序搜索结果展示。

Types

type Page

type Page struct {
	Path  string `json:"path"`  // 页面路径
	Query string `json:"query"` // 页面参数
}

type PageItem

type PageItem struct {
	Title string `json:"title"`                 // 小程序页面标题
	Desc  string `json:"description,omitempty"` // 小程序页面摘要
	Image string `json:"image,omitempty"`       // 小程序页面代表图
	Path  string `json:"path"`                  // 小程序页面路径
}

type SiteSearchResponse

type SiteSearchResponse struct {
	Items        []PageItem `json:"items,omitempty"`
	HasNextPage  int        `json:"has_next_page,omitempty"`
	NextPageInfo string     `json:"next_page_info,omitempty"`
	Total        int        `json:"hit_count,omitempty"`
}

func SiteSearch

func SiteSearch(clt *core.Client, keyword string, nextPageInfo string) (*SiteSearchResponse, error)

小程序内部搜索API提供针对页面的查询能力,小程序开发者输入搜索词后,将返回自身小程序和搜索词相关的页面。因此,利用该接口,开发者可以查看指定内容的页面被微信平台的收录情况;同时,该接口也可供开发者在小程序内应用,给小程序用户提供搜索能力。

type SubmitPagesRequest

type SubmitPagesRequest struct {
	Pages []Page `json:"pages"` // 小程序页面信息列表
}

Jump to

Keyboard shortcuts

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