Inherits from NSObject
Declared in LUUserRequestFactory.h
LUUserRequestFactory.m

Overview

LUTicketRequestFactory is used to build requests related to users.

Class Methods

requestForCurrentUser

Builds a request to return the current user. This is a convenience method to call requestForUserWithID: with the userID of the cached user object.

+ (LUAPIRequest *)requestForCurrentUser

Discussion

Builds a request to return the current user. This is a convenience method to call requestForUserWithID: with the userID of the cached user object.

On success, this request will return an LUUser instance.

Warning: This request requires an access token with the LUPermissionReadUserBasicInfo permission.

Declared In

LUUserRequestFactory.h

requestForUserWithID:

Builds a request to fetch the user with the given user ID. (Deprecated: This method has been deprecated. Use requestForCurrentUser instead.)

+ (LUAPIRequest *)requestForUserWithID:(NSNumber *)userID

Parameters

userID

The ID for the user requested.

Discussion

Builds a request to fetch the user with the given user ID.

On success, this request will return an LUUser instance.

Declared In

LUUserRequestFactory.h

requestToCreateUser:

Builds a request to create a user.

+ (LUAPIRequest *)requestToCreateUser:(LUUser *)user

Parameters

user

The LUUser to create.

Discussion

Builds a request to create a user.

Note that usually you will want to use requestToCreateUser:withPermissions: so that you can include a list of permissions along with the user information.

On success, this request will return the newly created LUUser.

Warning: Use of this request requires an Enterprise SDK license.

Declared In

LUUserRequestFactory.h

requestToCreateUser:withPermissions:

Builds a request to create a user along with an array of permissions.

+ (LUAPIRequest *)requestToCreateUser:(LUUser *)user withPermissions:(NSArray *)permissions

Parameters

user

The LUUser to create.

permissions

An array of permission names. For a full list of possible permissions, see http://developer.thelevelup.com/getting-started/permissions-list/

Discussion

Builds a request to create a user along with an array of permissions.

On success, this request will return an LUUserWithAccessToken containing the newly created LUUser and the LUAccessToken.

Declared In

LUUserRequestFactory.h

requestToResetPasswordWithEmail:

Builds a request to reset the password of a user.

+ (LUAPIRequest *)requestToResetPasswordWithEmail:(NSString *)email

Parameters

email

An email address.

Discussion

Builds a request to reset the password of a user.

On success, this request will return nil.

Warning: Use of this request requires an Enterprise SDK license.

Declared In

LUUserRequestFactory.h

requestToUpdateUser:

Builds a request to update a user.

+ (LUAPIRequest *)requestToUpdateUser:(LUUser *)user

Parameters

user

The LUUser to update.

Discussion

Builds a request to update a user.

On success, this request will return the updated LUUser.

Warning: Use of this request requires an Enterprise SDK license.

Declared In

LUUserRequestFactory.h