Project

gurunavi

0.0
No commit activity in last 3 years
No release in over 3 years
A Ruby wrapper for the Gurunavi API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0
~> 1.3
~> 2.3.3
>= 0
~> 3.12
~> 0.13.0
~> 3.0

Runtime

~> 0.8
< 4.0.0, >= 0.8
 Project Readme

gurunavi

Ruby wrapper for the gurunavi API.

Installation

gem install gurunavi

Usage

Instantiate a client

client = Gurunavi::Client.new(keyid: 'your_keyid')

Examples

Note: The key and format options are automatically granted.

get infomation of restaurants from RestSearchAPI

rests = client.rest_search
with options
rests = client.rest_search(id: "ga13300")
rests = client.rest_search(areacode_l: "AREAL2802", category_l: "RSFST05000")
get the whole restaurants name example
index = 1
while true
  begin
    rests = client.rest_search(areacode_l: "AREAL2802", category_l: "RSFST05000", offset_page: index)
    rests.each do |rest|
      puts rest.name
    end
    index += 1
  rescue Gurunavi::NoShop => e
    break
  end
end

See more available options from manual.

get master of area large code (areacode_l) from GAreaLargeSearchAPI

areacode_l_master = client.g_area_large_search

Correspondence

See the All API lists

RestSearchAPI

rests = client.rest_search(options)

ForeignRestSearchAPI

rests = client.foreign_rest_search(options)

PhotoSearchAPI

photos = client.photo_search(options)

AreaSearchAPI

areamaster = client.area_search

PrefSearchAPI

prefmaster = client.pref_search

GAreaLargeSearchAPI

areacode_l_master = client.g_area_large_search

GAreaMiddleSearchAPI

areacode_m_master = client.g_area_middle_search

GAreaSmallSearchAPI

areacode_s_master = client.g_area_small_search

CategoryLargeSearchAPI

category_l_master = client.category_large_search

CategorySmallSearchAPI

category_s_master = client.category_small_search

Errors

Gurunavi returns the following error for incorrect response.

status code api errors
429 Gurunavi::TooManyAccess
600 Gurunavi::NoShop
601 Gurunavi::InvalidAccess
602 Gurunavi::InvalidShopNumber
603 Gurunavi::InvalidType
604 Gurunavi::InternalServerError
* Gurunavi::APIError

Contributing to gurunavi

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2017 kobayang. See LICENSE.txt for further details.