Profile
Profile
is an object that contains guest information
set
Returns Profile
object with setting name
public func set(name: String) -> Profile
-(Profile * _Nonnull)setName:(NSString *)name
parameter | type | description |
---|---|---|
name | String | user name |
set
Returns Profile
object with setting avatar url
public func set(avatarUrl: String) -> Profile
- (Profile * _Nonnull)setWithAvatarUrl:(NSString * _Nonnull)avatarUrl
parameter | type | description |
---|---|---|
avatarUrl | String | a url of user avatar image |
set
Returns Profile
object with setting mobile number
public func set(mobileNumber: String) -> Profile
- (Profile * _Nonnull)setWithMobileNumber:(NSString * _Nonnull)mobileNumber
parameter | type | description |
---|---|---|
mobileNumber | String | a mobile number |
set
Returns Profile
object with setting email
public func set(email: String) -> Profile
- (Profile * _Nonnull)setWithEmail:(NSString * _Nonnull)email;
set
Returns Profile
object with setting property data
public func set(propertyKey: String, value:Any) -> Profile
- (Profile * _Nonnull)setWithPropertyKey:(NSString * _Nonnull)propertyKey value:(id _Nonnull)value
parameter | type | description |
---|---|---|
propertyKey | String | meta key |
value | Any | a value |
Since all of methods return object itself, you can chain methods in swift
let profile = Profile()
profile
.set(name: "ZOYI")
.set(avatarUrl: "http://channel.io")
.set(mobileNumber: "+8201012345678")
.set(propertyKey: "DNA", value: "Sexy")
.set(propertyKey: "Potential", value: 1000000)
Guest *guest = [[Guest alloc] init];
[guest setWithName:@"ZOYI"];
[guest setWithId:@"123"];
[guest setWithAvatarUrl:@"http://channel.io"];
[guest setWithMobileNumber:@"+8201012345678"];
[guest setWithPropertyKey:@"DNA" value:@"Sexy"];
[guest setWithPropertyKey:@"Potential" value:@(100000)];
Updated 4 months ago