Versions in this module Expand all Collapse all v1 v1.0.0 Nov 10, 2022 Changes in this version + type Article struct + Author string + Content string + ContentSourceURL string + Digest string + DownURL string + ShowCoverPic int + ThumbMediaID string + ThumbURL string + Title string + URL string + type ArticleList struct + Item []ArticleListItem + ItemCount int64 + TotalCount int64 + type ArticleListContent struct + CreateTime int64 + NewsItem []Article + UpdateTime int64 + type ArticleListItem struct + Content ArticleListContent + MediaID string + Name string + URL string + UpdateTime int64 + type Material struct + func NewMaterial(context *context.Context) *Material + func (material *Material) AddMaterial(mediaType MediaType, filename string) (mediaID string, url string, err error) + func (material *Material) AddNews(articles []*Article) (mediaID string, err error) + func (material *Material) AddVideo(filename, title, introduction string) (mediaID string, url string, err error) + func (material *Material) BatchGetMaterial(permanentMaterialType PermanentMaterialType, offset, count int64) (list ArticleList, err error) + func (material *Material) DeleteMaterial(mediaID string) error + func (material *Material) GetMaterialCount() (res ResMaterialCount, err error) + func (material *Material) GetMediaURL(mediaID string) (mediaURL string, err error) + func (material *Material) GetNews(id string) ([]*Article, error) + func (material *Material) ImageUpload(filename string) (url string, err error) + func (material *Material) MediaUpload(mediaType MediaType, filename string) (media Media, err error) + func (material *Material) UpdateNews(article *Article, mediaID string, index int64) (err error) + type Media struct + CreatedAt int64 + MediaID string + ThumbMediaID string + Type MediaType + type MediaType string + const MediaTypeImage + const MediaTypeThumb + const MediaTypeVideo + const MediaTypeVoice + type PermanentMaterialType string + const PermanentMaterialTypeImage + const PermanentMaterialTypeNews + const PermanentMaterialTypeVideo + const PermanentMaterialTypeVoice + type ResMaterialCount struct + ImageCount int64 + NewsCount int64 + VideoCount int64 + VoiceCount int64