Class: FlockOs::Api::Users

Inherits:
Base
  • Object
show all
Defined in:
lib/flock_os/api/users.rb

Constant Summary collapse

PATH =
'users'

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from FlockOs::Api::Base

Instance Method Details

#get_infoObject



6
7
8
9
10
# File 'lib/flock_os/api/users.rb', line 6

def get_info
  response = @client.post("#{PATH}.getInfo")
  
  FlockOs::Model::User.new(response)
end

#get_public_profile(user_id) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/flock_os/api/users.rb', line 12

def get_public_profile(user_id)
  response = @client.post("#{PATH}.getPublicProfile", {
    userId: user_id
  })
  
  FlockOs::Model::PublicProfile.new(response)
end