Commit from GitHub Actions (Publish APIs & Clients)

This commit is contained in:
asim
2021-09-22 11:52:45 +00:00
parent e841bc0ac6
commit cecb7ee50e
8 changed files with 174 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
curl "https://api.m3o.com/v1/prayer/Times" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MICRO_API_TOKEN" \
-d '{
"location": "london"
}'

View File

@@ -0,0 +1,16 @@
package example
import (
"fmt"
"github.com/micro/services/clients/go/prayer"
"os"
)
//
func PrayerTimes() {
prayerService := prayer.NewPrayerService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := prayerService.Times(&prayer.TimesRequest{
Location: "london",
})
fmt.Println(rsp, err)
}

View File

@@ -0,0 +1,12 @@
import * as prayer from "m3o/prayer";
//
async function PrayerTimes() {
let prayerService = new prayer.PrayerService(process.env.MICRO_API_TOKEN);
let rsp = await prayerService.times({
location: "london",
});
console.log(rsp);
}
await PrayerTimes();