add google search (#242)

* add google search

* fix git ignore

* Charge 1c for search queries
This commit is contained in:
Asim Aslam
2021-10-25 12:16:41 +01:00
committed by GitHub
parent 30673f9837
commit 0bfe1e3c19
13 changed files with 656 additions and 0 deletions

35
google/proto/google.proto Normal file
View File

@@ -0,0 +1,35 @@
syntax = "proto3";
package google;
option go_package = "./proto;google";
service Google {
rpc Search(SearchRequest) returns (SearchResponse) {}
}
message SearchResult {
// id of the result
string id = 1;
// kind of result; "search"
string kind = 2;
// title of the result
string title = 3;
// the result snippet
string snippet = 4;
// the full url for the result
string url = 5;
// abridged version of this search results URL, e.g. www.exampe.com
string display_url = 6;
}
// Search for videos on Google
message SearchRequest {
// Query to search for
string query = 1;
}
message SearchResponse {
// List of results for the query
repeated SearchResult results = 1;
}