“I see that it is by no means useless to travel, if a man wants to see something new”
Phileas can tell you where you should travel next, based on your instagram likes. Phileas ingests your likes and drops them as markers on a map. It also uses Yelp's API and enriches your liked media with some more information—like places of interest, eateries, hotels, etc.
- Create an
ini
file as shown in the settings section of this README - Put it in
/etc/phileas.ini
; optionally, you can pass the location of the ini file at run time - Download Phileas:
go get github.com/avadhutp/phileas
- First, run setup as
phileas setup
; this will set up the required table structure - Second, initiate the backfill as
phileas backfill
; this will populate the database with all the historic data - Next, you should initiate, in two seperate processes,
philease enrich locations
andphileas enrich google-places
; this will also add some more information to the locations that will help when mapping them - Finally, run the actual Phileas server by issuing
phileas start
; you can issue this command in parallel with thebackfill
command
Phileas works off of an ini
file. This supports the following configs:
Example:
[common]
port = 8081
mapquest_key = XXXXX
Setting | Description |
---|---|
port |
Ther port number on which to start the Phileas server |
mapquest_key |
Used for reverse geo coding. Can be gotten from developer.mapquest.com |
Example:
[mysql]
host = localhost
port = 3306
username = user
password = password
schema = phileas
Phileas needs to connect to the Instagram API to fetch your likes. For this, it needs to connect to your Intagram API Account, the details for which can be gotten from www.instagram.com/developer/clients/manage. You need to
- Create a new client in the Manage Clients section
- And then copy the required config into the
instagram
section of phileas's config file as show below:
[instagram]
client_id = xxxxxxxxxxxxxx
secret = xxxxxxxxxxxxxxxx
access_token = xxxxxxxx
Phileas needs to connec to google APIs for two things—
- To be able to display maps in a browser (browser API key is required)
- To query Google Places API for places information (server API key is required)
- Make sure you enable
- Google Maps Javascript API
- Google Places API
- Both these keys can be gotten from developers.google.com. Create two keys—one for the browser and one for the server. And use these in the
ini
file as shown below:
[google]
browser_key = xxxxxxxxxxxxxxxxxx
server_key = xxxxxxxxxxxxxxxxxx
URL | Description | Expected HTTP code | Expected response |
---|---|---|---|
/ping |
Healthcheck URL to see if the server is up and running | 200 |
pong |
/top |
Shows a google map with the locations overlayed | 200 |
Google map markup |
/countries.json |
Information about all the bookmarks in Phileas's database grouped by country; this information is encoded in the GeoJSON format | 200 |
GeoJSON-encoded locations |
/top.json |
Locations from Phileas's database encoded, again, in the GeoJSON format | 200 |
GeoJSON-encoded locations |
/loc/[location-id] |
Get's all images and their captions from Phileas's database | 200 |
HTML with thumbnail images and captions |