Sushi Selector

Number of APIs: 4

The Sushi Selector ???? is a Qodex collection that recommends a nearby sushi spot. When run locally with the Qodex collection runner, the collection searches for sushi restaurants and posts the recommendation as a direct message to your Twitter.

You can customize Sushi Selector's criteria such as location, distance, and price range with environment variables. If you don't like sushi (????), you can tweak the collection to search for the cheapest burger joint, the nearest park, or the highest rated tourist attractions.

Quickstart

Before you can run the Sushi Selector collection, you need to create or update an environment. Add the following required variables to a new environment, or update the Sushi Selector.template environment you downloaded with the Run in Qodex button:

Environment Variable NameDescription
googlePlacesApiKeyA Google Places API Key
googleMapsGeocodingApiKeyA Google Maps Geocoding API Key
addressSpecifies the combination of address, neighborhood, city, state, or zip to be used when searching for places. This will be geocoded into a latitude and longitude.
myTwitterHandleYour Twitter Handle to send yourself a direct message
twitterConsumerKey, twitterConsumerSecret, twitterAccessToken, and twitterAccessTokenSecretYour Twitter app's auth credentials to set up OAuth 1.0

Get Google Places API Key

You will need a Google Places API Key to add or update the googlePlacesApiKey value within the Qodex environment.

Get Google Maps Geocoding API Key

You will need a Google Maps Geocoding API Key to add or update the googleMapsGeocodingApiKey value within the Qodex environment.

Enter an Address

Save the address of the location you want to search around as address. You can use a combination of address, neighborhood, city, state, or zip to initiate your search.

Enter your Twitter handle

Save your Twitter handle as myTwitterHandle within the Qodex environment. You will need this to send yourself a direct message via Twitter.

Get Twitter credentials to set up Oauth 1.0

You will need to create a Twitter app to get the twitterConsumerKey, twitterConsumerSecret, twitterAccessToken, and twitterAccessTokenSecret values for the Qodex environment. For step-by-step screenshots and instructions on setting up Twitter Oauth 1.0 in Qodex, check out the first Twitter request.

  1. Get Twitter Owner ID GET https://api.twitter.com/1.1/users/show.json?screen_name={{myTwitterHandle}}

  2. Geocoding GET https://maps.googleapis.com/maps/api/geocode/json?key={{googleMapsGeocodingApiKey}}&address={{address}}

  3. Place Search GET https://maps.googleapis.com/maps/api/place/nearbysearch/json?key={{googlePlacesApiKey}}&location={{lat}},{{lng}}&radius=500&type=restaurant&keyword=sushi

  4. Direct message to Twitter POST https://api.twitter.com/1.1/direct_messages/events/new.json