krapio
Library referenceClasses

PublicSocialApi

the social feed; a player's own posts are players.feed

Constructors

Constructor

new PublicSocialApi(gapi): PublicSocialApi;

Parameters

ParameterType
gapiKrunkerClient

Returns

PublicSocialApi

Methods

feed()

feed(tab?, limit?): Promise<FeedPost[]>;

GET /social/feed?tab=, "global" is the only tab seen; an unknown one is a 400 "invalid feed tab"

Parameters

ParameterTypeDefault value
tab?string"global"
limit?numberundefined

Returns

Promise<FeedPost[]>


news()

news(): Promise<SocialNews>;

GET /social/news

Returns

Promise<SocialNews>


post()

post(postId): Promise<SocialPost>;

GET /social/post/:id, one post with its comments

Parameters

ParameterType
postIdnumber

Returns

Promise<SocialPost>

On this page