Class: GeostellarClient::User
- Inherits:
-
Object
- Object
- GeostellarClient::User
- Defined in:
- lib/geostellar_client/user.rb
Class Method Summary collapse
Class Method Details
.api_url ⇒ Object
31 32 33 |
# File 'lib/geostellar_client/user.rb', line 31 def self.api_url "#{GeostellarClient::BASE_API_URL}users" end |
.find(id) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/geostellar_client/user.rb', line 17 def self.find(id) response = HTTParty.get( find_url(id), { api_key: GeostellarClient.api_key } ) new(JSON.parse(response.body)) end |
.find_url(id) ⇒ Object
27 28 29 |
# File 'lib/geostellar_client/user.rb', line 27 def self.find_url(id) "#{api_url}/#{id}" end |