getMemberships
The method returns a list of channel memberships for a user. This method doesn't return a user's subscriptions.
Parameters
Unique user identifier. If not supplied then current user’s id is used.
Number of objects to return in the response. Default is 100, which is also the maximum value. Set limit to 0 (zero) and includeCount to true if you want to retrieve only a result count.
Use for pagination. - PNNext : Previously-returned cursor bookmark for fetching the next page. - PNPrev : Previously-returned cursor bookmark for fetching the previous page. Ignored if you also supply the start parameter.
Expression used to filter the results. Only objects whose properties satisfy the given expression are returned.
List of properties to sort by. Available options are id, name, and updated. @see PNAsc, PNDesc
Request specific elements to be available in response. Use com.pubnub.api.models.consumer.objects.membership.MembershipInclude to easily create the desired configuration.
Deprecated
This function is deprecated. Use the new getMemberships(userId, limit, page, filter, sort, MembershipInclude(...))
Replace with
getMemberships(userId, limit, page, filter, sort, com.pubnub.api.models.consumer.objects.membership.MembershipInclude(includeTotalCount = includeCount, includeCustom = includeCustom, includeChannel = true, includeChannelCustom = true, includeType = includeType))The method returns a list of channel memberships for a user. This method doesn't return a user's subscriptions.
Parameters
Unique user identifier. If not supplied then current user’s uuid is used.
Number of objects to return in the response. Default is 100, which is also the maximum value. Set limit to 0 (zero) and includeCount to true if you want to retrieve only a result count.
Use for pagination. - PNNext : Previously-returned cursor bookmark for fetching the next page. - PNPrev : Previously-returned cursor bookmark for fetching the previous page. Ignored if you also supply the start parameter.
Expression used to filter the results. Only objects whose properties satisfy the given expression are returned.
List of properties to sort by. Available options are id, name, and updated. @see PNAsc, PNDesc
Request totalCount to be included in paginated response. By default, totalCount is omitted. Default is false.
Include respective additional fields in the response.
Include custom fields for channels metadata.