Documentation ¶
Index ¶
- Variables
- type AccountService
- func (a *AccountService) Notification(ctx context.Context) (*NotificationOutput, error)
- func (a *AccountService) NotifyNum(ctx context.Context) (*NotifyNumOutput, error)
- func (a *AccountService) RateLimitStatus(ctx context.Context, opts ...Option) (*RateLimitStatusOutput, error)
- func (a *AccountService) UpdateNotifyNum(ctx context.Context, notifyNum int) (*UpdateNotifyNumOutput, error)
- func (a *AccountService) UpdateProfile(ctx context.Context, opts ...Option) (*User, error)
- func (a *AccountService) UpdateProfileImage(ctx context.Context, reader io.Reader, opts ...Option) (*User, error)
- func (a *AccountService) VerifyCredentials(ctx context.Context, opts ...Option) (*User, error)
- type BlocksService
- func (b *BlocksService) Blocking(ctx context.Context, opts ...Option) ([]User, error)
- func (b *BlocksService) Create(ctx context.Context, id string, opts ...Option) (*User, error)
- func (b *BlocksService) Destroy(ctx context.Context, id string, opts ...Option) (*User, error)
- func (b *BlocksService) Exists(ctx context.Context, id string, opts ...Option) (*User, error)
- func (b *BlocksService) Ids(ctx context.Context) ([]string, error)
- type DirectMessages
- type DirectMessagesConversationListOutput
- type DirectMessagesService
- func (d *DirectMessagesService) Conversation(ctx context.Context, id string, opts ...Option) ([]DirectMessages, error)
- func (d *DirectMessagesService) ConversationList(ctx context.Context, opts ...Option) (*DirectMessagesConversationListOutput, error)
- func (d *DirectMessagesService) Destroy(ctx context.Context, id string, opts ...Option) (*DirectMessages, error)
- func (d *DirectMessagesService) Inbox(ctx context.Context, opts ...Option) ([]DirectMessages, error)
- func (d *DirectMessagesService) New(ctx context.Context, id, text string, opts ...Option) (*DirectMessages, error)
- func (d *DirectMessagesService) Sent(ctx context.Context, opts ...Option) ([]DirectMessages, error)
- type Fanfou
- func (f *Fanfou) AccessToken(ctx context.Context, token oauth.RequestToken, verificationCode string, ...) (*oauth.AccessToken, error)
- func (f *Fanfou) AuthorizationURL(token *oauth.RequestToken) (string, error)
- func (f *Fanfou) OAuth(accessToken *oauth.AccessToken) error
- func (f *Fanfou) RequestToken(ctx context.Context, callback string) (*oauth.RequestToken, error)
- func (f *Fanfou) XAuth(username, password string) error
- type FavoritesService
- type FollowersService
- type FriendsService
- type FriendshipsService
- func (a *FriendshipsService) Accept(ctx context.Context, id string, opts ...Option) (*User, error)
- func (a *FriendshipsService) Create(ctx context.Context, id string, opts ...Option) (*User, error)
- func (a *FriendshipsService) Deny(ctx context.Context, id string, opts ...Option) (*User, error)
- func (a *FriendshipsService) Destroy(ctx context.Context, id string, opts ...Option) (*User, error)
- func (a *FriendshipsService) Exists(ctx context.Context, idA, idB string) (bool, error)
- func (a *FriendshipsService) Requests(ctx context.Context, opts ...Option) ([]User, error)
- func (a *FriendshipsService) Show(ctx context.Context, ...) (*User, error)
- type FriendshipsShowOutput
- type NotificationOutput
- type NotifyNumOutput
- type Option
- func WithCallback(name string) Option
- func WithCount(count int) Option
- func WithDescription(description string) Option
- func WithEmail(email string) Option
- func WithHTMLFormat() Option
- func WithID(id string) Option
- func WithInReplyToID(msgID string) Option
- func WithInReplyToStatusID(msgID string) Option
- func WithInReplyToUserID(msgID string) Option
- func WithLiteMode() Option
- func WithLocation(localtion string) Option
- func WithMaxID(maxID int64) Option
- func WithName(name string) Option
- func WithPage(pageID int) Option
- func WithRepostStatusID(msgID string) Option
- func WithSinceID(sinceID int64) Option
- func WithSource(source string) Option
- func WithStatus(status string) Option
- func WithURL(url string) Option
- type Photo
- type PhotosService
- type RateLimitStatusOutput
- type SavedSearches
- type SavedSearchesService
- func (s *SavedSearchesService) Create(ctx context.Context, query []string, opts ...Option) (*SavedSearches, error)
- func (s *SavedSearchesService) Destroy(ctx context.Context, id int, opts ...Option) (*SavedSearches, error)
- func (s *SavedSearchesService) List(ctx context.Context, opts ...Option) ([]SavedSearches, error)
- func (s *SavedSearchesService) Show(ctx context.Context, id int, opts ...Option) (*SavedSearches, error)
- type SearchService
- func (s *SearchService) PublicTimeline(ctx context.Context, keywords []string, opts ...Option) ([]Status, error)
- func (s *SearchService) UserTimeline(ctx context.Context, keywords []string, opts ...Option) ([]Status, error)
- func (s *SearchService) Users(ctx context.Context, keywords []string, opts ...Option) (*SearchUsersOutput, error)
- type SearchUsersOutput
- type Status
- type StatusesService
- func (s *StatusesService) ContextTimeline(ctx context.Context, opts ...Option) ([]Status, error)
- func (s *StatusesService) Destroy(ctx context.Context, msgID string, opts ...Option) (*Status, error)
- func (s *StatusesService) Followers(ctx context.Context, opts ...Option) ([]User, error)
- func (s *StatusesService) Friends(ctx context.Context, opts ...Option) ([]User, error)
- func (s *StatusesService) HomeTimeline(ctx context.Context, opts ...Option) ([]Status, error)
- func (s *StatusesService) Mentions(ctx context.Context, opts ...Option) ([]Status, error)
- func (s *StatusesService) PublicTimeline(ctx context.Context, opts ...Option) ([]Status, error)
- func (s *StatusesService) Replies(ctx context.Context, opts ...Option) ([]Status, error)
- func (s *StatusesService) Show(ctx context.Context, msgID string, opts ...Option) ([]Status, error)
- func (s *StatusesService) Update(ctx context.Context, status string, opts ...Option) (*Status, error)
- func (s *StatusesService) UserTimeline(ctx context.Context, opts ...Option) ([]Status, error)
- type Trends
- type TrendsListOutput
- type TrendsService
- type UpdateNotifyNumOutput
- type User
- type UsersService
- func (u *UsersService) CancelRecommendation(ctx context.Context, id string, opts ...Option) ([]User, error)
- func (u *UsersService) Followers(ctx context.Context, opts ...Option) ([]User, error)
- func (u *UsersService) Friends(ctx context.Context, opts ...Option) ([]User, error)
- func (u *UsersService) Recommendation(ctx context.Context, opts ...Option) ([]User, error)
- func (u *UsersService) Show(ctx context.Context, opts ...Option) (*User, error)
- func (u *UsersService) TagList(ctx context.Context, opts ...Option) ([]string, error)
- func (u *UsersService) Tagged(ctx context.Context, tag string, opts ...Option) ([]User, error)
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 ¶
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 ¶
Blocking 获取黑名单上用户资料
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/blocks.blocking
func (*BlocksService) Create ¶
Create 把指定 id 用户加入黑名单,指定目标用户的 user_id 或者 loginname
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/blocks.create
func (*BlocksService) Destroy ¶
Destroy 将指定id用户解除黑名单
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/blocks.destroy
func (*BlocksService) Exists ¶
Exists 检查用户是否被加入了黑名单,指定目标用户的 user_id 或者 loginname
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/blocks.exists
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 ¶
func (d *DirectMessagesService) ConversationList(ctx context.Context, opts ...Option) (*DirectMessagesConversationListOutput, error)
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 NewFanFouWithClient ¶
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
func (*Fanfou) AuthorizationURL ¶
func (f *Fanfou) AuthorizationURL(token *oauth.RequestToken) (string, error)
AuthorizationURL 请求用户授权Request Token
func (*Fanfou) OAuth ¶
func (f *Fanfou) OAuth(accessToken *oauth.AccessToken) error
OAuth 使用已经生成的 AccessToken 认证
func (*Fanfou) RequestToken ¶
RequestToken 获取未授权的Request Token
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
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 ¶
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
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 ¶
Accept 接受好友请求
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/friendships.accept
func (*FriendshipsService) Create ¶
Create 添加用户为好友
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/friendships.create
func (*FriendshipsService) Deny ¶
Deny 拒绝好友请求
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/friendships.deny
func (*FriendshipsService) Destroy ¶
Destroy 取消关注好友
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/friendships.destroy
func (*FriendshipsService) Exists ¶
Exists 查询两个用户之间是否有follow关系 如果user_a关注user_b则返回 true, 否则返回false.
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/friendships.exists
func (*FriendshipsService) Requests ¶
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 ¶
NotifyNumOutput NotifyNumOutput
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option Option
func WithCallback ¶
WithCallback 【舍弃】当使用 json 格式时,生成的 json 对象将作为参数传给指定的 javascript 函数
func WithInReplyToStatusID ¶
WithInReplyToStatusID 回复的消息 id
func WithInReplyToUserID ¶
WithInReplyToUserID 回复的用户 id
func WithLocation ¶
WithLocation 发布消息的地点
最多30个字符, 使用'地点名称' 或 '一个半角逗号分隔的经纬度坐标'。如:北京市海淀区 或者 39.9594049,116.298419
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 ¶
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掉的用户)
type SearchUsersOutput ¶
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 ¶
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 ¶
Followers 返回用户的前100个关注者
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.followers
func (*StatusesService) Friends ¶
Friends 返回用户好友
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.friends
func (*StatusesService) HomeTimeline ¶
HomeTimeline 显示指定用户及其好友的消息(未设置隐私用户和登录用户好友的消息)
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.home-timeline
func (*StatusesService) Mentions ¶
Mentions 显示回复/提到当前用户的20条消息(未设置隐私用户和登录用户好友的消息)
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.mentions
func (*StatusesService) PublicTimeline ¶
PublicTimeline 显示20条随便看看的消息(未设置隐私用户的消息)
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.public-timeline
func (*StatusesService) Replies ¶
Replies 显示回复当前用户的20条消息(未设置隐私用户和登录用户好友的消息)
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.replies
func (*StatusesService) Show ¶
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 ¶
UserTimeline 浏览指定用户已发送消息
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/statuses.user-timeline
type Trends ¶
type Trends struct { Name string `json:"name"` Query string `json:"query"` URL string `json:"url"` }
Trends Trends
type TrendsListOutput ¶
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 列出饭否热门话题
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 ¶
Followers 返回用户的最近登录的关注者
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/users.followers
func (*UsersService) Friends ¶
Friends 返回最近登录的用户好友
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/users.friends
func (*UsersService) Recommendation ¶
Recommendation 返回系统推荐的好友
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/users.recommendation
func (*UsersService) TagList ¶
TagList 获取用户标签列表
https://github.com/FanfouAPI/FanFouAPIDoc/wiki/users.tag-list