Module: JustimmoClient
- Includes:
- Errors
- Defined in:
- lib/justimmo_client.rb,
lib/justimmo_client/api/v1.rb,
lib/justimmo_client/version.rb,
lib/justimmo_client/autoload.rb,
lib/justimmo_client/interface.rb,
lib/justimmo_client/core/utils.rb,
lib/justimmo_client/core/config.rb,
lib/justimmo_client/core/caching.rb,
lib/justimmo_client/core/logging.rb,
lib/justimmo_client/option_parser.rb,
lib/justimmo_client/core/api_helpers.rb
Overview
The Justimmo API.
Defined Under Namespace
Modules: API, Caching, Errors, Logging, Utils, V1 Classes: Config, OptionParser
Constant Summary collapse
- VERSION =
"0.6.7"
Constants included from Errors
Errors::ConfigurationError, Errors::JustimmoError, Errors::OptionParserError
Realty collapse
-
.realties(**options) ⇒ Array<Realty>
Get a list of realty objects with limited information.
-
.realty(id, lang: nil) ⇒ Realty?
Get detailed information about a single realty.
-
.realty_ids(options = {}) ⇒ Array<Integer>
Get a list of all realty ids.
Employee collapse
-
.employee(id) ⇒ Employee
Retrieve detailed information about a single employee.
-
.employee_ids ⇒ Array<Integer>
Get a list of all employee IDs.
-
.employees ⇒ Array<Employee>
Retrieve a list of employee data.
Basic Data collapse
-
.cities(**options) ⇒ Array<City>
Get a list of cities and their zip codes.
-
.countries(**options) ⇒ Array<Country>
Get a list of countries.
-
.federal_states(**options) ⇒ Array<FederalState>
Get a list of federal states.
-
.realty_categories(**options) ⇒ Array<RealtyCategory>
Get a list of available categories.
-
.realty_types(**options) ⇒ Array<RealtyType>
Get a list of available realty types.
-
.regions(**options) ⇒ Array<Region>
Get a list of regions.
Class Method Summary collapse
-
.configure(&block) ⇒ Object
Loads configuration and initializes the API.
- .initialize_api ⇒ Object
Methods included from Utils
Methods included from API
api, interface, model, representer, request, versioned_api
Class Method Details
.cities(**options) ⇒ Array<City>
Get a list of cities and their zip codes.
96 97 98 |
# File 'lib/justimmo_client/interface.rb', line 96 def cities(**) interface(:realty).zip_codes_and_cities() end |
.configure(&block) ⇒ Object
Loads configuration and initializes the API.
11 12 13 14 |
# File 'lib/justimmo_client.rb', line 11 def configure(&block) JustimmoClient::Config.configure(&block) initialize_api end |
.countries(**options) ⇒ Array<Country>
Get a list of countries.
75 76 77 |
# File 'lib/justimmo_client/interface.rb', line 75 def countries(**) interface(:realty).countries() end |
.employee(id) ⇒ Employee
Retrieve detailed information about a single employee.
46 47 48 |
# File 'lib/justimmo_client/interface.rb', line 46 def employee(id) interface(:employee).detail(id) end |
.employee_ids ⇒ Array<Integer>
Get a list of all employee IDs.
52 53 54 |
# File 'lib/justimmo_client/interface.rb', line 52 def employee_ids interface(:employee).ids end |
.employees ⇒ Array<Employee>
Retrieve a list of employee data.
39 40 41 |
# File 'lib/justimmo_client/interface.rb', line 39 def employees interface(:employee).list end |
.federal_states(**options) ⇒ Array<FederalState>
Get a list of federal states.
82 83 84 |
# File 'lib/justimmo_client/interface.rb', line 82 def federal_states(**) interface(:realty).federal_states() end |
.initialize_api ⇒ Object
16 17 18 19 |
# File 'lib/justimmo_client.rb', line 16 def initialize_api api_ver = JustimmoClient::Config.api_ver send :autoload, "V#{api_ver}", "justimmo_client/api/v#{api_ver}" end |
.realties(**options) ⇒ Array<Realty>
Get a list of realty objects with limited information.
15 16 17 |
# File 'lib/justimmo_client/interface.rb', line 15 def realties(**) interface(:realty).list() end |
.realty(id, lang: nil) ⇒ Realty?
Get detailed information about a single realty.
23 24 25 |
# File 'lib/justimmo_client/interface.rb', line 23 def realty(id, lang: nil) interface(:realty).detail(id, lang: lang) end |
.realty_categories(**options) ⇒ Array<RealtyCategory>
Get a list of available categories.
61 62 63 |
# File 'lib/justimmo_client/interface.rb', line 61 def realty_categories(**) interface(:realty).categories() end |
.realty_ids(options = {}) ⇒ Array<Integer>
Get a list of all realty ids.
31 32 33 |
# File 'lib/justimmo_client/interface.rb', line 31 def realty_ids( = {}) interface(:realty).ids() end |
.realty_types(**options) ⇒ Array<RealtyType>
Get a list of available realty types.
68 69 70 |
# File 'lib/justimmo_client/interface.rb', line 68 def realty_types(**) interface(:realty).types() end |
.regions(**options) ⇒ Array<Region>
Get a list of regions.
89 90 91 |
# File 'lib/justimmo_client/interface.rb', line 89 def regions(**) interface(:realty).regions() end |