Commit from GitHub Actions (Publish APIs & Clients)

This commit is contained in:
asim
2021-10-25 10:42:12 +00:00
parent 55464e8104
commit 30673f9837
10 changed files with 101 additions and 8 deletions

View File

@@ -12,10 +12,10 @@ func CreateArecord() {
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := dbService.Create(&db.CreateRequest{
Record: map[string]interface{}{
"id": "1",
"name": "Jane",
"age": 42,
"isActive": true,
"id": "1",
},
Table: "users",
})

View File

@@ -0,0 +1,6 @@
curl "https://api.m3o.com/v1/youtube/Search" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MICRO_API_TOKEN" \
-d '{
"query": "donuts"
}'

View File

@@ -0,0 +1,17 @@
package example
import (
"fmt"
"os"
"github.com/micro/services/clients/go/youtube"
)
// Search for videos on YouTube
func SearchForVideos() {
youtubeService := youtube.NewYoutubeService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := youtubeService.Search(&youtube.SearchRequest{
Query: "donuts",
})
fmt.Println(rsp, err)
}

View File

@@ -0,0 +1,12 @@
const { YoutubeService } = require("m3o/youtube");
// Search for videos on YouTube
async function searchForVideos() {
let youtubeService = new YoutubeService(process.env.MICRO_API_TOKEN);
let rsp = await youtubeService.search({
query: "donuts",
});
console.log(rsp);
}
searchForVideos();