feed

package
v0.0.0-...-1f9a799 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 License: MIT Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Activities = ActivityActions{}

Functions

func FollowUser

func FollowUser(userId string, followingUser string)

Follows a user: Adds records from following and followers arrays for given user IDs

func GetFeedForUser

func GetFeedForUser(userId string, offset int) (entities.UserFeed, bool)

Returns map of user feed items

func GetGlobalFeed

func GetGlobalFeed(offset int) (entities.UserFeed, bool)

Returns global feed (for /play page)

func GetUserFollow

func GetUserFollow(userId string) (map[string]interface{}, bool)

Returns followers and following users for a given user Id Example response: {following: ["user-1", "user-2"], followers: ["user-4"]}

func GetUserFollowerIds

func GetUserFollowerIds(userId string) ([]interface{}, bool)

Returns followers IDs for a given User ID Example response: ["user-1", "user-2", "user-3"]

func SendActivity

func SendActivity(ownerId string, details map[string]string) bool

func SendActivityToFollowers

func SendActivityToFollowers(following string, details map[string]string) bool

func SendActivityToUserAndFollowers

func SendActivityToUserAndFollowers(following string, details map[string]string) bool

func SendGlobalActivity

func SendGlobalActivity(details map[string]string) bool

func UnfollowUser

func UnfollowUser(userId string, followingUser string)

Unfollows a user: Removes records from following and followers arrays for given user IDs

Types

type ActivityActions

type ActivityActions struct{}

func (ActivityActions) GlobalGameFinished

func (a ActivityActions) GlobalGameFinished(username string, wpm int, players int) map[string]string

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 (a ActivityActions) PlayerCompletedOnlineGameActivity(username string, place int, wpm int) map[string]string

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

Jump to

Keyboard shortcuts

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