fanfou

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// BaseURL represents Fanfou API base URL
	BaseURL = "https://api.fanfou.com/"

	// AuthBaseURL represents Fanfou API authorization base URL
	AuthBaseURL = "https://fanfou.com/"
)

Functions

This section is empty.

Types

type AccountService

type AccountService struct {
	// contains filtered or unexported fields
}

AccountService AccountService

func NewAccountService

func NewAccountService(c *http.Client, debug bool) *AccountService

NewAccountService NewAccountService

func (*AccountService) Notification

func (a *AccountService) Notification(ctx context.Context) (*NotificationOutput, error)

Notification 返回未读的mentions, direct message 以及关注请求数量

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/account.notification

func (*AccountService) NotifyNum

func (a *AccountService) NotifyNum(ctx context.Context) (*NotifyNumOutput, error)

NotifyNum 获取当前app上的新提醒数量

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/account.notify-num

func (*AccountService) RateLimitStatus

func (a *AccountService) RateLimitStatus(ctx context.Context, opts ...Option) (*RateLimitStatusOutput, error)

RateLimitStatus 获取 API 限制

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/account.rate-limit-status

func (*AccountService) UpdateNotifyNum

func (a *AccountService) UpdateNotifyNum(ctx context.Context, notifyNum int) (*UpdateNotifyNumOutput, error)

UpdateNotifyNum 向饭否更新当前app上的新提醒数量

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/account.update-notify-num

func (*AccountService) UpdateProfile

func (a *AccountService) UpdateProfile(ctx context.Context, opts ...Option) (*User, error)

UpdateProfile 通过 API 更新用户资料

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/account.update-profile

func (*AccountService) UpdateProfileImage

func (a *AccountService) UpdateProfileImage(ctx context.Context, reader io.Reader, opts ...Option) (*User, error)

UpdateProfileImage 通过 API 更新用户头像

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/account.update-profile-image

func (*AccountService) VerifyCredentials

func (a *AccountService) VerifyCredentials(ctx context.Context, opts ...Option) (*User, error)

VerifyCredentials 检查用户名密码是否正确

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/account.verify-credentials

type BlocksService

type BlocksService struct {
	// contains filtered or unexported fields
}

BlocksService BlocksService

func NewBlocksService

func NewBlocksService(c *http.Client, debug bool) *BlocksService

NewBlocksService NewBlocksService

func (*BlocksService) Blocking

func (b *BlocksService) Blocking(ctx context.Context, opts ...Option) ([]User, error)

Blocking 获取黑名单上用户资料

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/blocks.blocking

func (*BlocksService) Create

func (b *BlocksService) Create(ctx context.Context, id string, opts ...Option) (*User, error)

Create 把指定 id 用户加入黑名单,指定目标用户的 user_id 或者 loginname

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/blocks.create

func (*BlocksService) Destroy

func (b *BlocksService) Destroy(ctx context.Context, id string, opts ...Option) (*User, error)

Destroy 将指定id用户解除黑名单

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/blocks.destroy

func (*BlocksService) Exists

func (b *BlocksService) Exists(ctx context.Context, id string, opts ...Option) (*User, error)

Exists 检查用户是否被加入了黑名单,指定目标用户的 user_id 或者 loginname

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/blocks.exists

func (*BlocksService) Ids

func (b *BlocksService) Ids(ctx context.Context) ([]string, error)

Ids 获取用户黑名单id列表

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/blocks.ids

type DirectMessages

type DirectMessages struct {
	ID                  string          `json:"id"`
	Text                string          `json:"text"`
	SenderID            string          `json:"sender_id"`
	RecipientID         string          `json:"recipient_id"`
	CreatedAt           string          `json:"created_at"`
	SenderScreenName    string          `json:"sender_screen_name"`
	RecipientScreenName string          `json:"recipient_screen_name"`
	Sender              *User           `json:"sender"`
	Recipient           *User           `json:"recipient"`
	InReplyTo           *DirectMessages `json:"in_reply_to"`
}

DirectMessages DirectMessages

type DirectMessagesConversationListOutput

type DirectMessagesConversationListOutput struct {
	OtherID string          `json:"otherid"`
	MsgNum  int             `json:"msg_num"`
	NewConv bool            `json:"new_conv"`
	DM      *DirectMessages `json:"dm"`
}

DirectMessagesConversationListOutput DirectMessagesConversationListOutput

type DirectMessagesService

type DirectMessagesService struct {
	// contains filtered or unexported fields
}

DirectMessagesService DirectMessagesService

func NewDirectMessagesService

func NewDirectMessagesService(c *http.Client, debug bool) *DirectMessagesService

NewDirectMessagesService NewDirectMessagesService

func (*DirectMessagesService) Conversation

func (d *DirectMessagesService) Conversation(ctx context.Context, id string, opts ...Option) ([]DirectMessages, error)

Conversation 以对话的形式返回当前用户与某用户的私信

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/direct-messages.conversation

func (*DirectMessagesService) ConversationList

ConversationList 以对话的形式返回当前用户的私信列表

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/direct-messages.conversation-list

func (*DirectMessagesService) Destroy

func (d *DirectMessagesService) Destroy(ctx context.Context, id string, opts ...Option) (*DirectMessages, error)

Destroy 删除某条私信

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/direct-messages.destroy

func (*DirectMessagesService) Inbox

func (d *DirectMessagesService) Inbox(ctx context.Context, opts ...Option) ([]DirectMessages, error)

Inbox 显示20条收件箱中的私信

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/direct-messages.inbox

func (*DirectMessagesService) New

func (d *DirectMessagesService) New(ctx context.Context, id, text string, opts ...Option) (*DirectMessages, error)

New 发送私信

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/direct-messages.new

func (*DirectMessagesService) Sent

func (d *DirectMessagesService) Sent(ctx context.Context, opts ...Option) ([]DirectMessages, error)

Sent 显示发件箱中的私信

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/direct-messages.sent

type Fanfou

type Fanfou struct {
	SearchService         *SearchService
	BlocksService         *BlocksService
	UsersService          *UsersService
	AccountService        *AccountService
	SavedSearchesService  *SavedSearchesService
	PhotosService         *PhotosService
	TrendsService         *TrendsService
	FollowersService      *FollowersService
	FavoritesService      *FavoritesService
	FriendshipsService    *FriendshipsService
	FriendsService        *FriendsService
	StatusesService       *StatusesService
	DirectMessagesService *DirectMessagesService
	// contains filtered or unexported fields
}

Fanfou fanfou

func NewFanFou

func NewFanFou(consumerkey, consumerSecret string) *Fanfou

NewFanFou new fanfou

func NewFanFouWithClient

func NewFanFouWithClient(consumerkey, consumerSecret string, client *http.Client) *Fanfou

NewFanFouWithClient new fanfou with client

func (*Fanfou) AccessToken

func (f *Fanfou) AccessToken(ctx context.Context, token oauth.RequestToken, verificationCode string, additionalParams map[string]string) (*oauth.AccessToken, error)

AccessToken 使用授权后的 Request Token 换取 Access Token

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/Oauth#%E4%BD%BF%E7%94%A8%E6%8E%88%E6%9D%83%E5%90%8E%E7%9A%84request-token%E6%8D%A2%E5%8F%96access-token

func (*Fanfou) OAuth

func (f *Fanfou) OAuth(accessToken *oauth.AccessToken) error

OAuth 使用已经生成的 AccessToken 认证

func (*Fanfou) XAuth

func (f *Fanfou) XAuth(username, password string) error

XAuth 为移动设备简化的 OAuth 认证

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/Xauth

type FavoritesService

type FavoritesService struct {
	// contains filtered or unexported fields
}

FavoritesService FavoritesService

func NewFavoritesService

func NewFavoritesService(c *http.Client, debug bool) *FavoritesService

NewFavoritesService NewFavoritesService

func (*FavoritesService) Create

func (f *FavoritesService) Create(ctx context.Context, msgID string, opts ...Option) (*Status, error)

Create 收藏消息(当前用户关注者和未设置隐私用户发出的消息)

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/favorites.create

func (*FavoritesService) Destroy

func (f *FavoritesService) Destroy(ctx context.Context, msgID string, opts ...Option) (*Status, error)

Destroy 取消收藏指定消息(当前用户的收藏)

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/favorites.destroy

func (*FavoritesService) Favorites

func (f *FavoritesService) Favorites(ctx context.Context, opts ...Option) ([]Status, error)

Favorites 浏览指定用户收藏消息(未设置隐私用户或登录用户好友)

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/favorites

type FollowersService

type FollowersService struct {
	// contains filtered or unexported fields
}

FollowersService FollowersService

func NewFollowersService

func NewFollowersService(c *http.Client, debug bool) *FollowersService

NewFollowersService NewFollowersService

func (*FollowersService) Ids

func (f *FollowersService) Ids(ctx context.Context, opts ...Option) ([]string, error)

Ids 返回用户关注者的id列表

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/followers.ids

type FriendsService

type FriendsService struct {
	// contains filtered or unexported fields
}

FriendsService Friends

func NewFriendsService

func NewFriendsService(c *http.Client, debug bool) *FriendsService

NewFriendsService NewFriendsService

func (*FriendsService) Ids

func (f *FriendsService) Ids(ctx context.Context, opts ...Option) ([]string, error)

Ids 返回用户好友的id列表

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/friends.ids

type FriendshipsService

type FriendshipsService struct {
	// contains filtered or unexported fields
}

FriendshipsService FriendshipsService

func NewFriendshipsService

func NewFriendshipsService(c *http.Client, debug bool) *FriendshipsService

NewFriendshipsService NewFriendshipsService

func (*FriendshipsService) Accept

func (a *FriendshipsService) Accept(ctx context.Context, id string, opts ...Option) (*User, error)

Accept 接受好友请求

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/friendships.accept

func (*FriendshipsService) Create

func (a *FriendshipsService) Create(ctx context.Context, id string, opts ...Option) (*User, error)

Create 添加用户为好友

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/friendships.create

func (*FriendshipsService) Deny

func (a *FriendshipsService) Deny(ctx context.Context, id string, opts ...Option) (*User, error)

Deny 拒绝好友请求

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/friendships.deny

func (*FriendshipsService) Destroy

func (a *FriendshipsService) Destroy(ctx context.Context, id string, opts ...Option) (*User, error)

Destroy 取消关注好友

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/friendships.destroy

func (*FriendshipsService) Exists

func (a *FriendshipsService) Exists(ctx context.Context, idA, idB string) (bool, error)

Exists 查询两个用户之间是否有follow关系 如果user_a关注user_b则返回 true, 否则返回false.

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/friendships.exists

func (*FriendshipsService) Requests

func (a *FriendshipsService) Requests(ctx context.Context, opts ...Option) ([]User, error)

Requests 查询Follow请求

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/friendships.requests

func (*FriendshipsService) Show

func (a *FriendshipsService) Show(ctx context.Context, sourceLoginName, sourceID, targetLoginName, targetID string) (*User, error)

Show 返回两个用户之间follow关系的详细信息

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/friendships.show

type FriendshipsShowOutput

type FriendshipsShowOutput struct {
	Relationship *struct {
		Source *struct {
			ID                   string `json:"id"`
			ScreenName           string `json:"screen_name"`
			Following            string `json:"following"`
			FollowedBy           string `json:"followed_by"`
			NotificationsEnabled string `json:"notifications_enabled"`
			Blocking             string `json:"blocking"`
		} `json:"source"`
		Target *struct {
			ID         string `json:"id"`
			ScreenName string `json:"screen_name"`
			Following  string `json:"following"`
			FollowedBy string `json:"followed_by"`
		} `json:"target"`
	} `json:"relationship"`
}

FriendshipsShowOutput FriendshipsShowOutput

type NotificationOutput

type NotificationOutput struct {
	Mentions       int `json:"mentions"`
	DirectMessages int `json:"direct_messages"`
	FriendRequests int `json:"friend_requests"`
}

NotificationOutput NotificationOutput

type NotifyNumOutput

type NotifyNumOutput struct {
	Result    string `json:"result"`
	NotifyNum int    `json:"notify_num"`
}

NotifyNumOutput NotifyNumOutput

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option Option

func WithCallback

func WithCallback(name string) Option

WithCallback 【舍弃】当使用 json 格式时,生成的 json 对象将作为参数传给指定的 javascript 函数

func WithCount

func WithCount(count int) Option

WithCount 指定一次请求返回的数量

func WithDescription

func WithDescription(description string) Option

WithDescription 指定自述

func WithEmail

func WithEmail(email string) Option

WithEmail 指定电子邮件

func WithHTMLFormat

func WithHTMLFormat() Option

WithHTMLFormat 返回消息中 @ 提到的用户,网址等输出 html 链接

func WithID

func WithID(id string) Option

WithID 目标 id

func WithInReplyToID

func WithInReplyToID(msgID string) Option

WithInReplyToID 回复的私信 id

func WithInReplyToStatusID

func WithInReplyToStatusID(msgID string) Option

WithInReplyToStatusID 回复的消息 id

func WithInReplyToUserID

func WithInReplyToUserID(msgID string) Option

WithInReplyToUserID 回复的用户 id

func WithLiteMode

func WithLiteMode() Option

WithLiteMode 用户信息不包含用户自定义 profile

func WithLocation

func WithLocation(localtion string) Option

WithLocation 发布消息的地点

最多30个字符, 使用'地点名称' 或 '一个半角逗号分隔的经纬度坐标'。如:北京市海淀区 或者 39.9594049,116.298419

func WithMaxID

func WithMaxID(maxID int64) Option

WithMaxID 只返回消息 id 小于等于 max_id 的消息

func WithName

func WithName(name string) Option

WithName 指定姓名

func WithPage

func WithPage(pageID int) Option

WithPage 指定返回结果的页码

func WithRepostStatusID

func WithRepostStatusID(msgID string) Option

WithRepostStatusID 转发的消息 id

func WithSinceID

func WithSinceID(sinceID int64) Option

WithSinceID 只返回消息 id 大于 sinceID 的消息

func WithSource

func WithSource(source string) Option

WithSource 消息来源

func WithStatus

func WithStatus(status string) Option

WithStatus 描述

func WithURL

func WithURL(url string) Option

WithURL 指定自定义网址

type Photo

type Photo struct {
	Imageurl string `json:"imageurl"`
	Thumburl string `json:"thumburl"`
	Largeurl string `json:"largeurl"`
}

Photo Photo

type PhotosService

type PhotosService struct {
	// contains filtered or unexported fields
}

PhotosService Photos

func NewPhotosService

func NewPhotosService(c *http.Client, debug bool) *PhotosService

NewPhotosService NewPhotosService

func (*PhotosService) Upload

func (p *PhotosService) Upload(ctx context.Context, reader io.Reader, opts ...Option) (*Status, error)

Upload 上传图片

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/photos.upload

func (*PhotosService) UserTimeline

func (p *PhotosService) UserTimeline(ctx context.Context, opts ...Option) ([]Status, error)

UserTimeline 浏览指定用户的图片

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/photos.user-timeline

type RateLimitStatusOutput

type RateLimitStatusOutput struct {
	ResetTime          string `json:"reset_time"`
	RemainingHits      int    `json:"remaining_hits"`
	HourlyLimit        int    `json:"hourly_limit"`
	ResetTimeInSeconds int64  `json:"reset_time_in_seconds"`
}

RateLimitStatusOutput RateLimitStatusResp

type SavedSearches

type SavedSearches struct {
	ID        int    `json:"id"`
	Query     string `json:"query"`
	Name      string `json:"name"`
	CreatedAt string `json:"created_at"`
}

SavedSearches SavedSearches

type SavedSearchesService

type SavedSearchesService struct {
	// contains filtered or unexported fields
}

SavedSearchesService SavedSearchesService

func NewSavedSearchesService

func NewSavedSearchesService(c *http.Client, debug bool) *SavedSearchesService

NewSavedSearchesService NewSavedSearchesService

func (*SavedSearchesService) Create

func (s *SavedSearchesService) Create(ctx context.Context, query []string, opts ...Option) (*SavedSearches, error)

Create 收藏搜索关键字

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/saved-searches.create

func (*SavedSearchesService) Destroy

func (s *SavedSearchesService) Destroy(ctx context.Context, id int, opts ...Option) (*SavedSearches, error)

Destroy 删除收藏的搜索关键字

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/saved-searches.destroy

func (*SavedSearchesService) List

func (s *SavedSearchesService) List(ctx context.Context, opts ...Option) ([]SavedSearches, error)

List 列出登录用户保存的搜索关键字

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/saved-searches.list

func (*SavedSearchesService) Show

func (s *SavedSearchesService) Show(ctx context.Context, id int, opts ...Option) (*SavedSearches, error)

Show 返回搜索关键字的详细信息

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/saved-searches.show

type SearchService

type SearchService struct {
	// contains filtered or unexported fields
}

SearchService SearchService

func NewSearchService

func NewSearchService(c *http.Client, debug bool) *SearchService

NewSearchService new SearchService

func (*SearchService) PublicTimeline

func (s *SearchService) PublicTimeline(ctx context.Context, keywords []string, opts ...Option) ([]Status, error)

PublicTimeline 搜索全站消息(未设置隐私用户的消息)

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/search.public-timeline

func (*SearchService) UserTimeline

func (s *SearchService) UserTimeline(ctx context.Context, keywords []string, opts ...Option) ([]Status, error)

UserTimeline 搜索指定用户消息

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/search.user-timeline

func (*SearchService) Users

func (s *SearchService) Users(ctx context.Context, keywords []string, opts ...Option) (*SearchUsersOutput, error)

Users 【maybe 失效】搜索全站用户(只返回其中未被ban掉的用户)

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/search.users

type SearchUsersOutput

type SearchUsersOutput struct {
	TotalNumber int    `json:"total_number"`
	Users       []User `json:"users"`
}

SearchUsersOutput SearchUsersOutput

type Status

type Status struct {
	CreatedAt           string  `json:"created_at"`
	ID                  string  `json:"id"`
	RawID               int64   `json:"rawid"`
	Text                string  `json:"text"`
	Source              string  `json:"source"`
	Location            string  `json:"location"`
	Truncated           bool    `json:"truncated"`
	InReplyToStatusID   string  `json:"in_reply_to_status_id"`
	InReplyToUserID     string  `json:"in_reply_to_user_id"`
	InReplyToScreenName string  `json:"in_reply_to_screen_name"`
	RepostStatusID      string  `json:"repost_status_id"`
	RepostStatus        *Status `json:"repost_status"`
	RepostUserID        string  `json:"repost_user_id"`
	RepostScreenName    string  `json:"repost_screen_name"`
	Favorited           bool    `json:"favorited"`
	User                *User   `json:"user"`
	Photo               *Photo  `json:"photo"`
}

Status statuses data

type StatusesService

type StatusesService struct {
	// contains filtered or unexported fields
}

StatusesService Statuses

func NewStatusesService

func NewStatusesService(c *http.Client, debug bool) *StatusesService

NewStatusesService NewStatusesService

func (*StatusesService) ContextTimeline

func (s *StatusesService) ContextTimeline(ctx context.Context, opts ...Option) ([]Status, error)

ContextTimeline 按照时间先后顺序显示消息上下文(好友和未设置隐私用户的消息)

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.context-timeline

func (*StatusesService) Destroy

func (s *StatusesService) Destroy(ctx context.Context, msgID string, opts ...Option) (*Status, error)

Destroy 删除指定的消息

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.destroy

func (*StatusesService) Followers

func (s *StatusesService) Followers(ctx context.Context, opts ...Option) ([]User, error)

Followers 返回用户的前100个关注者

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.followers

func (*StatusesService) Friends

func (s *StatusesService) Friends(ctx context.Context, opts ...Option) ([]User, error)

Friends 返回用户好友

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.friends

func (*StatusesService) HomeTimeline

func (s *StatusesService) HomeTimeline(ctx context.Context, opts ...Option) ([]Status, error)

HomeTimeline 显示指定用户及其好友的消息(未设置隐私用户和登录用户好友的消息)

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.home-timeline

func (*StatusesService) Mentions

func (s *StatusesService) Mentions(ctx context.Context, opts ...Option) ([]Status, error)

Mentions 显示回复/提到当前用户的20条消息(未设置隐私用户和登录用户好友的消息)

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.mentions

func (*StatusesService) PublicTimeline

func (s *StatusesService) PublicTimeline(ctx context.Context, opts ...Option) ([]Status, error)

PublicTimeline 显示20条随便看看的消息(未设置隐私用户的消息)

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.public-timeline

func (*StatusesService) Replies

func (s *StatusesService) Replies(ctx context.Context, opts ...Option) ([]Status, error)

Replies 显示回复当前用户的20条消息(未设置隐私用户和登录用户好友的消息)

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.replies

func (*StatusesService) Show

func (s *StatusesService) Show(ctx context.Context, msgID string, opts ...Option) ([]Status, error)

Show 返回好友或未设置隐私用户的某条消息

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.show

func (*StatusesService) Update

func (s *StatusesService) Update(ctx context.Context, status string, opts ...Option) (*Status, error)

Update 发送消息

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.update

func (*StatusesService) UserTimeline

func (s *StatusesService) UserTimeline(ctx context.Context, opts ...Option) ([]Status, error)

UserTimeline 浏览指定用户已发送消息

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.user-timeline

type Trends struct {
	Name  string `json:"name"`
	Query string `json:"query"`
	URL   string `json:"url"`
}

Trends Trends

type TrendsListOutput

type TrendsListOutput struct {
	AsOf   string   `json:"as_of"`
	Trends []Trends `json:"trends"`
}

TrendsListOutput TrendsListOutput

type TrendsService

type TrendsService struct {
	// contains filtered or unexported fields
}

TrendsService TrendsService

func NewTrendsService

func NewTrendsService(c *http.Client, debug bool) *TrendsService

NewTrendsService NewTrendsService

func (*TrendsService) List

func (t *TrendsService) List(ctx context.Context, opts ...Option) (*TrendsListOutput, error)

List 列出饭否热门话题

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/trends.list

type UpdateNotifyNumOutput

type UpdateNotifyNumOutput struct {
	Result    string `json:"result"`
	NotifyNum string `json:"notify_num"`
}

UpdateNotifyNumOutput NotifyNumOutput

type User

type User struct {
	ID                        string  `json:"id"`
	Name                      string  `json:"name"`
	ScreenName                string  `json:"screen_name"`
	Location                  string  `json:"location"`
	Gender                    string  `json:"gender"`
	Birthday                  string  `json:"birthday"`
	Description               string  `json:"description"`
	ProfileImageURL           string  `json:"profile_image_url"`
	ProfileImageURLLarge      string  `json:"profile_image_url_large"`
	URL                       string  `json:"url"`
	Protected                 bool    `json:"protected"`
	FollowersCount            int     `json:"followers_count"`
	FriendsCount              int     `json:"friends_count"`
	FavouritesCount           int     `json:"favourites_count"`
	StatusesCount             int64   `json:"statuses_count"`
	Following                 bool    `json:"following"`
	Notifications             bool    `json:"notifications"`
	CreatedAt                 string  `json:"created_at"`
	UtcOffset                 int64   `json:"utc_offset"`
	ProfileBackgroundColor    string  `json:"profile_background_color"`
	ProfileTextColor          string  `json:"profile_text_color"`
	ProfileLinkColor          string  `json:"profile_link_color"`
	ProfileSidebarFillColor   string  `json:"profile_sidebar_fill_color"`
	ProfileSidebarBorderColor string  `json:"profile_sidebar_border_color"`
	ProfileBackgroundImageURL string  `json:"profile_background_image_url"`
	ProfileBackgroundTile     bool    `json:"profile_background_tile"`
	Status                    *Status `json:"status"`
}

User User

type UsersService

type UsersService struct {
	// contains filtered or unexported fields
}

UsersService Users

func NewUsersService

func NewUsersService(c *http.Client, debug bool) *UsersService

NewUsersService NewUsersService

func (*UsersService) CancelRecommendation

func (u *UsersService) CancelRecommendation(ctx context.Context, id string, opts ...Option) ([]User, error)

CancelRecommendation 忽略系统推荐的好友

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/users.cancel-recommendation

func (*UsersService) Followers

func (u *UsersService) Followers(ctx context.Context, opts ...Option) ([]User, error)

Followers 返回用户的最近登录的关注者

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/users.followers

func (*UsersService) Friends

func (u *UsersService) Friends(ctx context.Context, opts ...Option) ([]User, error)

Friends 返回最近登录的用户好友

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/users.friends

func (*UsersService) Recommendation

func (u *UsersService) Recommendation(ctx context.Context, opts ...Option) ([]User, error)

Recommendation 返回系统推荐的好友

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/users.recommendation

func (*UsersService) Show

func (u *UsersService) Show(ctx context.Context, opts ...Option) (*User, error)

Show 返回好友或未设置隐私用户的信息

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/users.show

func (*UsersService) TagList

func (u *UsersService) TagList(ctx context.Context, opts ...Option) ([]string, error)

TagList 获取用户标签列表

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/users.tag-list

func (*UsersService) Tagged

func (u *UsersService) Tagged(ctx context.Context, tag string, opts ...Option) ([]User, error)

Tagged 返回标记为指定标签的用户列表

https://github.com/FanfouAPI/FanFouAPIDoc/wiki/users.tagged

Jump to

Keyboard shortcuts

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