Documentation ¶
Index ¶
- Variables
- func FollowUser(userId string, followingUser string)
- func GetFeedForUser(userId string, offset int) (entities.UserFeed, bool)
- func GetGlobalFeed(offset int) (entities.UserFeed, bool)
- func GetUserFollow(userId string) (map[string]interface{}, bool)
- func GetUserFollowerIds(userId string) ([]interface{}, bool)
- func SendActivity(ownerId string, details map[string]string) bool
- func SendActivityToFollowers(following string, details map[string]string) bool
- func SendActivityToUserAndFollowers(following string, details map[string]string) bool
- func SendGlobalActivity(details map[string]string) bool
- func UnfollowUser(userId string, followingUser string)
- type ActivityActions
- func (a ActivityActions) GlobalGameFinished(username string, wpm int, players int) map[string]string
- func (a ActivityActions) GuestCompletedGameActivity(wpm int) map[string]string
- func (a ActivityActions) PlayerCompletedOfflineGameActivity(username string, wpm int) map[string]string
- func (a ActivityActions) PlayerCompletedOnlineGameActivity(username string, place int, wpm int) map[string]string
- func (a ActivityActions) PlayerMakesToTopChart(username string, wpm int) map[string]string
- func (a ActivityActions) UserFollows(follower string, following string) map[string]string
- func (a ActivityActions) UserFollowsYou(follower string) map[string]string
Constants ¶
This section is empty.
Variables ¶
View Source
var Activities = ActivityActions{}
Functions ¶
func FollowUser ¶
Follows a user: Adds records from following and followers arrays for given user IDs
func GetFeedForUser ¶
Returns map of user feed items
func GetGlobalFeed ¶
Returns global feed (for /play page)
func GetUserFollow ¶
Returns followers and following users for a given user Id Example response: {following: ["user-1", "user-2"], followers: ["user-4"]}
func GetUserFollowerIds ¶
Returns followers IDs for a given User ID Example response: ["user-1", "user-2", "user-3"]
func SendActivityToFollowers ¶
func SendGlobalActivity ¶
func UnfollowUser ¶
Unfollows a user: Removes records from following and followers arrays for given user IDs
Types ¶
type ActivityActions ¶
type ActivityActions struct{}
func (ActivityActions) GlobalGameFinished ¶
func (ActivityActions) GuestCompletedGameActivity ¶
func (a ActivityActions) GuestCompletedGameActivity(wpm int) map[string]string
func (ActivityActions) PlayerCompletedOfflineGameActivity ¶
func (a ActivityActions) PlayerCompletedOfflineGameActivity(username string, wpm int) map[string]string
func (ActivityActions) PlayerCompletedOnlineGameActivity ¶
func (ActivityActions) PlayerMakesToTopChart ¶
func (a ActivityActions) PlayerMakesToTopChart(username string, wpm int) map[string]string
func (ActivityActions) UserFollows ¶
func (a ActivityActions) UserFollows(follower string, following string) map[string]string
func (ActivityActions) UserFollowsYou ¶
func (a ActivityActions) UserFollowsYou(follower string) map[string]string
Click to show internal directories.
Click to hide internal directories.