Class: RandomUserMe::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/random_user_me.rb

Class Method Summary collapse

Class Method Details

.get_random_userObject



14
15
16
17
18
# File 'lib/random_user_me.rb', line 14

def self.get_random_user
  response = get('/')
  return false if !response.parsed_response
  response_map(response)
end

.get_seeded_user(seed) ⇒ Object



20
21
22
23
24
# File 'lib/random_user_me.rb', line 20

def self.get_seeded_user(seed)
  response = get("/?seed=#{seed}")
  return false if !response.parsed_response
  response_map(response)
end