Ruby wrapper for the gurunavi API.
gem install gurunavi
client = Gurunavi::Client.new(keyid: 'your_keyid')
Note: The key and format options are automatically granted.
get infomation of restaurants from RestSearchAPI
rests = client.rest_search
rests = client.rest_search(id: "ga13300")
rests = client.rest_search(areacode_l: "AREAL2802", category_l: "RSFST05000")
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
rests = client.rest_search(options)
rests = client.foreign_rest_search(options)
photos = client.photo_search(options)
areamaster = client.area_search
prefmaster = client.pref_search
areacode_l_master = client.g_area_large_search
areacode_m_master = client.g_area_middle_search
areacode_s_master = client.g_area_small_search
category_l_master = client.category_large_search
category_s_master = client.category_small_search
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 |
- 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 (c) 2017 kobayang. See LICENSE.txt for further details.