daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Jul 17th, 2016 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. function search-nearby() {
  3. Param(
  4.     [Parameter(Mandatory = $true)][string]$search,
  5.     [AllowEmptyString()]$api_key="<your key>"
  6. )
  7.  
  8. try {
  9.     $Search_results = invoke-restmethod "https://maps.googleapis.com/maps/api/place/textsearch/json?query=$search&key=$api_key"
  10.     $search_results = ($search_results.results) | select Name,types,Formatted_address,price_level,Rating
  11.     return $search_results
  12.     } catch {
  13.     return $false
  14.     }
  15.  
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top