Class: Whatser::City

Inherits:
Resource show all
Defined in:
lib/whatser/resources/city.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#json

Class Method Summary collapse

Methods inherited from Resource

#api_request, api_request, client, convert_data_to_model, from_hash_to_model, #initialize, set

Constructor Details

This class inherits a constructor from Whatser::Resource

Instance Attribute Details

#countObject Also known as: collections_count

Returns the value of attribute count.



3
4
5
# File 'lib/whatser/resources/city.rb', line 3

def count
  @count
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/whatser/resources/city.rb', line 3

def name
  @name
end

Class Method Details

.mine(params = {}) ⇒ Object



7
8
9
# File 'lib/whatser/resources/city.rb', line 7

def mine(params={})
  api_request :get, "/api/users/me/black/book/cities", {:query => params}
end

.user(user_id, params = {}) ⇒ Object



11
12
13
# File 'lib/whatser/resources/city.rb', line 11

def user(user_id, params={})
  api_request :get, "/api/users/#{user_id}/black/book/cities", {:query => params}
end