Class: Nineflats::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/nineflats-api/base.rb

Direct Known Subclasses

Calendar, Client, Photo, Place, Prices, Review, User

Class Method Summary collapse

Class Method Details

.api_callObject



15
16
17
# File 'lib/nineflats-api/base.rb', line 15

def self.api_call
  raise "override me!"
end

.base_urlObject



11
12
13
# File 'lib/nineflats-api/base.rb', line 11

def self.base_url
  "http://api.9flats.com/api/v1"
end

.client_app_keyObject



3
4
5
# File 'lib/nineflats-api/base.rb', line 3

def self.client_app_key
  @@client_app_key
end

.client_app_key=(key) ⇒ Object



7
8
9
# File 'lib/nineflats-api/base.rb', line 7

def self.client_app_key=(key)
  @@client_app_key = key
end


19
20
21
22
23
# File 'lib/nineflats-api/base.rb', line 19

def self.object_link(name, array)
  link = array.select{ |link|
    link["rel"] == name
  }.first["href"]
end