Activity

AniList. Activity

Access activities on AniList

Methods

(async) delete(id) → {Boolean}

Description:
  • [Require Login] Delete the current authorized user's activity post
Source:
Since:
  • 1.11.0
Parameters:
Name Type Description
id Number The AniList activity ID to delete
Returns:
Returns true if successful
Type
Boolean

get(activityID) → {ListActivity|TextActivity|MessageActivity}

Description:
  • Get a specific AniList activity by its ID.
Source:
Since:
  • 1.7.0
Parameters:
Name Type Description
activityID Number The AniList activity ID
Returns:
Returns the activity information. Activity will either appear as: ListActivity, TextActivity, MessageActivity. All of which are identifiable by the type key.
Type
ListActivity | TextActivity | MessageActivity

getUserActivity(user, page, perPage) → {Array.<Object>}

Description:
  • Fetch activities from a user.
Source:
Since:
  • 1.7.0
Parameters:
Name Type Default Description
user Number Required. Needs to be the user's AniList ID.
page Number 1 The page number to display
perPage Number 25 How many entries to display on one page. (Max is 25 per AniList limit)
Returns:
Returns a list of user activities based on the page & perPage values Contains any number of ListActivity, TextActivity, MessageActivity. All of which are identifiable by the type key.
Type
Array.<Object>

(async) postMessage(text, recipientId, isPrivate, idnullable) → {MessageActivity}

Description:
  • [Require Login] Post a new message activity or update the activity with its ID
Source:
Since:
  • 1.11.0
Parameters:
Name Type Attributes Default Description
text String The activity message text
recipientId Number The target user to send the message to
isPrivate Boolean false Set to true if it is a private message
id Number <nullable>
AniList Activity ID. Null to create, number to update.
Returns:
Type
MessageActivity

(async) postText(text, idnullable) → {TextActivity}

Description:
  • [Require Login] Post a new text activity or update the activity with its ID
Source:
Since:
  • 1.11.0
Parameters:
Name Type Attributes Description
text String The content of the activity.
id Number <nullable>
The AniList activity ID. Null to create, number for update
Returns:
Type
TextActivity