Project

novaposhta

0.0
No commit activity in last 3 years
No release in over 3 years
Gem API NOVA POSHTA(Новая почта, Нова пошта) for all ruby projects
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
>= 0
~> 10.0
~> 3.0

Runtime

 Project Readme

Novaposhta

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/novaposhta. To experiment with that code, run bin/console for an interactive prompt.

TODO: Delete this and the text above, and describe your gem

Installation

Add this line to your application's Gemfile:

gem 'novaposhta'

And then execute:

$ bundle

Or install it yourself as:

$ gem install novaposhta

Usage

config/aplication.rb

Novaposhta.configure do |config|
  config.url     = 'https://api.novaposhta.ua/v2.0/{format}/'
  config.format  = :json # or :xml
  config.api_key = '...'
end

methods

# города
Novaposhta::Address.get_cities # => hash

# поиск города
Novaposhta::Address.find_city(name) # => hash

# населенные пункты
Novaposhta::Address.get_settlements # => hash

# области
Novaposhta::Address.get_areas # => hash

# отделения и типы компании
Novaposhta::Address.get_warehouses # => hash

# улицы
Novaposhta::Address.get_street(city_ref) # => hash

# поиск улицы
Novaposhta::Address.find_street(city_ref, name) # => hash

License

The gem is available as open source under the terms of the MIT License.