-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modified to work with Yelp's API keys #8
Conversation
This is great! A couple of requests to complete this PR:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple minor formatting changes.
yelpapi/yelpapi.py
Outdated
@@ -21,8 +21,8 @@ | |||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
""" | |||
|
|||
from requests_oauthlib import OAuth2Session | |||
from oauthlib.oauth2 import BackendApplicationClient | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind deleting this line?
yelpapi/yelpapi.py
Outdated
self._yelp_session = OAuth2Session(client=BackendApplicationClient(client_id=client_id)) | ||
self._yelp_session.fetch_token(token_url=ACCESS_TOKEN_URL, client_id=client_id, client_secret=client_secret) | ||
def __init__(self, api_key): | ||
''' Instantiate a YelpAPI object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind formatting these docstrings like the other docstrings in this project? That is, use double-quotes, space/indent as seen elsewhere.
Hi Geoff - thanks for the pointers. It's my first pull so I'm still learning. I think I got all the points, let me know if I missed anything. I'm planning to use this package for a group project for my MA program, so thank-you for writing this and making our work easier!
|
Just updated examples.py. I'm not too familiar with argparse, so hopefully that's all OK. |
Looks good to me! Merging your code now. I'll update PyPI this afternoon/evening. |
This is now live on PyPI (v2.2.1). |
Yelp is moving to API keys, I changed a few lines to reflect that.