How to create full list of Google API
I have uploaded my code to https://github.com/Alex-1347/FullListOfGoogleApi/blob/main/GoogleDiscovery/GoogleDiscovery/Module1.vb
1: Imports System
2: Imports System.Threading.Tasks
3: Imports Google
4: Imports Google.Apis.Discovery.v1
5: Imports Google.Apis.Discovery.v1.Data
6: Imports Google.Apis.Services
7: Module Module1
8: Dim ApiKey As String = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
9: Dim ResultName As String = IO.Path.Combine(My.Computer.FileSystem.CurrentDirectory, "GoogleApi.html")
10: Dim Title As String = "Google API list"
11:
12: Sub Main()
13: Console.WriteLine("Discovery API Sample")
14: Console.WriteLine("====================")
15: Dim ApiList As List(Of Tuple(Of String, String, String, String))
16: Try
17: ApiList = Run().Result
18: Catch ex As AggregateException
19: For Each e In ex.InnerExceptions
20: Console.WriteLine("ERROR: " & e.Message)
21: Next
22: End Try
23: My.Computer.FileSystem.WriteAllText(ResultName, $"<html><title>{Title}</title><style>{CSS}</style><body><table>", False)
24: ApiList.Sort(Function(X, Y) X.Item2.CompareTo(Y.Item2))
25: Dim Body As New Text.StringBuilder
26: ApiList.ForEach(Sub(X) Body.Append($"<tr><td>{X.Item2}</td><td><a href='{X.Item3}'>{X.Item3}</a></td><td><a href='{X.Item4}'>{X.Item1}</a></td></tr>"))
27: My.Computer.FileSystem.WriteAllText(ResultName, Body.ToString, True)
28: My.Computer.FileSystem.WriteAllText(ResultName, "</table></body></html>", True)
29: Console.WriteLine($"Result write to {ResultName}")
30: Console.ReadKey()
31: End Sub
32:
33: Async Function Run() As Task(Of List(Of Tuple(Of String, String, String, String)))
34: Dim ApiList As New List(Of Tuple(Of String, String, String, String))
35: Dim Service = New DiscoveryService(New BaseClientService.Initializer With {
36: .ApplicationName = Title,
37: .ApiKey = ApiKey
38: })
39: Console.WriteLine("Executing a list request...")
40: Dim Result = Await Service.Apis.List().ExecuteAsync()
41: If Result.Items IsNot Nothing Then
42: Dim I As Integer = 0
43: For Each Api As DirectoryList.ItemsData In Result.Items
44: I = I + 1
45: Console.WriteLine($"{I}. {Api.Id} - {Api.Title}")
46: ApiList.Add(New Tuple(Of String, String, String, String)(Api.Id, Api.Title, Api.DocumentationLink, Api.DiscoveryRestUrl))
47: Next
48: End If
49: Return ApiList
50: End Function
51:
52: Dim CSS As String = "table {
53: counter-reset: rowNumber;
54: }
55: table tr::before {
56: display: table-cell;
57: counter-increment: rowNumber;
58: content: counter(rowNumber) '.';
59: padding-right: 0.3em;
60: text-align: right;
61: }"
62:
63:
64: End Module
This is instruction to receive Google API key https://github.com/Alex-1347/FullListOfGoogleApi/blob/main/README.md
And this is result GoogleApi.html
Related page:
I have used a number of this API on my projects, for example :
- this project based on Google task Refactoring of TaskBased GoogleCloud project
- many times I have used Youtube API Parse Yotube response by Newtonsoft.Json
- MongoDB - noSQL-database for irregular JSON data (Youtube API).
- How to build application server based on push notification from Firebase
- and other Google API.
In other case I like free Cloud service:
- Cloudflare feature overview.
- Cloudflare Worker and Supabase learning start point.
- Serverless Telegram bot on Cloudflare.
Comments (
)
<00>
<01>
<02>
<03>
<04>
<05>
<06>
<07>
<08>
<09>
<10>
<11>
<12>
<13>
<14>
<15>
<16>
<17>
<18>
<19>
<20>
<21>
<22>
<23>
Link to this page:
http://www.vb-net.com/GoogleApiDiscovery/Index.htm
<SITEMAP> <MVC> <ASP> <NET> <DATA> <KIOSK> <FLEX> <SQL> <NOTES> <LINUX> <MONO> <FREEWARE> <DOCS> <ENG> <CHAT ME> <ABOUT ME> < THANKS ME> |