Skip to content

Commit

Permalink
Commit from GitHub Actions (Publish APIs & Clients)
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Sep 22, 2021
1 parent 2d70217 commit 77c32ac
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 7 deletions.
2 changes: 1 addition & 1 deletion clients/go/prayer/prayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type PrayerService struct {
client *client.Client
}

//
// Get the prayer (salah) times for a location on a given date
func (t *PrayerService) Times(request *TimesRequest) (*TimesResponse, error) {
rsp := &TimesResponse{}
return rsp, t.client.Call("prayer", "Times", request, rsp)
Expand Down
2 changes: 1 addition & 1 deletion clients/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@
},
"type": "module",
"types": "dist/index.d.ts",
"version": "1.0.527"
"version": "1.0.528"
}
2 changes: 1 addition & 1 deletion clients/ts/prayer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class PrayerService {
constructor(token: string) {
this.client = new m3o.Client({ token: token });
}
//
// Get the prayer (salah) times for a location on a given date
times(request: TimesRequest): Promise<TimesResponse> {
return this.client.call(
"prayer",
Expand Down
4 changes: 2 additions & 2 deletions examples/db/create/go/createARecord.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ func CreateArecord() {
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := dbService.Create(&db.CreateRequest{
Record: map[string]interface{}{
"name": "Jane",
"age": 42,
"isActive": true,
"id": "1",
"name": "Jane",
"age": 42,
},
Table: "users",
})
Expand Down
2 changes: 1 addition & 1 deletion examples/prayer/times/go/prayerTimes.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
)

//
// Get the prayer (salah) times for a location on a given date
func PrayerTimes() {
prayerService := prayer.NewPrayerService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := prayerService.Times(&prayer.TimesRequest{
Expand Down
2 changes: 1 addition & 1 deletion examples/prayer/times/node/prayerTimes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as prayer from "m3o/prayer";

//
// Get the prayer (salah) times for a location on a given date
async function PrayerTimes() {
let prayerService = new prayer.PrayerService(process.env.MICRO_API_TOKEN);
let rsp = await prayerService.times({
Expand Down
7 changes: 7 additions & 0 deletions examples/weather/forecast/curl/forecastWeather.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
curl "https://api.m3o.com/v1/weather/Forecast" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MICRO_API_TOKEN" \
-d '{
"days": 2,
"location": "London"
}'
17 changes: 17 additions & 0 deletions examples/weather/forecast/go/forecastWeather.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package example

import (
"fmt"
"github.com/micro/services/clients/go/weather"
"os"
)

// Get the weather forecast for the next 1-10 days
func ForecastWeather() {
weatherService := weather.NewWeatherService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := weatherService.Forecast(&weather.ForecastRequest{
Days: 2,
Location: "London",
})
fmt.Println(rsp, err)
}
13 changes: 13 additions & 0 deletions examples/weather/forecast/node/forecastWeather.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as weather from "m3o/weather";

// Get the weather forecast for the next 1-10 days
async function ForecastWeather() {
let weatherService = new weather.WeatherService(process.env.MICRO_API_TOKEN);
let rsp = await weatherService.forecast({
days: 2,
location: "London",
});
console.log(rsp);
}

await ForecastWeather();

0 comments on commit 77c32ac

Please sign in to comment.