Captainup  2.4
Instance Methods | Properties | List of all members
<CPTUser> Protocol Reference

#import <CPTUser.h>

Inheritance diagram for <CPTUser>:
<CPTObject> <CPTActionableUser>

Instance Methods

(nullable id< CPTLevel >) - getLevel
 
(nullable id< CPTLevel >) - getNextLevel
 
(void) - setApplication:
 
(nonnull NSArray< NSString * > *) - getUnavailableSegmentedBadgesIDs
 
(nonnull NSArray< NSString * > *) - getUnavailableSegmentedAssetIDs
 
(nonnull NSArray< id< CPTAction >> *) - getBaseUnreadInboxItems
 
- Instance Methods inherited from <CPTObject>
(nonnull instancetype) - initWithDictionary:
 
(nonnull NSDictionary< NSString *, id > *) - toDictionary
 

Properties

NSString * userId
 
NSString * clientUserID
 
NSString * accessToken
 
NSString * name
 
NSString * imageURL
 
CPTPoint monthlyPoints
 
CPTPoint weeklyPoints
 
CPTPoint dailyPoints
 
NSDictionary< NSString *, NSNumber * > * leaderboardPositions
 
NSArray< id< CPTAction > > * privateActivities
 
NSArray< id< CPTAction > > * publicActivities
 
CPTBadgeProgressDictionarybadgeProgress
 
NSUInteger totalActionCount
 
NSDictionary< NSString *, NSNumber * > * actionCounters
 
NSString * levelID
 
NSDictionary< NSString *, NSNumber * > * currencies
 
NSArray< id< CPTAcquiredAsset > > * acquiredAssets
 
NSArray< id< CPTAvailableReward > > * availableRewards
 
- Properties inherited from <CPTObject>
NSDictionary< NSString *, id > * sourceDictionary
 

Detailed Description

The player resource provides information about an app's users. Users share basic information and details such as the user name and the avatar image across all Captain Up apps, while users' progress in each app is completely independent.

Method Documentation

◆ getBaseUnreadInboxItems()

- (nonnull NSArray<id<CPTAction>>*) getBaseUnreadInboxItems

unread inbox items

Returns
return CPTAction object array

◆ getLevel()

- (nullable id<CPTLevel>) getLevel

get user current level

Returns
return CPTLevel object

◆ getNextLevel()

- (nullable id<CPTLevel>) getNextLevel

get user next level

Returns
return CPTLevel object

◆ getUnavailableSegmentedAssetIDs()

- (nonnull NSArray<NSString*>*) getUnavailableSegmentedAssetIDs

get unavailable segmented asset ids

Returns
return NSArray of asset ids

◆ getUnavailableSegmentedBadgesIDs()

- (nonnull NSArray<NSString*>*) getUnavailableSegmentedBadgesIDs

get unavailable segmented badge ids

Returns
return NSArray of badge ids

◆ setApplication:()

- (void) setApplication: (nonnull id< CPTApplication >)  application

Description

Parameters
applicationCPTApplication object

Property Documentation

◆ accessToken

- (NSString*) accessToken
readnonatomicassign

The access token can be used in other Captain Up requests to identify the user that is currently logged in to the app. For example, this will grant permissions to see the user's private activities or to post actions for the user. The access token will be empty if the app enabled the "Secure User Integration" option and the requested user data was not signed (see CPTIntegrationUserBuilder::setSignature).

◆ acquiredAssets

- (NSArray<id<CPTAcquiredAsset> >*) acquiredAssets
readnonatomicassign

Description

◆ actionCounters

- (NSDictionary<NSString*,NSNumber*>*) actionCounters
readnonatomicassign

Information on the total number of times the user has done the app actions. The keys here are based on your app action identifiers.

Returns
A map between the action name and its counter (never null).

◆ availableRewards

- (NSArray<id<CPTAvailableReward> >*) availableRewards
readnonatomicassign

List of available rewards that user can claim.

◆ badgeProgress

- (CPTBadgeProgressDictionary*) badgeProgress
readnonatomicassign

All of the badges the user has any progress on, including the completed ones.

Returns
a map where the keys are the IDs (String) of the badges and the the values are the badge's progress information.

◆ clientUserID

- (NSString*) clientUserID
readnonatomicassign

client assigned user id

◆ currencies

- (NSDictionary<NSString*,NSNumber*>*) currencies
readnonatomicassign

Description

◆ dailyPoints

- (CPTPoint) dailyPoints
readnonatomicassign

user daily points

◆ imageURL

- (NSString*) imageURL
readnonatomicassign

user image url

◆ leaderboardPositions

- (NSDictionary<NSString*,NSNumber*>*) leaderboardPositions
readnonatomicassign

The user's position in all the leaderboards returns a map between the type of leaderboard and the the user's position.

◆ levelID

- (NSString*) levelID
readnonatomicassign

Description

◆ monthlyPoints

- (CPTPoint) monthlyPoints
readnonatomicassign

user monthly points

◆ name

- (NSString*) name
readnonatomicassign

user name

◆ privateActivities

- (NSArray<id<CPTAction> >*) privateActivities
readnonatomicassign

Description

◆ publicActivities

- (NSArray<id<CPTAction> >*) publicActivities
readnonatomicassign

Description

◆ totalActionCount

- (NSUInteger) totalActionCount
readnonatomicassign

Description

◆ userId

- (NSString*) userId
readnonatomicassign

Captain up user app specific id

◆ weeklyPoints

- (CPTPoint) weeklyPoints
readnonatomicassign

user weekly points


The documentation for this protocol was generated from the following file: