mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-16 04:54:42 +00:00
Commit from GitHub Actions (Publish APIs & Clients)
This commit is contained in:
6
examples/prayer/times/curl/prayerTimes.sh
Executable file
6
examples/prayer/times/curl/prayerTimes.sh
Executable 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"
|
||||
}'
|
||||
16
examples/prayer/times/go/prayerTimes.go
Executable file
16
examples/prayer/times/go/prayerTimes.go
Executable 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)
|
||||
}
|
||||
12
examples/prayer/times/node/prayerTimes.js
Executable file
12
examples/prayer/times/node/prayerTimes.js
Executable 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();
|
||||
Reference in New Issue
Block a user