Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
330 lines (323 sloc) 14.2 KB
<?xml version="1.0" encoding="utf-8" ?>
<Suite Category="Locations" RequireVersion="7.0.0" Title="Google Places" Id="GooglePlaces" SourceUrl="https://github.com/nielsbosma/SeoTools-for-Excel-Connectors/blob/master/GooglePlaces.xml" HelpUrl="http://seotoolsforexcel.com/google-places/" HelpText="Documentation">
<Author Name="Victor" Url="http://community.seotoolsforexcel.com/users/diskborste/activity"/>
<Settings HelpText="What's this?" HelpUrl="http://seotoolsforexcel.com/google-places/">
<Text Id="ApiKey" Title="ApiKey" Required="true" HelpUrl="http://seotoolsforexcel.com/google-places/"/>
</Settings>
<Resources>
<Resource Id="Countries">
<Item Id="All" Title="Select Country (Optional)"/>
<Item Id="AF" Title="Afghanistan"/>
<Item Id="AL" Title="Albania"/>
<Item Id="DZ" Title="Algeria"/>
<Item Id="AO" Title="Angola"/>
<Item Id="AR" Title="Argentina"/>
<Item Id="AU" Title="Australia"/>
<Item Id="AT" Title="Austria"/>
<Item Id="AZ" Title="Azerbaijan"/>
<Item Id="BH" Title="Bahrain"/>
<Item Id="BD" Title="Bangladesh"/>
<Item Id="BY" Title="Belarus"/>
<Item Id="BE" Title="Belgium"/>
<Item Id="BO" Title="Bolivia"/>
<Item Id="BA" Title="Bosnia and Herzegovina"/>
<Item Id="BW" Title="Botswana"/>
<Item Id="BR" Title="Brazil"/>
<Item Id="BG" Title="Bulgaria"/>
<Item Id="BF" Title="Burkina Faso"/>
<Item Id="KH" Title="Cambodia"/>
<Item Id="CM" Title="Cameroon"/>
<Item Id="CA" Title="Canada"/>
<Item Id="CF" Title="Central Africa"/>
<Item Id="TD" Title="Chad"/>
<Item Id="CL" Title="Chile"/>
<Item Id="CN" Title="China"/>
<Item Id="CO" Title="Colombia"/>
<Item Id="CG" Title="Congo"/>
<Item Id="CR" Title="Costa Rica"/>
<Item Id="HR" Title="Croatia"/>
<Item Id="CU" Title="Cuba"/>
<Item Id="CY" Title="Cyprus"/>
<Item Id="CZ" Title="Czechia"/>
<Item Id="CI" Title="Côte d'Ivoire"/>
<Item Id="DK" Title="Denmark"/>
<Item Id="DO" Title="Dominican Republic"/>
<Item Id="EC" Title="Ecuador"/>
<Item Id="EG" Title="Egypt"/>
<Item Id="SV" Title="El Salvador"/>
<Item Id="EE" Title="Estonia"/>
<Item Id="ET" Title="Ethiopia"/>
<Item Id="FI" Title="Finland"/>
<Item Id="FR" Title="France"/>
<Item Id="GE" Title="Georgia"/>
<Item Id="DE" Title="Germany"/>
<Item Id="GH" Title="Ghana"/>
<Item Id="GR" Title="Greece"/>
<Item Id="GL" Title="Greenland"/>
<Item Id="GT" Title="Guatemala"/>
<Item Id="GN" Title="Guinea"/>
<Item Id="GY" Title="Guyana"/>
<Item Id="HT" Title="Haiti"/>
<Item Id="HN" Title="Honduras"/>
<Item Id="HK" Title="Hong Kong"/>
<Item Id="HU" Title="Hungary"/>
<Item Id="IS" Title="Iceland"/>
<Item Id="IN" Title="India"/>
<Item Id="ID" Title="Indonesia"/>
<Item Id="IR" Title="Iran"/>
<Item Id="IQ" Title="Iraq"/>
<Item Id="IE" Title="Ireland"/>
<Item Id="IL" Title="Israel"/>
<Item Id="IT" Title="Italy"/>
<Item Id="JM" Title="Jamaica"/>
<Item Id="JP" Title="Japan"/>
<Item Id="JO" Title="Jordan"/>
<Item Id="KZ" Title="Kazakhstan"/>
<Item Id="KE" Title="Kenya"/>
<Item Id="KW" Title="Kuwait"/>
<Item Id="LV" Title="Latvia"/>
<Item Id="LB" Title="Lebanon"/>
<Item Id="LR" Title="Liberia"/>
<Item Id="LY" Title="Libya"/>
<Item Id="LT" Title="Lithuania"/>
<Item Id="LU" Title="Luxembourg"/>
<Item Id="MK" Title="Macedonia"/>
<Item Id="MG" Title="Madagascar"/>
<Item Id="MW" Title="Malawi"/>
<Item Id="MY" Title="Malaysia"/>
<Item Id="ML" Title="Mali"/>
<Item Id="MT" Title="Malta"/>
<Item Id="MX" Title="Mexico"/>
<Item Id="MD" Title="Moldova"/>
<Item Id="MC" Title="Monaco"/>
<Item Id="MN" Title="Mongolia"/>
<Item Id="ME" Title="Montenegro"/>
<Item Id="MA" Title="Morocco"/>
<Item Id="MZ" Title="Mozambique"/>
<Item Id="MM" Title="Myanmar"/>
<Item Id="NA" Title="Namibia"/>
<Item Id="NP" Title="Nepal"/>
<Item Id="NL" Title="Netherlands"/>
<Item Id="NZ" Title="New Zealand"/>
<Item Id="NI" Title="Nicaragua"/>
<Item Id="NE" Title="Niger"/>
<Item Id="NG" Title="Nigeria"/>
<Item Id="NO" Title="Norway"/>
<Item Id="OM" Title="Oman"/>
<Item Id="PK" Title="Pakistan"/>
<Item Id="PS" Title="Palestine"/>
<Item Id="PA" Title="Panama"/>
<Item Id="PY" Title="Paraguay"/>
<Item Id="PE" Title="Peru"/>
<Item Id="PH" Title="Philippines"/>
<Item Id="PL" Title="Poland"/>
<Item Id="PT" Title="Portugal"/>
<Item Id="PR" Title="Puerto Rico"/>
<Item Id="QA" Title="Qatar"/>
<Item Id="RO" Title="Romania"/>
<Item Id="RU" Title="Russia"/>
<Item Id="RW" Title="Rwanda"/>
<Item Id="SA" Title="Saudi Arabia"/>
<Item Id="SN" Title="Senegal"/>
<Item Id="RS" Title="Serbia"/>
<Item Id="SL" Title="Sierra Leone"/>
<Item Id="SG" Title="Singapore"/>
<Item Id="SK" Title="Slovakia"/>
<Item Id="SI" Title="Slovenia"/>
<Item Id="SO" Title="Somalia"/>
<Item Id="ZA" Title="South Africa"/>
<Item Id="KR" Title="Korea"/>
<Item Id="ES" Title="Spain"/>
<Item Id="LK" Title="Sri Lanka"/>
<Item Id="SD" Title="Sudan"/>
<Item Id="SE" Title="Sweden"/>
<Item Id="CH" Title="Switzerland"/>
<Item Id="SY" Title="Syria"/>
<Item Id="TW" Title="Taiwan"/>
<Item Id="TZ" Title="Tanzania"/>
<Item Id="TH" Title="Thailand"/>
<Item Id="TN" Title="Tunisia"/>
<Item Id="TR" Title="Turkey"/>
<Item Id="TM" Title="Turkmenistan"/>
<Item Id="UG" Title="Uganda"/>
<Item Id="UA" Title="Ukraine"/>
<Item Id="AE" Title="United Arab Emirates"/>
<Item Id="GB" Title="United Kingdom"/>
<Item Id="US" Title="USA"/>
<Item Id="UY" Title="Uruguay"/>
<Item Id="UZ" Title="Uzbekistan"/>
<Item Id="VE" Title="Venezuela"/>
<Item Id="VN" Title="Viet Nam"/>
<Item Id="YE" Title="Yemen"/>
<Item Id="ZM" Title="Zambia"/>
<Item Id="ZW" Title="Zimbabwe"/>
</Resource>
</Resources>
<RestConnector Id="SearchText" Title="Search by Text" HelpUrl="https://developers.google.com/places/web-service/search">
<Parameters>
<Text Id="Query" Title="Search" Debug.DefaultValue="pizza" Required="true"/>
<Checkbox Id="OpenNow" Title="Open Now" DefaultValue="false"/>
<Text Id="Latitude" Title="Latitude (DDD.DDDDD°)" DefaultValue="" Required="false" Debug.DefaultValue="59.34"/>
<Text Id="Longitude" Title="Longitude (DDD.DDDDD°)" DefaultValue="" Required="false" Debug.DefaultValue="17.94"/>
<Number Id="Radius" Title="Radius (Meter | Max = 50000)" DefaultValue="10000" Required="false"/>
<Select Id="Country" Title="Preferred Country" Required="" DefaultValue="All">
<DataSource>
<Resource Id="Countries"/>
</DataSource>
</Select>
</Parameters>
<Paging PageSize="20" MaxTake="20"/>
<Fetch>
<Fetch.Url>
<![CDATA[
https://maps.googleapis.com/maps/api/place/textsearch/json
?query=@Model.Query
@if(!string.IsNullOrEmpty(Model.Latitude) && !string.IsNullOrEmpty(Model.Longitude) && Model.Radius >= 0)
{
@: &location=@(Model.Latitude),@(Model.Longitude)&radius=@(Model.Radius)
}
@if(Model.Country != "All")
{
@: &region=@Model.Country
}
@if(Model.OpenNow == true)
{
@: &opennow=true
}
&key=@Model.ApiKey
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="results[*]">
<JsonPath Expr="id" Id="Id" Title="Id" Converter="String"/>
<JsonPath Expr="name" Id="Name" Title="Name" Converter="String"/>
<JsonPath Expr="place_id" Id="PlaceId" Title="Place Id" Converter="String"/>
<JsonPath Expr="formatted_address" Id="Address" Title="Address" Converter="String"/>
<JsonPath Expr="types[0]" Id="Type" Title="Type" Converter="String"/>
<JsonPath Expr="geometry.location.lat" Id="Latitude" Title="Latitude" Converter="String"/>
<JsonPath Expr="geometry.location.lng" Id="Longitude" Title="Longitude" Converter="String"/>
<JsonPath Expr="price_level" Id="PriceLevel" Title="Price Level" Converter="Double" DefaultValue=""/>
<JsonPath Expr="rating" Id="Rating" Title="Rating" Converter="Double" DefaultValue=""/>
<Compute Id="Photo" Title="Photo" DefaultValue="">
<Compute.Expr>
<![CDATA[
@{
Regex regex = new Regex(@"""(.*?)""");
Match match = regex.Match(Model.PhotoInput);
string output = match.Groups[1].Value;
}
@output
]]>
</Compute.Expr>
<JsonPath Expr="photos[*].html_attributions[0]" Id="PhotoInput" Converter="String" DefaultValue=""/>
</Compute>
<JsonPath Expr="opening_hours.open_now" Id="OpenNow" Title="Open Now" Converter="Bool" DefaultValue=""/>
</JsonPath>
</Parse>
</RestConnector>
<RestConnector Id="SearchNearby" Title="Search Nearby" HelpUrl="https://developers.google.com/places/web-service/search">
<Parameters>
<Text Id="Latitude" Title="Latitude (DDD.DDDDD°)" DefaultValue="" Required="true" Debug.DefaultValue="59.34"/>
<Text Id="Longitude" Title="Longitude (DDD.DDDDD°)" DefaultValue="" Required="true" Debug.DefaultValue="17.94"/>
<Number Id="Radius" Title="Radius (Meter | Max = 50000)" DefaultValue="10000" Required="true"/>
<Text Id="Query" Title="Optional Query" Debug.DefaultValue="pizza" Required="true"/>
<Checkbox Id="OpenNow" Title="Open Now" DefaultValue="false"/>
<Select Id="Country" Title="Preferred Country" Required="" DefaultValue="All">
<DataSource>
<Resource Id="Countries"/>
</DataSource>
</Select>
</Parameters>
<Paging PageSize="20" MaxTake="20"/>
<Fetch>
<Fetch.Url>
<![CDATA[
https://maps.googleapis.com/maps/api/place/nearbysearch/json
?query=@Model.Query
&location=@(Model.Latitude),@(Model.Longitude)&radius=@(Model.Radius)
@if(Model.Country != "All")
{
@: &region=@Model.Country
}
@if(Model.OpenNow == true)
{
@: &opennow=true
}
&key=@Model.ApiKey
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="results[*]">
<JsonPath Expr="id" Id="Id" Title="Id" Converter="String"/>
<JsonPath Expr="name" Id="Name" Title="Name" Converter="String"/>
<JsonPath Expr="place_id" Id="PlaceId" Title="Place Id" Converter="String"/>
<JsonPath Expr="vicinity" Id="Vicinity" Title="Vicinity" Converter="String"/>
<JsonPath Expr="types[0]" Id="Type" Title="Type" Converter="String"/>
<JsonPath Expr="geometry.location.lat" Id="Latitude" Title="Latitude" Converter="String"/>
<JsonPath Expr="geometry.location.lng" Id="Longitude" Title="Longitude" Converter="String"/>
<JsonPath Expr="price_level" Id="PriceLevel" Title="Price Level" Converter="Double" DefaultValue=""/>
<JsonPath Expr="rating" Id="Rating" Title="Rating" Converter="Double" DefaultValue=""/>
<Compute Id="Photo" Title="Photo" DefaultValue="">
<Compute.Expr>
<![CDATA[
@{
Regex regex = new Regex(@"""(.*?)""");
Match match = regex.Match(Model.PhotoInput);
string output = match.Groups[1].Value;
}
@output
]]>
</Compute.Expr>
<JsonPath Expr="photos[*].html_attributions[0]" Id="PhotoInput" Converter="String" DefaultValue=""/>
</Compute>
<JsonPath Expr="opening_hours.open_now" Id="OpenNow" Title="Open Now" Converter="Bool" DefaultValue=""/>
</JsonPath>
</Parse>
</RestConnector>
<RestConnector Id="PlaceDetails" Title="Place Details" HelpUrl="https://developers.google.com/places/web-service/details">
<Parameters>
<Text Id="PlaceId" Title="Place Id" Debug.DefaultValue="ChIJxU_2nmCdX0YRKvB-sHRf92U" Required="true"/>
</Parameters>
<Fetch>
<Fetch.Url>
<![CDATA[
https://maps.googleapis.com/maps/api/place/details/json
?placeid=@Model.PlaceId
&key=@Model.ApiKey
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="result">
<JsonPath Expr="id" Id="Id" Title="Id" Converter="String"/>
<JsonPath Expr="name" Id="Name" Title="Name" Converter="String"/>
<JsonPath Expr="formatted_address" Id="FormattedAdress" Title="Address" Converter="String" DefaultValue=""/>
<JsonPath Expr="formatted_phone_number" Id="FormattedPhone" Title="Phone" Converter="String" DefaultValue=""/>
<JsonPath Expr="international_phone_number" Id="InternationalPhone" Title="International Phone" Converter="String" DefaultValue=""/>
<JsonPath Expr="website" Id="Website" Title="Website" Converter="String" DefaultValue=""/>
<JsonPath Expr="vicinity" Id="Vicinity" Title="Vicinity" Converter="String"/>
<JsonPath Expr="types[0]" Id="Type" Title="Type" Converter="String"/>
<JsonPath Expr="geometry.location.lat" Id="Latitude" Title="Latitude" Converter="String"/>
<JsonPath Expr="geometry.location.lng" Id="Longitude" Title="Longitude" Converter="String"/>
<JsonPath Expr="price_level" Id="PriceLevel" Title="Price Level" Converter="Double" DefaultValue=""/>
<JsonPath Expr="rating" Id="Rating" Title="Rating" Converter="Double" DefaultValue=""/>
<Compute Id="Photo" Title="Photo" DefaultValue="">
<Compute.Expr>
<![CDATA[
@{
Regex regex = new Regex(@"""(.*?)""");
Match match = regex.Match(Model.PhotoInput);
string output = match.Groups[1].Value;
}
@output
]]>
</Compute.Expr>
<JsonPath Expr="photos[*].html_attributions[0]" Id="PhotoInput" Converter="String" DefaultValue=""/>
</Compute>
<JsonPath Expr="opening_hours.open_now" Id="OpenNow" Title="Open Now" Converter="Bool" DefaultValue=""/>
</JsonPath>
</Parse>
</RestConnector>
</Suite>
You can’t perform that action at this time.