Class: TrophyApiClient::AsyncClient
- Inherits:
-
Object
- Object
- TrophyApiClient::AsyncClient
- Defined in:
- lib/trophy_api_client.rb
Instance Attribute Summary collapse
- #achievements ⇒ TrophyApiClient::AsyncAchievementsClient readonly
- #metrics ⇒ TrophyApiClient::AsyncMetricsClient readonly
- #points ⇒ TrophyApiClient::AsyncPointsClient readonly
- #users ⇒ TrophyApiClient::AsyncUsersClient readonly
Instance Method Summary collapse
Constructor Details
#initialize(api_key:, base_url: nil, environment: TrophyApiClient::Environment::DEFAULT, max_retries: nil, timeout_in_seconds: nil) ⇒ TrophyApiClient::AsyncClient
60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/trophy_api_client.rb', line 60 def initialize(api_key:, base_url: nil, environment: TrophyApiClient::Environment::DEFAULT, 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) @points = TrophyApiClient::AsyncPointsClient.new(request_client: @async_request_client) end |
Instance Attribute Details
#achievements ⇒ TrophyApiClient::AsyncAchievementsClient (readonly)
46 47 48 |
# File 'lib/trophy_api_client.rb', line 46 def achievements @achievements end |
#metrics ⇒ TrophyApiClient::AsyncMetricsClient (readonly)
48 49 50 |
# File 'lib/trophy_api_client.rb', line 48 def metrics @metrics end |
#points ⇒ TrophyApiClient::AsyncPointsClient (readonly)
52 53 54 |
# File 'lib/trophy_api_client.rb', line 52 def points @points end |
#users ⇒ TrophyApiClient::AsyncUsersClient (readonly)
50 51 52 |
# File 'lib/trophy_api_client.rb', line 50 def users @users end |