Name |
Type |
Description |
Notes |
key |
String |
The user key. This is the only mandatory user attribute. |
[optional] |
secondary |
String |
If provided, used with the user key to generate a variation in percentage rollouts |
[optional] |
ip |
String |
The user's IP address |
[optional] |
country |
String |
The user's country |
[optional] |
email |
String |
The user's email |
[optional] |
first_name |
String |
The user's first name |
[optional] |
last_name |
String |
The user's last name |
[optional] |
avatar |
String |
An absolute URL to an avatar image. |
[optional] |
name |
String |
The user's full name |
[optional] |
anonymous |
Boolean |
Whether the user is anonymous. If true, this user does not appear on the Contexts list in the LaunchDarkly user interface. |
[optional] |
custom |
Hash<String, Object> |
Any other custom attributes for this user. Custom attributes contain any other user data that you would like to use to conditionally target your users. |
[optional] |
private_attrs |
Array<String> |
A list of attribute names that are marked as private. You can use these attributes in targeting rules and segments. If you are using a server-side SDK, the SDK will not send the private attribute back to LaunchDarkly. If you are using a client-side SDK, the SDK will send the private attribute back to LaunchDarkly for evaluation. However, the SDK won't send the attribute to LaunchDarkly in events data, LaunchDarkly won't store the private attribute, and the private attribute will not appear on the Contexts list. |
[optional] |
require 'launchdarkly_api'
instance = LaunchDarklyApi::User.new(
key: user-key-123abc,
secondary: 2398127,
ip: 10.10.10.10,
country: United States,
email: sandy@example.com,
first_name: Sandy,
last_name: Smith,
avatar: http://example.com/avatar.png,
name: Sandy Smith,
anonymous: false,
custom: null,
private_attrs: null
)