Commit from GitHub Actions (Publish APIs & Clients)

This commit is contained in:
asim
2021-10-25 11:21:28 +00:00
parent 0bfe1e3c19
commit c6debbaf8a
9 changed files with 93 additions and 2 deletions

View File

@@ -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",
})

View 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"
}'

View 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)
}

View 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();