Class: TrophyApiClient::AsyncClient
- Inherits:
-
Object
- Object
- TrophyApiClient::AsyncClient
- Defined in:
- lib/trophy_api_client.rb
Instance Attribute Summary collapse
- #achievements ⇒ TrophyApiClient::AsyncAchievementsClient readonly
- #admin ⇒ TrophyApiClient::Admin::AsyncClient readonly
- #leaderboards ⇒ TrophyApiClient::AsyncLeaderboardsClient readonly
- #metrics ⇒ TrophyApiClient::AsyncMetricsClient readonly
- #points ⇒ TrophyApiClient::AsyncPointsClient readonly
- #streaks ⇒ TrophyApiClient::AsyncStreaksClient readonly
- #users ⇒ TrophyApiClient::AsyncUsersClient readonly
Instance Method Summary collapse
Constructor Details
#initialize(api_key:, base_url: nil, environment: TrophyApiClient::Environment::PRODUCTION, max_retries: nil, timeout_in_seconds: nil) ⇒ TrophyApiClient::AsyncClient
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/trophy_api_client.rb', line 78 def initialize(api_key:, base_url: nil, environment: TrophyApiClient::Environment::PRODUCTION, max_retries: nil, timeout_in_seconds: nil) @async_request_client = TrophyApiClient::AsyncRequestClient.new( base_url: base_url, environment: environment, max_retries: max_retries, timeout_in_seconds: timeout_in_seconds, api_key: api_key ) @achievements = TrophyApiClient::AsyncAchievementsClient.new(request_client: @async_request_client) @metrics = TrophyApiClient::AsyncMetricsClient.new(request_client: @async_request_client) @users = TrophyApiClient::AsyncUsersClient.new(request_client: @async_request_client) @streaks = TrophyApiClient::AsyncStreaksClient.new(request_client: @async_request_client) @points = TrophyApiClient::AsyncPointsClient.new(request_client: @async_request_client) @leaderboards = TrophyApiClient::AsyncLeaderboardsClient.new(request_client: @async_request_client) @admin = TrophyApiClient::Admin::AsyncClient.new(request_client: @async_request_client) end |
Instance Attribute Details
#achievements ⇒ TrophyApiClient::AsyncAchievementsClient (readonly)
58 59 60 |
# File 'lib/trophy_api_client.rb', line 58 def achievements @achievements end |
#admin ⇒ TrophyApiClient::Admin::AsyncClient (readonly)
70 71 72 |
# File 'lib/trophy_api_client.rb', line 70 def admin @admin end |
#leaderboards ⇒ TrophyApiClient::AsyncLeaderboardsClient (readonly)
68 69 70 |
# File 'lib/trophy_api_client.rb', line 68 def leaderboards @leaderboards end |
#metrics ⇒ TrophyApiClient::AsyncMetricsClient (readonly)
60 61 62 |
# File 'lib/trophy_api_client.rb', line 60 def metrics @metrics end |
#points ⇒ TrophyApiClient::AsyncPointsClient (readonly)
66 67 68 |
# File 'lib/trophy_api_client.rb', line 66 def points @points end |
#streaks ⇒ TrophyApiClient::AsyncStreaksClient (readonly)
64 65 66 |
# File 'lib/trophy_api_client.rb', line 64 def streaks @streaks end |
#users ⇒ TrophyApiClient::AsyncUsersClient (readonly)
62 63 64 |
# File 'lib/trophy_api_client.rb', line 62 def users @users end |