Skip to content
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

#11 Feature/places #15

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

mralanlee
Copy link
Collaborator

Please add DATABASE_URL(mongodb, either local or mlab) and GOOGLE_API_KEY (Google Places API key) to secrets.json in order to get this to work properly

Copy link
Collaborator

@stefangimmillaro stefangimmillaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this! I look forward to adding it. I want to go over the changes with @pjlangsam so I can familiarize him with the PR process on github. I will likely have a few things to change including requesting the addition of a test or two before merging. Thank you for whipping this up so quickly!

@@ -0,0 +1,31 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this file to the config directory. My goal is to have all user configurable content in config. It should be easy for other users to set up for other discords (not bay area)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stefangimmillaro Moved 👍

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@stefangimmillaro
Copy link
Collaborator

stefangimmillaro commented Aug 9, 2017

i forgot to ask - does this PR break the bot if mongo isn't installed on the host? If not, I'm happy to merge it in now.

@stefangimmillaro
Copy link
Collaborator

also would you please update the config/readme.txt to mock some data for the additional secrets.json fields? thank you

@mralanlee
Copy link
Collaborator Author

mralanlee commented Aug 9, 2017

@stefangimmillaro - It will break without MongoDB. The reason is because the Google Places API free tier allows up to 1,000 queries within 24 hours. Since raids end at roughly around 8pm, and start up at 7am, I added the Mongo so that it will query the database for similar or like queries first before hitting places API.

Over time, I will probably improve this process as it currently searches exact term. Working with mongoose queries is not as easy as SQL queries (to use something along the lines of.... WHERE query LIKE query). But the main reason why I chose mongo was because mLab has a free tier sandbox to use.

Also, the readme.txt is updated 👍

@stefangimmillaro stefangimmillaro requested review from pjlangsam and removed request for pjlangsam August 9, 2017 23:39
@stefangimmillaro stefangimmillaro changed the title Feature/places #11 Feature/places Aug 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants