Generate clients (#206)

This commit is contained in:
Janos Dobronszki
2021-09-16 12:52:36 +01:00
committed by GitHub
parent 552c321dd7
commit d4d9c1c176
334 changed files with 9334 additions and 45 deletions

View File

@@ -0,0 +1,8 @@
curl "https://api.m3o.com/v1/thumbnail/Screenshot" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MICRO_API_TOKEN" \
-d '{
"height": 600,
"url": "https://m3o.com",
"width": 600
}'

View File

@@ -0,0 +1,18 @@
package example
import (
"fmt"
"github.com/micro/services/clients/go/thumbnail"
"os"
)
// Create a thumbnail screenshot by passing in a url, height and width
func TakeScreenshotOfAurl() {
thumbnailService := thumbnail.NewThumbnailService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := thumbnailService.Screenshot(&thumbnail.ScreenshotRequest{
Height: 600,
Url: "https://m3o.com",
Width: 600,
})
fmt.Println(rsp, err)
}

View File

@@ -0,0 +1,16 @@
import * as thumbnail from "m3o/thumbnail";
// Create a thumbnail screenshot by passing in a url, height and width
async function TakeScreenshotOfAurl() {
let thumbnailService = new thumbnail.ThumbnailService(
process.env.MICRO_API_TOKEN
);
let rsp = await thumbnailService.screenshot({
height: 600,
url: "https://m3o.com",
width: 600,
});
console.log(rsp);
}
await TakeScreenshotOfAurl();