media

package
v0.0.0-...-f5adc6c Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2014 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

媒体操作相关的数据结构.

Index

Constants

View Source
const (
	NewsArticleCountLimit = 10

	NewsArticleShowCoverPicTrue  = 1
	NewsArticleShowCoverPicFalse = 0
)
View Source
const (
	MEDIA_TYPE_IMAGE = "image"
	MEDIA_TYPE_VOICE = "voice"
	MEDIA_TYPE_VIDEO = "video"
	MEDIA_TYPE_THUMB = "thumb"
	MEDIA_TYPE_NEWS  = "news"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MediaInfo

type MediaInfo struct {
	MediaType string `json:"type"`       // 图片(image)、语音(voice)、视频(video)、缩略图(thumb)和 图文消息(news)
	MediaId   string `json:"media_id"`   // 媒体文件上传后,获取时的唯一标识
	CreatedAt int64  `json:"created_at"` // 媒体文件上传时间戳
}

上传(创建)媒体成功时的回复报文

type NewsArticle

type NewsArticle struct {
	ThumbMediaId     string `json:"thumb_media_id"`                  // 图文消息缩略图的media_id,可以在基础支持-上传多媒体文件接口中获得
	Title            string `json:"title"`                           // 图文消息的标题
	Author           string `json:"author,omitempty"`                // 图文消息的作者
	ContentSourceURL string `json:"content_source_url,omitempty"`    // 在图文消息页面点击“阅读原文”后的页面
	Content          string `json:"content"`                         // 图文消息页面的内容,支持HTML标签
	Digest           string `json:"digest,omitempty"`                // 图文消息的描述
	ShowCoverPic     int    `json:"show_cover_pic,string,omitempty"` // 是否显示封面,1为显示,0为不显示
}

图文消息里的 Article

Jump to

Keyboard shortcuts

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