Open mralanlee opened 7 years ago
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.
also would you please update the config/readme.txt to mock some data for the additional secrets.json fields? thank you
@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 👍
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