mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
Commit from GitHub Actions (Publish APIs & Clients)
This commit is contained in:
@@ -12,8 +12,8 @@ func UpdateArecord() {
|
||||
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := dbService.Update(&db.UpdateRequest{
|
||||
Record: map[string]interface{}{
|
||||
"id": "1",
|
||||
"age": 43,
|
||||
"id": "1",
|
||||
},
|
||||
Table: "users",
|
||||
})
|
||||
|
||||
6
examples/google/search/curl/searchForVideos.sh
Executable file
6
examples/google/search/curl/searchForVideos.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
curl "https://api.m3o.com/v1/google/Search" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer $MICRO_API_TOKEN" \
|
||||
-d '{
|
||||
"query": "how to make donuts"
|
||||
}'
|
||||
17
examples/google/search/go/searchForVideos.go
Executable file
17
examples/google/search/go/searchForVideos.go
Executable file
@@ -0,0 +1,17 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/micro/services/clients/go/google"
|
||||
)
|
||||
|
||||
// Search for videos on Google
|
||||
func SearchForVideos() {
|
||||
googleService := google.NewGoogleService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := googleService.Search(&google.SearchRequest{
|
||||
Query: "how to make donuts",
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
12
examples/google/search/node/searchForVideos.js
Executable file
12
examples/google/search/node/searchForVideos.js
Executable file
@@ -0,0 +1,12 @@
|
||||
const { GoogleService } = require("m3o/google");
|
||||
|
||||
// Search for videos on Google
|
||||
async function searchForVideos() {
|
||||
let googleService = new GoogleService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await googleService.search({
|
||||
query: "how to make donuts",
|
||||
});
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
searchForVideos();
|
||||
Reference in New Issue
Block a user