项目作者: biwin

项目描述 :
Some random api wrappers
高级语言: Python
项目地址: git://github.com/biwin/wrapper.git
创建时间: 2017-04-24T15:38:33Z
项目社区:https://github.com/biwin/wrapper

开源协议:Other

下载


Wrapper

A wrapper around several APIs.

Response is a request object, which is much extendable for custom error handling.

The Available APIs are:

  1. EANData
  2. Locu
  3. Spoonacular
  4. Walmart
  5. Zomato

API Methods

EANData

  1. from wrapper import EANData
  2. x = EANData'API_KEY')
  3. x.get_barcode_data('ean_code')

Locu

  1. from wrapper import Locu
  2. x = Locu('API_KEY')
  3. search_restaurant(**kwargs)
  4. get_restaurant_details(venue_id)
  5. get_restuarants_with_menu(query)

Spoonacular

  1. from wrapper import Spoonacular
  2. x = Spoonacular('API_KEY')
  3. get_recipe_by_ingredients(ingredients='ingredient1,ingredient2,ingredient3')
  4. get_recipe_by_id(recipe_id='recipe_id')
  5. generate_meal_plan(**kwargs)
  6. map_ingredients_to_grocery(data)
  7. get_random_recipe(**kwargs)
  8. search_recipies(**kwargs)

Walmart

  1. from wrapper import Walmart
  2. x = Walmart('API_KEY')
  3. search_item(term)
  4. get_food_products(category_id)
  5. product_recommendation(product_id)
  6. product_history(product_id)
  7. get_item_review(product_id)
  8. get_best_sellers(category_id)
  9. get_rollback_items(category_id)
  10. get_clearance_items(category_id)
  11. store_locator(**kwargs)
  12. # kwargs examples for store_locator
  13. # city :string ('New York')
  14. # zip :string (10001)
  15. # cordinates :string ('lat,lon') ('40.7128,74.0059')

Zomato

  1. from wrapper import Zomato
  2. x = Zomato('API_KEY')
  3. get_categories()
  4. get_city(**kwargs)
  5. get_collections(**kwargs)
  6. get_cuisines(**kwargs)
  7. get_restaurant_types(**kwargs)
  8. search(**kwargs)
  9. get_top_restaurants(location_id, entity_type='city')
  10. get_daily_menu(restaurant_id)
  11. geocode(latlon)
  12. get_restaurant_details(restaurant_id)
  13. get_restaurant_review(restaurant_id)