Module: LearnWeb::Client::User

Included in:
LearnWeb::Client
Defined in:
lib/learn_web/client/user.rb,
lib/learn_web/client/user/me.rb

Defined Under Namespace

Classes: Me

Instance Method Summary collapse

Instance Method Details

#meObject



10
11
12
13
14
15
16
17
# File 'lib/learn_web/client/user.rb', line 10

def me
  response = get(
    me_endpoint,
    headers: { 'Authorization' => "Bearer #{token}" }
  )

  LearnWeb::Client::User::Me.new(response, silent_output: silent_output)
end

#me_endpointObject



6
7
8
# File 'lib/learn_web/client/user.rb', line 6

def me_endpoint
  "#{API_ROOT}/users/me"
end