{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"a3712c2d-ae9f-4b2b-469c-1a2beb119007","name":"Lunch Picker","description":"![An example Slack post](https://i.imgur.com/2YJeB28.png \"An example Slack post with restaurant picks from Lunch Picker running as an 8am monitor.\")\n\nLunch Picker is a [Postman collection](https://www.getpostman.com/docs/postman/collections/creating_collections) that acts as a restaurant discovery service powered by the [Yelp Fusion API](https://www.yelp.com/developers/documentation/v3). When run, the collection suggests places for you or a team to have lunch and posts the suggestions to Slack. It can be run locally with the [Postman collection runner](https://www.getpostman.com/docs/postman/collection_runs/starting_a_collection_run) or with [Newman](https://www.getpostman.com/docs/postman/collection_runs/command_line_integration_with_newman), or as a scheduled remote job with [Postman Monitors](https://www.getpostman.com/docs/postman/monitors/intro_monitors).\n\nYou can [customize Lunch Picker's restaurant selection criteria](#cc479560-f6cf-f199-1757-65d9f051a324) such as location, distance, and price range with environment variables. The collection saves its choice history to a [Postman environment](https://www.getpostman.com/docs/postman/environments_and_globals/manage_environments) after each run to ensure future choices don't become repetitive.\n\n\n# Getting Started\n\nBefore you can run the Lunch Picker collection, you need to create or update an [environment](https://www.getpostman.com/docs/postman/environments_and_globals/manage_environments). Add the following required variables to a new environment, or update the `Lunch Picker.template` environment you downloaded with the *Run in Postman* button:\n\n|Environment Variable Name |Required? |Description\n|--------------------------|----------|--------------\n|`yelpClientID`            |**YES**   |[A Yelp client ID.](https://www.yelp.com/developers/documentation/v3/authentication)\n|`yelpClientSecret`        |**YES**   |[A Yelp client secret.](https://www.yelp.com/developers/documentation/v3/authentication)\n|`location`                |**YES**   |Specifies the combination of address, neighborhood, city, state or zip, and optional country to be used when searching for restaurants.\n|`webhook`                 |**YES**   |[A Slack incoming webhook url.](https://api.slack.com/incoming-webhooks)\n|`postmanApiKey`           |**YES**   |[A Postman Pro API key.](https://docs.api.getpostman.com/#authentication)\n|`environmentID`           |**YES**   |The id of your environment. Download your environment and copy the id, or get the id from the [Postman API](https://docs.api.getpostman.com/).\n\n\n\n## Get a Yelp Client ID and Secret\n\nYou will need to [Create a Yelp app](https://www.yelp.com/developers/documentation/v3/authentication) to get the `yelpClientID` and `yelpClientSecret` values.\n\n\n## Enter a Location\n\nSave the address of the location you want to search as `location`. The address should be in a region where Yelp is available, otherwise you won't get any results.\n\n\n## Get a Slack Webhook Url\n\nLog in to your team Slack account and [create a Slack app](https://api.slack.com/slack-apps). Then [activate and configure an incoming webhook](https://api.slack.com/incoming-webhooks) for your app. Add this webhook url as `webhook` in your environment.\n\n\n## Get a Postman Pro API Key\n\nLog in to your online Postman account and [get an API key](https://the.postman.co/dashboard/integrations/pm_pro_api/list) for the [Postman API](https://docs.api.getpostman.com/), then add `postmanApiKey` to your environment.\n\n\n## Get Your Environment ID\n\nOnce you've created your environment, you can get the `environmentID` value by downloading the environment and copying the id from the environment file.\n\nTry running the collection locally using the [Postman collection runner](https://www.getpostman.com/docs/postman/collection_runs/starting_a_collection_run) or [Newman](https://www.getpostman.com/docs/postman/collection_runs/command_line_integration_with_newman). It should get restaurant results for your location and post them to your Slack channel. If it doesn't, check the run results and the Postman console to see what might have gone wrong.\n\n![A successful run](https://i.imgur.com/PqvXcc6.png \"A succesful run in the collection runner.\")\n\n\n# Going Further\n\nYou can [customize the behavior of Lunch Picker with optional environment variables](#cc479560-f6cf-f199-1757-65d9f051a324). Try updating the search radius or the price range to improve your results, or set favorite restaurants to increase the chance of those restaurants being picked. Once you have the settings you want, [create a monitor](https://www.getpostman.com/docs/postman/monitors/intro_monitors) to get periodic recommendations. _Bon appétit!_","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":true,"owner":"218543","collectionId":"a3712c2d-ae9f-4b2b-469c-1a2beb119007","publishedId":"6fWy4Ao","public":true,"publicUrl":"https://documenter-api.postman.tech/view/218543/6fWy4Ao","privateUrl":"https://go.postman.co/documentation/218543-a3712c2d-ae9f-4b2b-469c-1a2beb119007","customColor":{"top-bar":"FFFFFF","right-sidebar":"204060","highlight":"0088FF"},"documentationLayout":"classic-double-column","version":"8.11.4","publishDate":"2017-07-14T20:48:14.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Lunch Picker","id":"7c9269c8-c448-f6e5-ccb8-5f2ff54584f8","owner":"218543","values":[{"enabled":true,"key":"yelpClientID","value":""},{"enabled":true,"key":"yelpClientSecret","value":""},{"enabled":true,"key":"yelpAccessToken","value":""},{"enabled":true,"key":"location","value":"49 Geary St, San Francisco, CA 94108"},{"enabled":true,"key":"price","value":"1,2"},{"enabled":true,"key":"webhook","value":""},{"enabled":true,"key":"postmanApiKey","value":""},{"enabled":true,"key":"environmentID","value":""},{"enabled":true,"key":"historyLength","value":"12"},{"enabled":true,"key":"choiceCount","value":"3"},{"enabled":true,"key":"maxResults","value":"300"},{"enabled":true,"key":"walking","value":"true"},{"enabled":true,"key":"radius","value":"800"},{"enabled":true,"key":"openIn","value":"1"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Lunch Picker","value":"218543-7c9269c8-c448-f6e5-ccb8-5f2ff54584f8"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/6fWy4Ao"}