Skip to content

JohnieLee/YelpClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

YelpClient

Yelp API Client - Python implementation.

This client is a thin wrapper around the Yelp API.

Requires

  • oauth2
  • requests

Installation

pip install oauth2 requests
pip install git+https://github.com/tazzy531/YelpClient.git

Usage

client = YelpClient(yelp_keys)
result_json = client.search_by_location(
    location = '94043', term = 'Red Rock', limit = 10, 
    sort = YelpClient.SortType.BEST_MATCHED)

// OR search by geo coordinates
result_json = client.search_by_geo_coord(
    latlong = (39.0639, -108.55), term='bars')

yelp_keys is a dict with the following keys.

keys = {
    'consumer_key' : 'example',
    'consumer_secret' : 'example',
    'token' : 'example',
    'token_secret' : 'example',
}

These keys are generated by the Yelp API Console

Client line interface

A simple CLI is included as an example for the usage which reads a keyfile in json format. An example key file is in cfg/yelp_keys.json.

yelp_cli.py 'mountain view, ca' 'bars' --loctype=LOCATION --keyfile=[keyfile.json]

About

Yelp API Client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages