Class: Lighthouse::Facilities::V1::Client
- Inherits:
-
Common::Client::Base
- Object
- Common::Client::Base
- Lighthouse::Facilities::V1::Client
- Defined in:
- lib/lighthouse/facilities/v1/client.rb
Overview
Documentation located at: developer.va.gov/explore/facilities/docs/facilities
Instance Method Summary collapse
-
#get_facilities(params) ⇒ Array<Lighthouse::Facilities::Facility>
Request a list of facilities matching the params provided.
- #get_paginated_facilities(params) ⇒ Object
Methods inherited from Common::Client::Base
#config, configuration, #connection, #delete, #get, #perform, #post, #put, #raise_backend_exception, #raise_not_authenticated, #request, #sanitize_headers!, #service_name
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger, #set_sentry_metadata
Instance Method Details
#get_facilities(params) ⇒ Array<Lighthouse::Facilities::Facility>
Request a list of facilities matching the params provided
24 25 26 27 28 29 |
# File 'lib/lighthouse/facilities/v1/client.rb', line 24 def get_facilities(params) response = perform(:get, '/services/va_facilities/v1/facilities', params) facilities = Lighthouse::Facilities::V1::Response.new(response.body, response.status).facilities facilities.reject!(&:mobile?) if params['exclude_mobile'] facilities end |
#get_paginated_facilities(params) ⇒ Object
31 32 33 34 |
# File 'lib/lighthouse/facilities/v1/client.rb', line 31 def get_paginated_facilities(params) response = perform(:get, '/services/va_facilities/v1/facilities', params) Lighthouse::Facilities::V1::Response.new(response.body, response.status) end |