diff --git a/clients/go/prayer/prayer.go b/clients/go/prayer/prayer.go index 053ed019cd..cfafcc70a7 100755 --- a/clients/go/prayer/prayer.go +++ b/clients/go/prayer/prayer.go @@ -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) diff --git a/clients/ts/package.json b/clients/ts/package.json index bf96038560..1037b54bc2 100644 --- a/clients/ts/package.json +++ b/clients/ts/package.json @@ -61,5 +61,5 @@ }, "type": "module", "types": "dist/index.d.ts", - "version": "1.0.527" + "version": "1.0.528" } \ No newline at end of file diff --git a/clients/ts/prayer/index.ts b/clients/ts/prayer/index.ts index 673a2e2457..db8a0923ed 100755 --- a/clients/ts/prayer/index.ts +++ b/clients/ts/prayer/index.ts @@ -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 { return this.client.call( "prayer", diff --git a/examples/db/create/go/createARecord.go b/examples/db/create/go/createARecord.go index c582849bca..f9cc6bcf69 100755 --- a/examples/db/create/go/createARecord.go +++ b/examples/db/create/go/createARecord.go @@ -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", }) diff --git a/examples/prayer/times/go/prayerTimes.go b/examples/prayer/times/go/prayerTimes.go index 4a7d806684..eaa4f58cf3 100755 --- a/examples/prayer/times/go/prayerTimes.go +++ b/examples/prayer/times/go/prayerTimes.go @@ -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{ diff --git a/examples/prayer/times/node/prayerTimes.js b/examples/prayer/times/node/prayerTimes.js index b1b6b63c7c..a4a3004f7b 100755 --- a/examples/prayer/times/node/prayerTimes.js +++ b/examples/prayer/times/node/prayerTimes.js @@ -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({ diff --git a/examples/weather/forecast/curl/forecastWeather.sh b/examples/weather/forecast/curl/forecastWeather.sh new file mode 100755 index 0000000000..4fa63ddf83 --- /dev/null +++ b/examples/weather/forecast/curl/forecastWeather.sh @@ -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" +}' \ No newline at end of file diff --git a/examples/weather/forecast/go/forecastWeather.go b/examples/weather/forecast/go/forecastWeather.go new file mode 100755 index 0000000000..cb9f6deaef --- /dev/null +++ b/examples/weather/forecast/go/forecastWeather.go @@ -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) +} diff --git a/examples/weather/forecast/node/forecastWeather.js b/examples/weather/forecast/node/forecastWeather.js new file mode 100755 index 0000000000..eca7227dda --- /dev/null +++ b/examples/weather/forecast/node/forecastWeather.js @@ -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();