client.achievements.all() -> Internal::Types::Array[Trophy::Types::AchievementWithStatsResponse]
-
-
-
Get all achievements and their completion stats.
-
-
-
client.achievements.all(user_attributes: "plan-type:premium,region:us-east")
-
-
-
user_attributes:
Stringβ Optional colon-delimited user attributes in the format attribute:value,attribute:value. Only achievements accessible to a user with the provided attributes will be returned.
-
request_options:
Trophy::Achievements::RequestOptions
-
-
client.achievements.complete(key, request) -> Trophy::Types::AchievementCompletionResponse
-
-
-
Mark an achievement as completed for a user.
-
-
-
client.achievements.complete( key: "finish-onboarding", user: { email: "user@example.com", tz: "Europe/London", id: "user-id" } )
-
-
-
key:
Stringβ Unique reference of the achievement as set when created.
-
user:
Trophy::Types::UpsertedUserβ The user that completed the achievement.
-
request_options:
Trophy::Achievements::RequestOptions
-
-
client.metrics.event(key, request) -> Trophy::Types::EventResponse
-
-
-
Increment or decrement the value of a metric for a user.
-
-
-
client.metrics.event( key: "words-written", idempotency_key: "e4296e4b-8493-4bd1-9c30-5a1a9ac4d78f", user: { email: "user@example.com", tz: "Europe/London", attributes: { department: "engineering", role: "developer" }, id: "18" }, value: 750, attributes: { category: "writing", source: "mobile-app" } )
-
-
-
key:
Stringβ Unique reference of the metric as set when created.
-
idempotency_key:
Stringβ The idempotency key for the event.
-
user:
Trophy::Types::UpsertedUserβ The user that triggered the event.
-
value:
Integerβ The value to add to the user's current total for the given metric.
-
attributes:
Internal::Types::Hash[String, String]β Event attributes as key-value pairs. Keys must match existing event attributes set up in the Trophy dashboard.
-
request_options:
Trophy::Metrics::RequestOptions
-
-
client.users.create(request) -> Trophy::Types::User
-
-
-
Create a new user.
-
-
-
client.users.create(id: "user-id")
-
-
-
request:
Trophy::Types::UpsertedUser
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.get(id) -> Trophy::Types::User
-
-
-
Get a single user.
-
-
-
client.users.get(id: "userId")
-
-
-
id:
Stringβ ID of the user to get.
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.identify(id, request) -> Trophy::Types::User
-
-
-
Identify a user.
-
-
-
client.users.identify( id: "id", email: "user@example.com", tz: "Europe/London", attributes: { department: "engineering", role: "developer" } )
-
-
-
id:
Stringβ ID of the user to identify.
-
request:
Trophy::Types::UpdatedUserβ The user object.
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.update(id, request) -> Trophy::Types::User
-
-
-
Update a user.
-
-
-
client.users.update( id: "id", email: "user@example.com", tz: "Europe/London", attributes: { department: "engineering", role: "developer" } )
-
-
-
id:
Stringβ ID of the user to update.
-
request:
Trophy::Types::UpdatedUserβ The user object.
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.get_preferences(id) -> Trophy::Types::UserPreferencesResponse
-
-
-
Get a user's notification preferences.
-
-
-
client.users.get_preferences(id: "user-123")
-
-
-
id:
Stringβ The user's ID in your database.
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.update_preferences(id, request) -> Trophy::Types::UserPreferencesResponse
-
-
-
Update a user's notification and streak preferences. Streak preferences require streak customization to be enabled in your Trophy dashboard settings.
-
-
-
client.users.update_preferences( id: "user-123", notifications: { streak_reminder: ["email"] } )
-
-
-
id:
Stringβ The user's ID in your database.
-
notifications:
Trophy::Types::NotificationPreferences
-
streak:
Trophy::Types::StreakPreferences
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.all_metrics(id) -> Internal::Types::Array[Trophy::Types::MetricResponse]
-
-
-
Get a single user's progress against all active metrics.
-
-
-
client.users.all_metrics(id: "userId")
-
-
-
id:
Stringβ ID of the user
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.single_metric(id, key) -> Trophy::Types::MetricResponse
-
-
-
Get a user's progress against a single active metric.
-
-
-
client.users.single_metric( id: "userId", key: "key" )
-
-
-
id:
Stringβ ID of the user.
-
key:
Stringβ Unique key of the metric.
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.metric_event_summary(id, key) -> Internal::Types::Array[Trophy::Users::Types::UsersMetricEventSummaryResponseItem]
-
-
-
Get a summary of metric events over time for a user.
-
-
-
client.users.metric_event_summary( id: "userId", key: "words-written", aggregation: "daily", start_date: "2024-01-01", end_date: "2024-01-31" )
-
-
-
id:
Stringβ ID of the user.
-
key:
Stringβ Unique key of the metric.
-
aggregation:
Trophy::Users::Types::UsersMetricEventSummaryRequestAggregationβ The time period over which to aggregate the event data.
-
start_date:
Stringβ The start date for the data range in YYYY-MM-DD format. The startDate must be before the endDate, and the date range must not exceed 400 days.
-
end_date:
Stringβ The end date for the data range in YYYY-MM-DD format. The endDate must be after the startDate, and the date range must not exceed 400 days.
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.achievements(id) -> Internal::Types::Array[Trophy::Types::UserAchievementWithStatsResponse]
-
-
-
Get a user's achievements.
-
-
-
client.users.achievements( id: "userId", include_incomplete: "true" )
-
-
-
id:
Stringβ ID of the user.
-
include_incomplete:
Stringβ When set to 'true', returns both completed and incomplete achievements for the user. When omitted or set to any other value, returns only completed achievements.
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.streak(id) -> Trophy::Types::StreakResponse
-
-
-
Get a user's streak data.
-
-
-
client.users.streak( id: "userId", history_periods: 1 )
-
-
-
id:
Stringβ ID of the user.
-
history_periods:
Integerβ The number of past streak periods to include in the streakHistory field of the response.
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.points(id, key) -> Trophy::Types::GetUserPointsResponse
-
-
-
Get a user's points for a specific points system.
-
-
-
client.users.points( id: "userId", key: "points-system-key", awards: 1 )
-
-
-
id:
Stringβ ID of the user.
-
key:
Stringβ Key of the points system.
-
awards:
Integerβ The number of recent point awards to return.
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.points_boosts(id, key) -> Internal::Types::Array[Trophy::Types::PointsBoost]
-
-
-
Get active points boosts for a user in a specific points system. Returns both global boosts the user is eligible for and user-specific boosts.
-
-
-
client.users.points_boosts( id: "userId", key: "points-system-key" )
-
-
-
id:
Stringβ ID of the user.
-
key:
Stringβ Key of the points system.
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.points_event_summary(id, key) -> Internal::Types::Array[Trophy::Users::Types::UsersPointsEventSummaryResponseItem]
-
-
-
Get a summary of points awards over time for a user for a specific points system.
-
-
-
client.users.points_event_summary( id: "userId", key: "points-system-key", aggregation: "daily", start_date: "2024-01-01", end_date: "2024-01-31" )
-
-
-
id:
Stringβ ID of the user.
-
key:
Stringβ Key of the points system.
-
aggregation:
Trophy::Users::Types::UsersPointsEventSummaryRequestAggregationβ The time period over which to aggregate the event data.
-
start_date:
Stringβ The start date for the data range in YYYY-MM-DD format. The startDate must be before the endDate, and the date range must not exceed 400 days.
-
end_date:
Stringβ The end date for the data range in YYYY-MM-DD format. The endDate must be after the startDate, and the date range must not exceed 400 days.
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.leaderboard(id, key) -> Trophy::Types::UserLeaderboardResponseWithHistory
-
-
-
Get a user's rank, value, and daily ranking history for a specific leaderboard.
-
-
-
client.users.leaderboard( id: "user-123", key: "weekly-words", run: "2025-01-15", num_events: 1 )
-
-
-
id:
Stringβ The user's ID in your database.
-
key:
Stringβ Unique key of the leaderboard as set when created.
-
run:
Stringβ Specific run date in YYYY-MM-DD format. If not provided, returns the current run.
-
num_events:
Integerβ The number of days to return in the leaderboard history for the user.
-
request_options:
Trophy::Users::RequestOptions
-
-
client.users.wrapped(id) -> Trophy::Types::WrappedResponse
-
-
-
Get a user's year-in-review wrapped data.
-
-
-
client.users.wrapped( id: "user-123", year: 1 )
-
-
-
id:
Stringβ The user's ID in your database.
-
year:
Integerβ The year to get wrapped data for. Defaults to the current year. Must be an integer between 1 and the current year.
-
request_options:
Trophy::Users::RequestOptions
-
-
client.streaks.list() -> Internal::Types::Array[Trophy::Types::BulkStreakResponseItem]
-
-
-
Get the streak lengths of a list of users, ranked by streak length from longest to shortest.
-
-
-
client.streaks.list(user_ids: ["userIds"])
-
-
-
user_ids:
Stringβ A list of up to 100 user IDs.
-
request_options:
Trophy::Streaks::RequestOptions
-
-
client.points.summary(key) -> Internal::Types::Array[Trophy::Types::PointsRange]
-
-
-
Get a breakdown of the number of users with points in each range.
-
-
-
client.points.summary( key: "points-system-key", user_attributes: "plan-type:premium,region:us-east" )
-
-
-
key:
Stringβ Key of the points system.
-
user_attributes:
Stringβ Optional colon-delimited user attribute filters in the format attribute:value,attribute:value. Only users matching ALL specified attributes will be included in the points breakdown.
-
request_options:
Trophy::Points::RequestOptions
-
-
client.points.system(key) -> Trophy::Types::PointsSystemResponse
-
-
-
Get a points system with its triggers.
-
-
-
client.points.system(key: "points-system-key")
-
-
-
key:
Stringβ Key of the points system.
-
request_options:
Trophy::Points::RequestOptions
-
-
client.points.boosts(key) -> Internal::Types::Array[Trophy::Types::PointsBoost]
-
-
-
Get all global boosts for a points system. Finished boosts are excluded by default.
-
-
-
client.points.boosts( key: "points-system-key", include_finished: true )
-
-
-
key:
Stringβ Key of the points system.
-
include_finished:
Internal::Types::Booleanβ When set to 'true', boosts that have finished (past their end date) will be included in the response. By default, finished boosts are excluded.
-
request_options:
Trophy::Points::RequestOptions
-
-
client.points.levels(key) -> Internal::Types::Array[Trophy::Types::PointsLevel]
-
-
-
Get all levels for a points system.
-
-
-
client.points.levels(key: "points-system-key")
-
-
-
key:
Stringβ Key of the points system.
-
request_options:
Trophy::Points::RequestOptions
-
-
client.points.level_summary(key) -> Internal::Types::Array[Trophy::Types::PointsLevelSummaryResponseItem]
-
-
-
Get a breakdown of the number of users at each level in a points system.
-
-
-
client.points.level_summary(key: "points-system-key")
-
-
-
key:
Stringβ Key of the points system.
-
request_options:
Trophy::Points::RequestOptions
-
-
client.leaderboards.all() -> Internal::Types::Array[Trophy::Leaderboards::Types::LeaderboardsAllResponseItem]
-
-
-
Get all leaderboards for your organization. Finished leaderboards are excluded by default.
-
-
-
client.leaderboards.all(include_finished: true)
-
-
-
include_finished:
Internal::Types::Booleanβ When set to 'true', leaderboards with status 'finished' will be included in the response. By default, finished leaderboards are excluded.
-
request_options:
Trophy::Leaderboards::RequestOptions
-
-
client.leaderboards.get(key) -> Trophy::Types::LeaderboardResponseWithRankings
-
-
-
Get a specific leaderboard by its key.
-
-
-
client.leaderboards.get( key: "weekly-words", offset: 1, limit: 1, run: "2025-01-15", user_id: "user-123", user_attributes: "city:London" )
-
-
-
key:
Stringβ Unique key of the leaderboard as set when created.
-
offset:
Integerβ Number of rankings to skip for pagination.
-
limit:
Integerβ Maximum number of rankings to return. Cannot be greater than the size of the leaderboard.
-
run:
Stringβ Specific run date in YYYY-MM-DD format. If not provided, returns the current run.
-
user_id:
Stringβ When provided, offset is relative to this user's position on the leaderboard. If the user is not found in the leaderboard, returns empty rankings array.
-
user_attributes:
Stringβ Attribute key and value to filter the rankings by, separated by a colon. For example,city:London. This parameter is required, and only valid for leaderboards with a breakdown attribute.
-
request_options:
Trophy::Leaderboards::RequestOptions
-
-
client.admin.attributes.list() -> Internal::Types::Array[Trophy::Types::AdminAttribute]
-
-
-
List attributes.
-
-
-
client.admin.attributes.list( limit: 1, skip: 1 )
-
-
-
limit:
Integerβ Number of records to return.
-
skip:
Integerβ Number of records to skip from the start of the list.
-
request_options:
Trophy::Admin::Attributes::RequestOptions
-
-
client.admin.attributes.create(request) -> Trophy::Types::CreateAttributesResponse
-
-
-
Create attributes.
-
-
-
client.admin.attributes.create(request: [{ name: "Plan", key: "plan", type: "user" }, { name: "Device", key: "device", type: "event" }])
-
-
-
request:
Internal::Types::Array[Trophy::Types::CreateAttributeRequestItem]
-
request_options:
Trophy::Admin::Attributes::RequestOptions
-
-
client.admin.attributes.delete() -> Trophy::Types::DeleteAttributesResponse
-
-
-
Delete attributes by ID.
-
-
-
client.admin.attributes.delete(ids: %w[550e8400-e29b-41d4-a716-446655440000 550e8400-e29b-41d4-a716-446655440001])
-
-
-
ids:
Stringβ Attribute IDs to delete. Repeat the query param or provide a comma-separated list.
-
request_options:
Trophy::Admin::Attributes::RequestOptions
-
-
client.admin.attributes.update(request) -> Trophy::Types::UpdateAttributesResponse
-
-
-
Update attributes by ID.
-
-
-
client.admin.attributes.update(request: [{ id: "550e8400-e29b-41d4-a716-446655440000", name: "Subscription Plan" }])
-
-
-
request:
Internal::Types::Array[Trophy::Types::UpdateAttributeRequestItem]
-
request_options:
Trophy::Admin::Attributes::RequestOptions
-
-
client.admin.attributes.get(id) -> Trophy::Types::AdminAttribute
-
-
-
Get an attribute by ID.
-
-
-
client.admin.attributes.get(id: "550e8400-e29b-41d4-a716-446655440000")
-
-
-
id:
Stringβ The UUID of the attribute to retrieve.
-
request_options:
Trophy::Admin::Attributes::RequestOptions
-
-
client.admin.metrics.list() -> Internal::Types::Array[Trophy::Types::CreatedMetric]
-
-
-
List metrics.
-
-
-
client.admin.metrics.list( limit: 1, skip: 1 )
-
-
-
limit:
Integerβ Number of records to return.
-
skip:
Integerβ Number of records to skip from the start of the list.
-
request_options:
Trophy::Admin::Metrics::RequestOptions
-
-
client.admin.metrics.create(request) -> Trophy::Types::CreateMetricsResponse
-
-
-
Create metrics.
-
-
-
client.admin.metrics.create(request: [{ name: "Invites Sent", key: "invites-sent" }, { name: "Revenue", key: "revenue", unit_type: "currency", units: "USD" }])
-
-
-
request:
Internal::Types::Array[Trophy::Types::CreateMetricRequestItem]
-
request_options:
Trophy::Admin::Metrics::RequestOptions
-
-
client.admin.metrics.delete() -> Trophy::Types::DeleteMetricsResponse
-
-
-
Delete metrics by ID.
-
-
-
client.admin.metrics.delete(ids: %w[550e8400-e29b-41d4-a716-446655440000 550e8400-e29b-41d4-a716-446655440001])
-
-
-
ids:
Stringβ Metric IDs to delete. Repeat the query param or provide a comma-separated list.
-
request_options:
Trophy::Admin::Metrics::RequestOptions
-
-
client.admin.metrics.update(request) -> Trophy::Types::UpdateMetricsResponse
-
-
-
Update metrics by ID.
-
-
-
client.admin.metrics.update(request: [{ id: "550e8400-e29b-41d4-a716-446655440000", name: "Invites Completed", units: "invites" }, { id: "550e8400-e29b-41d4-a716-446655440001", unit_type: "number", units: "dollars" }])
-
-
-
request:
Internal::Types::Array[Trophy::Types::UpdateMetricRequestItem]
-
request_options:
Trophy::Admin::Metrics::RequestOptions
-
-
client.admin.metrics.get(id) -> Trophy::Types::CreatedMetric
-
-
-
Get a metric by ID.
-
-
-
client.admin.metrics.get(id: "550e8400-e29b-41d4-a716-446655440000")
-
-
-
id:
Stringβ The UUID of the metric to retrieve.
-
request_options:
Trophy::Admin::Metrics::RequestOptions
-
-
client.admin.metrics.batch_events(request) -> Trophy::Types::BatchEventsResponse
-
-
-
Submit up to 1,000 metric events for asynchronous processing.
-
-
-
client.admin.metrics.batch_events(request: [{ key: "words-written", user: { id: "18", email: "user@example.com", tz: "Europe/London", attributes: { department: "engineering", role: "developer" } }, value: 750, attributes: { category: "writing", source: "mobile-app" }, idempotency_key: "e4296e4b-8493-4bd1-9c30-5a1a9ac4d78f" }])
-
-
-
request:
Internal::Types::Array[Trophy::Types::BatchMetricEvent]
-
request_options:
Trophy::Admin::Metrics::RequestOptions
-
-
client.admin.leaderboards.list() -> Internal::Types::Array[Trophy::Types::AdminLeaderboard]
-
-
-
List leaderboards.
-
-
-
client.leaderboards.all
-
-
-
limit:
Integerβ Number of records to return.
-
skip:
Integerβ Number of records to skip from the start of the list.
-
request_options:
Trophy::Admin::Leaderboards::RequestOptions
-
-
client.admin.leaderboards.create(request) -> Trophy::Types::CreateLeaderboardsResponse
-
-
-
Create leaderboards. Maximum 100 leaderboards per request.
-
-
-
client.admin.leaderboards.create(request: [{ name: "Revenue Champions", key: "revenue-champions", status: "inactive", rank_by: "metric", metric_id: "550e8400-e29b-41d4-a716-446655440000", max_participants: 100, start: "2026-04-20", breakdown_attributes: ["550e8400-e29b-41d4-a716-446655440010"], run_unit: "month", run_interval: 1 }, { name: "Streak Legends", key: "streak-legends", status: "scheduled", rank_by: "streak", start: "2026-04-27" }])
-
-
-
request:
Internal::Types::Array[Trophy::Types::CreateLeaderboardRequestItem]
-
request_options:
Trophy::Admin::Leaderboards::RequestOptions
-
-
client.admin.leaderboards.delete() -> Trophy::Types::DeleteLeaderboardsResponse
-
-
-
Delete leaderboards by ID.
-
-
-
client.admin.leaderboards.delete(ids: ["ids"])
-
-
-
ids:
Stringβ Leaderboard IDs to delete. Repeat the query param or provide a comma-separated list.
-
request_options:
Trophy::Admin::Leaderboards::RequestOptions
-
-
client.admin.leaderboards.update(request) -> Trophy::Types::UpdateLeaderboardsResponse
-
-
-
Update leaderboards by ID. Updating
statusbehaves the same as activating, scheduling, deactivating, or finishing a leaderboard in the dashboard.
-
-
-
client.admin.leaderboards.update(request: [{ id: "550e8400-e29b-41d4-a716-446655440100", name: "Monthly Revenue Champions", description: "Ranked by monthly revenue", status: "active" }, { id: "550e8400-e29b-41d4-a716-446655440101", status: "finished" }])
-
-
-
request:
Internal::Types::Array[Trophy::Types::UpdateLeaderboardRequestItem]
-
request_options:
Trophy::Admin::Leaderboards::RequestOptions
-
-
client.admin.leaderboards.get(id) -> Trophy::Types::AdminLeaderboard
-
-
-
Get a leaderboard by ID.
-
-
-
client.admin.leaderboards.get(id: "550e8400-e29b-41d4-a716-446655440100")
-
-
-
id:
Stringβ The UUID of the leaderboard to retrieve.
-
request_options:
Trophy::Admin::Leaderboards::RequestOptions
-
-
client.admin.streaks.restore(request) -> Trophy::Types::RestoreStreaksResponse
-
-
-
Restore streaks for multiple users to the maximum previously achieved streak length found within the current restore window: the last 90 days for daily streaks, weekly periods starting with the week containing the start of the current calendar year for weekly streaks, and monthly periods starting at the beginning of the previous calendar year for monthly streaks.
-
-
-
client.admin.streaks.restore(users: [{ id: "user-123" }, { id: "user-456" }])
-
-
-
users:
Internal::Types::Array[Trophy::Admin::Streaks::Types::RestoreStreaksRequestUsersItem]β Array of users to restore streaks for. Maximum 100 users per request.
-
request_options:
Trophy::Admin::Streaks::RequestOptions
-
-
client.admin.application_api_keys.create(request) -> Trophy::Types::CreateApplicationKeysResponse
-
-
-
Create application API keys scoped to specific users. Each key can only perform operations on behalf of the user it was created for.
-
-
-
client.admin.application_api_keys.create(request: [{ user_id: "user_123" }, { user_id: "user_456" }])
-
-
-
request:
Internal::Types::Array[Trophy::Types::CreateApplicationKeyRequestItem]
-
request_options:
Trophy::Admin::ApplicationApiKeys::RequestOptions
-
-
client.admin.application_api_keys.delete() -> Trophy::Types::DeleteApplicationKeysResponse
-
-
-
Delete application API keys by ID.
-
-
-
client.admin.application_api_keys.delete(ids: ["550e8400-e29b-41d4-a716-446655440000"])
-
-
-
ids:
Stringβ Application API key IDs (UUIDs returned at creation time). Repeat the query param or provide a comma-separated list. Maximum 100 IDs per request.
-
request_options:
Trophy::Admin::ApplicationApiKeys::RequestOptions
-
-
client.admin.tenants.list() -> Internal::Types::Array[Trophy::Types::AdminTenant]
-
-
-
List tenants in the current environment.
-
-
-
client.admin.tenants.list( limit: 1, skip: 1 )
-
-
-
limit:
Integerβ Number of records to return.
-
skip:
Integerβ Number of records to skip from the start of the list.
-
request_options:
Trophy::Admin::Tenants::RequestOptions
-
-
client.admin.tenants.create(request) -> Trophy::Types::CreateTenantsResponse
-
-
-
Create tenants.
-
-
-
client.admin.tenants.create(request: [{ customer_id: "customer_12345", name: "Acme Corp" }, { customer_id: "customer_67890", name: "Globex Inc" }])
-
-
-
request:
Internal::Types::Array[Trophy::Types::CreateTenantRequestItem]
-
request_options:
Trophy::Admin::Tenants::RequestOptions
-
-
client.admin.tenants.delete() -> Trophy::Types::DeleteTenantsResponse
-
-
-
Delete tenants by ID.
-
-
-
client.admin.tenants.delete(ids: %w[550e8400-e29b-41d4-a716-446655440000 550e8400-e29b-41d4-a716-446655440001])
-
-
-
ids:
Stringβ Tenant IDs to delete. Repeat the query param or provide a comma-separated list.
-
request_options:
Trophy::Admin::Tenants::RequestOptions
-
-
client.admin.tenants.update(request) -> Trophy::Types::UpdateTenantsResponse
-
-
-
Update tenants by ID.
-
-
-
client.admin.tenants.update(request: [{ id: "550e8400-e29b-41d4-a716-446655440000", name: "Acme Corporation" }])
-
-
-
request:
Internal::Types::Array[Trophy::Types::UpdateTenantRequestItem]
-
request_options:
Trophy::Admin::Tenants::RequestOptions
-
-
client.admin.tenants.get(id) -> Trophy::Types::AdminTenant
-
-
-
Get a tenant by ID.
-
-
-
client.admin.tenants.get(id: "550e8400-e29b-41d4-a716-446655440000")
-
-
-
id:
Stringβ The UUID of the tenant to retrieve.
-
request_options:
Trophy::Admin::Tenants::RequestOptions
-
-
client.admin.points.systems.list() -> Internal::Types::Array[Trophy::Types::AdminPointsSystem]
-
-
-
List points systems.
-
-
-
client.admin.points.systems.list( limit: 1, skip: 1 )
-
-
-
limit:
Integerβ Number of records to return.
-
skip:
Integerβ Number of records to skip from the start of the list.
-
request_options:
Trophy::Admin::Points::Systems::RequestOptions
-
-
client.admin.points.systems.create(request) -> Trophy::Types::CreatePointsSystemsResponse
-
-
-
Create points systems. Optionally include sub-entities (levels, boosts, triggers) in each system payload to create them alongside the system.
-
-
-
client.admin.points.systems.create(request: [{ name: "XP", key: "xp", description: "Experience points", levels: [{ name: "Bronze", key: "bronze", points: 100 }, { name: "Silver", key: "silver", points: 500 }] }])
-
-
-
request:
Internal::Types::Array[Trophy::Types::CreatePointsSystemRequestItem]
-
request_options:
Trophy::Admin::Points::Systems::RequestOptions
-
-
client.admin.points.systems.delete() -> Trophy::Types::DeletePointsSystemsResponse
-
-
-
Delete points systems by ID.
-
-
-
client.admin.points.systems.delete(ids: ["550e8400-e29b-41d4-a716-446655440000"])
-
-
-
ids:
Stringβ The IDs of the points systems to delete.
-
request_options:
Trophy::Admin::Points::Systems::RequestOptions
-
-
client.admin.points.systems.update(request) -> Trophy::Types::UpdatePointsSystemsResponse
-
-
-
Update points systems by ID.
-
-
-
client.admin.points.systems.update(request: [{ id: "550e8400-e29b-41d4-a716-446655440000", name: "New Name" }])
-
-
-
request:
Internal::Types::Array[Trophy::Types::UpdatePointsSystemRequestItem]
-
request_options:
Trophy::Admin::Points::Systems::RequestOptions
-
-
client.admin.points.systems.get(id) -> Trophy::Types::AdminPointsSystem
-
-
-
Get a points system by ID.
-
-
-
client.admin.points.systems.get(id: "550e8400-e29b-41d4-a716-446655440000")
-
-
-
id:
Stringβ The ID of the points system.
-
request_options:
Trophy::Admin::Points::Systems::RequestOptions
-
-
client.admin.points.boosts.list(system_id) -> Internal::Types::Array[Trophy::Types::AdminPointsBoost]
-
-
-
List points boosts for a system.
-
-
-
client.admin.points.boosts.list( system_id: "550e8400-e29b-41d4-a716-446655440000", limit: 1, skip: 1 )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
limit:
Integerβ Maximum number of results to return (1-100, default 10).
-
skip:
Integerβ Number of results to skip for pagination (default 0).
-
request_options:
Trophy::Admin::Points::Boosts::RequestOptions
-
-
client.admin.points.boosts.create(system_id, request) -> Trophy::Types::CreatePointsBoostsResponse
-
-
-
Create points boosts.
-
-
-
client.admin.points.boosts.create( system_id: "550e8400-e29b-41d4-a716-446655440000", request: [{ user_id: "user-123", name: "Double XP Weekend", start: "2024-01-01", end_: "2024-01-03", multiplier: 2 }] )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
request:
Internal::Types::Array[Trophy::Types::CreatePointsBoostRequestItem]
-
request_options:
Trophy::Admin::Points::Boosts::RequestOptions
-
-
client.admin.points.boosts.delete(system_id) -> Trophy::Types::DeletePointsBoostsResponse
-
-
-
Delete multiple points boosts by ID.
-
-
-
client.admin.points.boosts.delete( system_id: "550e8400-e29b-41d4-a716-446655440000", ids: ["ids"] )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
ids:
Stringβ A list of up to 100 boost IDs.
-
request_options:
Trophy::Admin::Points::Boosts::RequestOptions
-
-
client.admin.points.boosts.update(system_id, request) -> Trophy::Types::PatchPointsBoostsResponse
-
-
-
Update multiple points boosts.
-
-
-
client.admin.points.boosts.update( system_id: "550e8400-e29b-41d4-a716-446655440000", request: [{ id: "550e8400-e29b-41d4-a716-446655440000", name: "Updated Boost Name", multiplier: 3 }] )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
request:
Internal::Types::Array[Trophy::Types::PatchPointsBoostsRequestItem]
-
request_options:
Trophy::Admin::Points::Boosts::RequestOptions
-
-
client.admin.points.boosts.get(system_id, id) -> Trophy::Types::AdminPointsBoost
-
-
-
Get a single points boost by ID.
-
-
-
client.admin.points.boosts.get( system_id: "550e8400-e29b-41d4-a716-446655440000", id: "660f9500-f30c-42e5-b827-557766550001" )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
id:
Stringβ The UUID of the points boost.
-
request_options:
Trophy::Admin::Points::Boosts::RequestOptions
-
-
client.admin.points.levels.list(system_id) -> Internal::Types::Array[Trophy::Types::AdminPointsLevel]
-
-
-
List points levels for a system.
-
-
-
client.admin.points.levels.list( system_id: "550e8400-e29b-41d4-a716-446655440000", limit: 1, skip: 1 )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
limit:
Integerβ Number of records to return.
-
skip:
Integerβ Number of records to skip from the start of the list.
-
request_options:
Trophy::Admin::Points::Levels::RequestOptions
-
-
client.admin.points.levels.create(system_id, request) -> Trophy::Types::CreatePointsLevelsResponse
-
-
-
Create points levels. Maximum 100 levels per request.
-
-
-
client.admin.points.levels.create( system_id: "550e8400-e29b-41d4-a716-446655440000", request: [{ name: "Bronze", key: "bronze", points: 100 }] )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
request:
Internal::Types::Array[Trophy::Types::CreatePointsLevelRequestItem]
-
request_options:
Trophy::Admin::Points::Levels::RequestOptions
-
-
client.admin.points.levels.delete(system_id) -> Trophy::Types::DeletePointsLevelsResponse
-
-
-
Delete multiple points levels by ID.
-
-
-
client.admin.points.levels.delete( system_id: "550e8400-e29b-41d4-a716-446655440000", ids: ["ids"] )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
ids:
Stringβ Comma-separated list of level UUIDs to delete.
-
request_options:
Trophy::Admin::Points::Levels::RequestOptions
-
-
client.admin.points.levels.update(system_id, request) -> Trophy::Types::PatchPointsLevelsResponse
-
-
-
Update multiple points levels. Each item must include an ID.
keycannot be changed.
-
-
-
client.admin.points.levels.update( system_id: "550e8400-e29b-41d4-a716-446655440000", request: [{ id: "550e8400-e29b-41d4-a716-446655440000" }] )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
request:
Internal::Types::Array[Trophy::Types::PatchPointsLevelsRequestItem]
-
request_options:
Trophy::Admin::Points::Levels::RequestOptions
-
-
client.admin.points.levels.get(system_id, id) -> Trophy::Types::AdminPointsLevel
-
-
-
Get a single points level by ID.
-
-
-
client.admin.points.levels.get( system_id: "550e8400-e29b-41d4-a716-446655440000", id: "660f9500-f30c-42e5-b827-557766550001" )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
id:
Stringβ The UUID of the points level.
-
request_options:
Trophy::Admin::Points::Levels::RequestOptions
-
-
client.admin.points.triggers.list(system_id) -> Internal::Types::Array[Trophy::Types::AdminPointsTrigger]
-
-
-
List points triggers for a system.
-
-
-
client.admin.points.triggers.list( system_id: "550e8400-e29b-41d4-a716-446655440000", limit: 1, skip: 1 )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
limit:
Integerβ Maximum number of results to return (1-100, default 10).
-
skip:
Integerβ Number of results to skip for pagination (default 0).
-
request_options:
Trophy::Admin::Points::Triggers::RequestOptions
-
-
client.admin.points.triggers.create(system_id, request) -> Trophy::Types::CreatePointsTriggersResponse
-
-
-
Create points triggers in bulk. Maximum 100 triggers per request.
-
-
-
client.admin.points.triggers.create( system_id: "550e8400-e29b-41d4-a716-446655440000", request: [{ type: "metric", points: 10 }] )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
request:
Internal::Types::Array[Trophy::Types::CreatePointsTriggerRequestItem]
-
request_options:
Trophy::Admin::Points::Triggers::RequestOptions
-
-
client.admin.points.triggers.delete(system_id) -> Trophy::Types::DeletePointsTriggersResponse
-
-
-
Delete points triggers by ID. Maximum 100 trigger IDs per request.
-
-
-
client.admin.points.triggers.delete( system_id: "550e8400-e29b-41d4-a716-446655440000", ids: ["550e8400-e29b-41d4-a716-446655440000"] )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
ids:
Stringβ Trigger IDs to delete. Can be repeated or comma-separated.
-
request_options:
Trophy::Admin::Points::Triggers::RequestOptions
-
-
client.admin.points.triggers.update(system_id, request) -> Trophy::Types::PatchPointsTriggersResponse
-
-
-
Update points triggers in bulk. Maximum 100 triggers per request. Only provided fields are updated; omitted fields are preserved.
-
-
-
client.admin.points.triggers.update( system_id: "550e8400-e29b-41d4-a716-446655440000", request: [{ id: "id" }] )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
request:
Internal::Types::Array[Trophy::Types::PatchPointsTriggersRequestItem]
-
request_options:
Trophy::Admin::Points::Triggers::RequestOptions
-
-
client.admin.points.triggers.get(system_id, id) -> Trophy::Types::AdminPointsTrigger
-
-
-
Get a single points trigger by ID.
-
-
-
client.admin.points.triggers.get( system_id: "550e8400-e29b-41d4-a716-446655440000", id: "660f9500-f30c-42e5-b827-557766550001" )
-
-
-
system_id:
Stringβ The UUID of the points system.
-
id:
Stringβ The UUID of the points trigger.
-
request_options:
Trophy::Admin::Points::Triggers::RequestOptions
-
-
client.admin.streaks.freezes.create(request) -> Trophy::Types::CreateStreakFreezesResponse
-
-
-
Create streak freezes for multiple users.
-
-
-
client.admin.streaks.freezes.create(freezes: [{ user_id: "user-123" }, { user_id: "user-456" }, { user_id: "user-123" }])
-
-
-
freezes:
Internal::Types::Array[Trophy::Admin::Streaks::Freezes::Types::CreateStreakFreezesRequestFreezesItem]β Array of freezes to create. Maximum 100 freezes per request.
-
request_options:
Trophy::Admin::Streaks::Freezes::RequestOptions
-
-
client.admin.streaks.pauses.create(request) -> Trophy::Types::CreateStreakPausesResponse
-
-
-
Create streak pauses for multiple users. A pause covers a specific date range and maintains the user's streak length during that range instead of ending the streak. Start dates in the past are rejected.
-
-
-
client.admin.streaks.pauses.create(pauses: [{ user_id: "user-123", start: "2026-08-20", end_: "2026-08-27" }, { user_id: "user-456", start: "2026-09-01", end_: "2026-09-07" }])
-
-
-
pauses:
Internal::Types::Array[Trophy::Admin::Streaks::Pauses::Types::CreateStreakPausesRequestPausesItem]β Array of pauses to create. Maximum 100 pauses per request.
-
request_options:
Trophy::Admin::Streaks::Pauses::RequestOptions
-
-
client.admin.streaks.pauses.delete() -> Trophy::Types::DeleteStreakPausesResponse
-
-
-
Delete streak pauses by ID.
-
-
-
client.admin.streaks.pauses.delete(ids: %w[550e8400-e29b-41d4-a716-446655440000 550e8400-e29b-41d4-a716-446655440001])
-
-
-
ids:
Stringβ Streak pause IDs to delete. Repeat the query param or provide a comma-separated list.
-
request_options:
Trophy::Admin::Streaks::Pauses::RequestOptions
-
-