Class: Phoebe::Resources::Ref::Region::Adjacent
- Inherits:
-
Object
- Object
- Phoebe::Resources::Ref::Region::Adjacent
- Defined in:
- lib/phoebe/resources/ref/region/adjacent.rb
Overview
With the ref/geo end-point you can find a country’s or region’s neighbours.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Adjacent
constructor
private
A new instance of Adjacent.
-
#list(region_code, request_options: {}) ⇒ Array<Phoebe::Models::Ref::Region::AdjacentListResponseItem>
Get the list of countries or regions that share a border with this one.
Constructor Details
#initialize(client:) ⇒ Adjacent
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Adjacent.
34 35 36 |
# File 'lib/phoebe/resources/ref/region/adjacent.rb', line 34 def initialize(client:) @client = client end |
Instance Method Details
#list(region_code, request_options: {}) ⇒ Array<Phoebe::Models::Ref::Region::AdjacentListResponseItem>
Get the list of countries or regions that share a border with this one. #### Notes Only subnational2 codes in the United States, New Zealand, or Mexico are currently supported
22 23 24 25 26 27 28 29 |
# File 'lib/phoebe/resources/ref/region/adjacent.rb', line 22 def list(region_code, params = {}) @client.request( method: :get, path: ["ref/adjacent/%1$s", region_code], model: Phoebe::Internal::Type::ArrayOf[Phoebe::Models::Ref::Region::AdjacentListResponseItem], options: params[:request_options] ) end |