Setup
To use the ActivityCounters API, install the @wix/activity-counters
package using npm or Yarn:
1npm install @wix/activity-counters
or
1yarn add @wix/activity-counters
Then import { activityCounters }
from @wix/activity-counters
:
1import { activityCounters } from '@wix/activity-counters'
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves activity counters.
Permission Scopes
For app development, you must have one of the following permission scopes:function getActivityCounters(memberId: string): Promise<GetActivityCountersResponse>
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Returns up to 100 activity counters for the provided filter and paging.
Service will return only counters that are marked as public, or private counters from apps created by the requesting third party.
Supported fields for filtering:
- memberId
Supported operations: Comparison:
- $eq
- $ne
- $in Logical:
- $and
- $not
- $or
PROPERTY | SUPPORTED FILTERS & SORTING |
---|---|
memberId | eq() ,ne() ,in() |
Permission Scopes
For app development, you must have one of the following permission scopes:function queryActivityCounters(): ActivityCountersQueryBuilder
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Sets activity counters for a member.
If a counter doesn't exist, it's created.
Counters are set under a custom key, which is an ID for the counter, and is unique per app.
Permission Scopes
For app development, you must have one of the following permission scopes:function setActivityCounters(memberId: string, counter: Counter): Promise<SetActivityCountersResponse>