Class: Osu::API::User

Inherits:
Object
  • Object
show all
Includes:
GetRequest
Defined in:
lib/osu/api.rb

Overview

Fetches a user object

Instance Attribute Summary

Attributes included from GetRequest

#endpoint, #params

Instance Method Summary collapse

Methods included from GetRequest

#execute, #url

Constructor Details

#initialize(user, mode = :standard, event_days: nil) ⇒ User


16
17
18
19
20
21
22
23
24
# File 'lib/osu/api.rb', line 16

def initialize(user, mode = :standard, event_days: nil)
  @endpoint = 'get_user'

  @params = {}

  @params.merge! API.user(user)
  @params.merge! API.mode(mode)
  @params.merge! API.event_days(event_days) if event_days
end