Class: HackerOne::Client::User

Inherits:
Object
  • Object
show all
Includes:
ResourceHelper
Defined in:
lib/hackerone/client/user.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ResourceHelper

included, #make_get_request, #make_post_request, #parse_response

Constructor Details

#initialize(user) ⇒ User

Returns a new instance of User.



13
14
15
# File 'lib/hackerone/client/user.rb', line 13

def initialize(user)
  @user = user
end

Class Method Details

.find(username_we_want) ⇒ Object



8
9
10
11
# File 'lib/hackerone/client/user.rb', line 8

def self.find(username_we_want)
  user_json = make_get_request("users/#{username_we_want}")
  new(user_json)
end

Instance Method Details

#idObject



17
18
19
# File 'lib/hackerone/client/user.rb', line 17

def id
  @user[:id]
end