Class: SwissMatch::Directories::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/swissmatch/directories/service.rb

Overview

Common directory service API.

See Also:

Instance Method Summary collapse

Constructor Details

#initialize(back_end, config = nil) ⇒ Service


24
25
26
# File 'lib/swissmatch/directories/service.rb', line 24

def initialize(back_end, config=nil)
  @service = SwissMatch::Directories.service(back_end).from_config(config)
end

Instance Method Details

#addresses(params, options = {}) ⇒ Object

Query for addresses matching a set of given search parameters

Note that not all back-ends will treat these parameters with the same strictness. The tel.search.ch back-end for example will search for a last name anywhere in the name.


47
48
49
# File 'lib/swissmatch/directories/service.rb', line 47

def addresses(params, options={})
  @service.addresses(params, options)
end