• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

vivet/GoogleApi: C# .NET Core Google Api (Maps, Places, Roads, Search, Translate ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

vivet/GoogleApi

开源软件地址:

https://github.com/vivet/GoogleApi

开源编程语言:

C# 100.0%

开源软件介绍:

Google Api

Build status NuGet NuGet

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).

Getting started...

The library is extremely easy to consume and use.
Each api implementation consists of a request and a response, as well as a generic facade operation to execute the request and return the response. The request has properties reflecting the parameters supported, and the response represents the object model for the returned json.

The example below, simply populates a request, invokes the facade operation, and recieves the response in return.

TRequest request = new TRequest();
TResponse response = await {Api}.{Action}.QueryAsync<TRequest, TResponse>(request);

A few other noteworthy members.

Request
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
response.RawJson // The raw json returned by Google.
response.RawQueryString // The querystring sent to Google when invoking the request.

Supported Operations

The following operations are supported.

Google Maps
  • Directions
  • Distance Matrix
  • Elevation
  • Geocode
    • Place
    • Address
    • Location (reverse)
    • Plus Code
  • Geolocation
  • Roads
    • Nearest Roads
    • Snap To Roads
    • Speed Limits
  • Time Zone
  • Street View
  • Static Maps
Google Places
  • Place Search
    • Find
    • Near By
    • Text
  • Place Details
  • Place Photos
  • Place Autocomplete
  • Query Autocomplete
Google Search
  • Web
  • Image
  • Video (beta)
    • Channels
    • Playlists
    • Vidoes
Google Translate
  • Detect
  • Languages
  • 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": "",
  "CryptoKey": "",
  "ClientId": "",
  "SearchEngineId": "",
}

More information about generating a key can be found here: https://console.developers.google.com/





鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap