HQ trivia assistant
A small bot to help aide you in picking the right answer in the HQ app trivia game. This small app hooks into HQ's websocket stream and automatically searches Google and Yahoo! for the correct answer using a variety of searches.
Install
$ git clone https://github.com/mikealmond/hq-trivia-assistant .
$ cd hq-trivia-assistant
$ php composer.phar install
$ cp .env.dist .env
After you've created the .env
file, fill in your HQ user ID and bearer token. You can find your ID and token by sniffing the web traffic from your phone using a tool such as Charles Proxy.
Note: Installation assumes that you have installed Composer already.
Note: If you are in a country other than than Canada, you may want to change your Google and Yahoo search engines to the search engine for your country.
US: On lines 67 and 70, change https://ca.search.yahoo.com/search?ei=UTF-8&nojs=1&p=
to https://search.yahoo.com/search?ei=UTF-8&nojs=1&p=
and change https://www.google.ca/search?q=
to https://www.google.com/search?q=
UK: On lines 67 and 70, change https://ca.search.yahoo.com/search?ei=UTF-8&nojs=1&p=
to https://uk.search.yahoo.com/search?ei=UTF-8&nojs=1&p=
and change www.google.ca/search?q=
to https://www.google.co.uk/search?q=
Usage
$ php run.php
Contributing
All contributions welcome.
Credits
License
The MIT License (MIT)