项目作者: rahulkp220

项目描述 :
The unofficial Julia wrapper around Zomato's API :fire:
高级语言: Julia
项目地址: git://github.com/rahulkp220/Zomato.jl.git
创建时间: 2018-09-15T14:29:56Z
项目社区:https://github.com/rahulkp220/Zomato.jl

开源协议:MIT License

下载


License: MIT Build Status GitHub contributors GitHub issues GitHub version

ForTheBadge built-with-love

Zomato.jl

An unofficial Julia wrapper for Zomato’s API :fire:
However, the official documentation can be reached here

Installation

  1. julia> ]
  2. (v1.0) pkg> add Zomato

How it works?

As per Zomato’s official guidelines, access to restaurant information and search on Zomato is limited to 1000 calls per day. Hence the limit should be kept in mind.

  1. # Import package
  2. julia> using Zomato
  3. # authenticate
  4. julia> auth = Zomato.authenticate("API-KEY")
  5. Zomato(https://developers.zomato.com/api/v2.1/)
  6. # get the categories
  7. julia> Zomato.get(auth, CategoriesAPI)
  8. [ Info: fetching categories...
  9. Dict{String,Any} with 1 entry:
  10. "categories" => Any[Dict{String,Any}("categories"=>Dict{String,Any}("name"=>"Delivery","id"=>1)), Dict{String,Any}("categories"=>Dict{String,Any}("name"=>…
  11. # get city wise details
  12. julia> Zomato.get(auth, CitiesAPI, q="london")
  13. [ Info: fetching city details...
  14. Dict{String,Any} with 4 entries:
  15. "location_suggestions" => Any[Dict{String,Any}("is_state"=>0,"state_name"=>"England and Wales","name"=>"London","id"=>61,"state_code"=>"England and Wales"
  16. "has_total" => 0
  17. "status" => "success"
  18. "has_more" => 0

Documentation

Each function has an extensive API documentation, a sample of which is given below.

  1. help?>Zomato.get(z::Zomato.Auth, ::Type{Zomato.CitiesAPI}; kwargs...)
  2. Get city details
  3. ==================
  4. Find the Zomato ID and other details for a city .
  5. You can obtain the Zomato City ID in one of the following ways:
  6. City Name in the Search Query -
  7. Returns list of cities matching the query
  8. Using coordinates -
  9. Identifies the city details based on the coordinates of any location inside a city
  10. If you already know the Zomato City ID, this API can be used to get other details of the city.
  11. See https://developers.zomato.com/documentation#!/common/cities
  12. Arguments
  13. ===========
  14. Parameter Description Parameter Type Data Type
  15. ––––––––– –––––––––––––––––––––––––––––––– –––––––––––––– –––––––––
  16. q query by city name query String
  17. lat latitude query Float
  18. lon longitude query Float
  19. city_ids comma separated city_id values query String
  20. count number of max results to display query Int

Facing issues? :scream:

  • Open a PR with the detailed expaination of the issue
  • Reach me out here