GoogleApi 5.7.1
See the version list below for details.
dotnet add package GoogleApi --version 5.7.1
NuGet\Install-Package GoogleApi -Version 5.7.1
<PackageReference Include="GoogleApi" Version="5.7.1" />
paket add GoogleApi --version 5.7.1
#r "nuget: GoogleApi, 5.7.1"
// Install GoogleApi as a Cake Addin #addin nuget:?package=GoogleApi&version=5.7.1 // Install GoogleApi as a Cake Tool #tool nuget:?package=GoogleApi&version=5.7.1
Google Api
Seamless Google Api integrations.
Google Maps, Places, Roads, Search and Translate.
Feel free to contribute, throw questions and report issues. I usually respond fast (24-48 hours).
Do you need support for an additional .Net framework?, let me know.
New: Version 5.0.0 with Routes Api (directions and matrix), Ariel View Api and Address Validation Api.
Using the Library
The library may be consumed, either by using the individual facede implementations or by depdendency injecting the individual api's.
Each api implementation consists of a request and a response. The request has properties reflecting the parameters supported, and the response represents the object model for the returned json.
A few other noteworthy members.
var uri = request.GetUri(); // Gets the full request uri, including query parameters.
var params = request.GetQUeryStringParameters(); // Gets a list of all the added parameters.
response.RawJson // The raw json returned by Google.
response.RawQueryString // The querystring sent to Google when invoking the request.
Facade
Each api has a generic facade operation to execute the request and return the response.
The example below, simply populates a request, invokes the facade operation, and receives the response in return.
TRequest request = new TRequest();
TResponse response = await {Api}.[{SubGroup}].{Action}.QueryAsync<TRequest, TResponse>(request);
See below for a full list of supported Api's and actions.
Dependency Injection
If injecting the api's as dependencies is preffered register the services during startup, as shown below.
services
.AddGoogleApiClients();
Then, inject the individual Api's in constructors as needed
public class MyClass
{
private Api api;
public MyClass(Api api)
{
this.api = api
}
}
See below for a full list of supported Api's and actions.
Proxy
If a WebProxy
is required set the static property HttpClientFactory.Proxy
before registrering the GoogleApi dependencies or using the Facade.
Supported Api's
The following api's are supported.
Google Maps
- Directions (
GoogleMaps.Directions
) - Distance Matrix (
GoogleMaps.DistanceMatrix
) - Elevation (
GoogleMaps.Elevation
) - Geocode
- Place (
GoogleMaps.Geocode.PlaceGeocode
) - Address (
GoogleMaps.Geocode.AddressGeocode
) - Location (reverse) (
GoogleMaps.Geocode.LocationGeocode
) - Plus Code (
GoogleMaps.Geocode.PlusCodeGeocode
)
- Place (
- Geolocation (
GoogleMaps.Geolocation
) - Roads
- Nearest Roads (
GoogleMaps.Roads.NearestRoads
) - Snap To Roads (
GoogleMaps.Roads.SnapToRoad
) - Speed Limits (
GoogleMaps.Roads.SpeedLimits
)
- Nearest Roads (
- Time Zone
- Street View
- Static Maps
- Routes
- RouteDirections (
GoogleMaps.Routes.Directions
) - RouteMatrix (
GoogleMaps.Routes.Matrix
)
- RouteDirections (
- Address Validation (
GoogleMaps.AddressValidation
) - Aerial View (beta)
- Get Video (
GoogleMaps.AerialView.GetVideo
) - Render Video (
GoogleMaps.AerialView.RenderVideo
)
- Get Video (
Google Places
- Place Search
- Find (
GooglePlaces.Search.FindSearch
) - Near By (
GooglePlaces.Search.NearBySearch
) - Text (
GooglePlaces.Search.TextSearch
)
- Find (
- Place Details (
GooglePlaces.Details
) - Place Photos (
GooglePlaces.Photos
) - Place Autocomplete (
GooglePlaces.AutoComplete
) - Query Autocomplete (
GooglePlaces.QueryAutoComplete
)
Google Search
- Web (
GoogleSearch.WebSearch
) - Image (
GoogleSearch.ImageSearch
) - Video
- Channels (
GoogleSearch.VideoSearch.Channels
) - Playlists (
GoogleSearch.VideoSearch.Playlists
) - Vidoes (
GoogleSearch.VideoSearch.Vidoes
)
- Channels (
Google Translate
- Detect (
GoogleTranslate.Detect
) - Languages (
GoogleTranslate.Languages
) - Translate (
GoogleTranslate.Translate
)
Google Functions
- MergePolyLine
- EncodePolyLine
- DecodePolyLine
Running Test Suite
Running the test suite is simple.
The test project stores settings related to your Google subscription (free or paid) in application.default.json
.
Most importantly, the ApiKey
, used to identify the Google subscription.
{
"ApiKey": "",
"SearchEngineId": "",
}
More information about generating a key can be found here: https://console.developers.google.com/
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
-
.NETFramework 4.8
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
-
.NETFramework 4.8.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
-
.NETStandard 2.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
-
.NETStandard 2.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
-
net9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
NuGet packages (20)
Showing the top 5 NuGet packages that depend on GoogleApi:
Package | Downloads |
---|---|
Soenneker.Google.Places
A utility library for Google Places API operations |
|
Soenneker.Google.Geocode
A utility library for Google Geocode API operations |
|
CoreModule
Core module of the modular system do standard micro service applications. |
|
ByteologyLLC.GoogleApiModule.Domain.Shared
Domain.Shared module for ABP Framework projects. |
|
Ideom.Resources.Location
Provides access to locations resources |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
5.7.3 | 719 | 12/22/2024 |
5.7.2 | 2,340 | 12/16/2024 |
5.7.1 | 312 | 12/14/2024 |
5.7.0 | 727 | 12/10/2024 |
5.6.0 | 15,930 | 11/19/2024 |
5.5.6 | 223 | 11/19/2024 |
5.5.5 | 24,755 | 11/1/2024 |
5.4.9 | 7,139 | 10/19/2024 |
5.4.8 | 38,381 | 9/16/2024 |
5.4.7 | 11,439 | 9/5/2024 |
5.4.6 | 21,420 | 8/29/2024 |
5.4.5 | 19,731 | 8/13/2024 |
5.4.4 | 55,400 | 6/28/2024 |
5.4.3 | 68,003 | 5/9/2024 |
- Fixed RoutesDirectionsResponse.GeoJsonLinestring where lat/lng was opposite.