Library referenceClasses
PublicSocialApi
the social feed; a player's own posts are players.feed
Constructors
Constructor
new PublicSocialApi(gapi): PublicSocialApi;Parameters
| Parameter | Type |
|---|---|
gapi | KrunkerClient |
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
| Parameter | Type | Default value |
|---|---|---|
tab? | string | "global" |
limit? | number | undefined |
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
| Parameter | Type |
|---|---|
postId | number |
Returns
Promise<SocialPost>