new Activities()
Handles interactions with the Activities RESTful API
- Source:
- WixClient.js
Mixes In
Methods
-
getActivities(cursor, options) → {Promise.<WixPagingData, error>}
-
Navigates the Activities found on the current site
Parameters:
Name Type Description cursorstring The current cursor
optionsGetActivitiesOptions The Activity to post
- Source:
- WixClient.js
Returns:
A promise for a
WixPagingDataobject to navigate results, or an error- Type
- Promise.<WixPagingData, error>
-
getActivityById(activityId) → {Promise.<WixActivity, error>}
-
Returns an Activity by a given ID
Parameters:
Name Type Description activityIdstring The id of the Activity to return
- Source:
- WixClient.js
Returns:
An Activity, or an error
- Type
- Promise.<WixActivity, error>
-
getTypes() → {Promise.<Array.<string>, error>}
-
Returns a list of all activity types contained within the Wix system
- Source:
- WixClient.js
Returns:
A promise for an array of strings
- Type
- Promise.<Array.<string>, error>
-
newActivity(type) → {WixActivity}
-
Creates a new WixActivity for the given
ActivityTypeParameters:
Name Type Description typeActivityType the type of Activity
- Source:
- WixClient.js
Returns:
returns an empty Wix Activity
- Type
- WixActivity
-
postActivity(activity, userSessionToken) → {Promise.<string, error>}
-
Posts the Activity to Wix. Returns a Promise for an id
Parameters:
Name Type Description activityWixActivity the Activity to post to Wix
userSessionTokenstring The current session token for active Wix user
- Source:
- WixClient.js
Returns:
A new id, or an error
- Type
- Promise.<string, error>