mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-23 07:41:25 +00:00
Commit from GitHub Actions (Publish APIs & Clients)
This commit is contained in:
@@ -16,13 +16,13 @@ type HolidaysService struct {
|
|||||||
client *client.Client
|
client *client.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// Get the list of countries that are supported by this API
|
||||||
func (t *HolidaysService) Countries(request *CountriesRequest) (*CountriesResponse, error) {
|
func (t *HolidaysService) Countries(request *CountriesRequest) (*CountriesResponse, error) {
|
||||||
rsp := &CountriesResponse{}
|
rsp := &CountriesResponse{}
|
||||||
return rsp, t.client.Call("holidays", "Countries", request, rsp)
|
return rsp, t.client.Call("holidays", "Countries", request, rsp)
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// List the holiday dates for a given country and year
|
||||||
func (t *HolidaysService) List(request *ListRequest) (*ListResponse, error) {
|
func (t *HolidaysService) List(request *ListRequest) (*ListResponse, error) {
|
||||||
rsp := &ListResponse{}
|
rsp := &ListResponse{}
|
||||||
return rsp, t.client.Call("holidays", "List", request, rsp)
|
return rsp, t.client.Call("holidays", "List", request, rsp)
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ type Verse struct {
|
|||||||
// The basic translation of the verse
|
// The basic translation of the verse
|
||||||
TranslatedText string `json:"translatedText"`
|
TranslatedText string `json:"translatedText"`
|
||||||
// The alternative translations for the verse
|
// The alternative translations for the verse
|
||||||
Translations []Translation `json:"translations"`
|
Translations []Interpretation `json:"translations"`
|
||||||
// The phonetic transliteration from arabic
|
// The phonetic transliteration from arabic
|
||||||
Transliteration string `json:"transliteration"`
|
Transliteration string `json:"transliteration"`
|
||||||
// The individual words within the verse (Ayah)
|
// The individual words within the verse (Ayah)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export class HolidaysService {
|
|||||||
constructor(token: string) {
|
constructor(token: string) {
|
||||||
this.client = new m3o.Client({ token: token });
|
this.client = new m3o.Client({ token: token });
|
||||||
}
|
}
|
||||||
//
|
// Get the list of countries that are supported by this API
|
||||||
countries(request: CountriesRequest): Promise<CountriesResponse> {
|
countries(request: CountriesRequest): Promise<CountriesResponse> {
|
||||||
return this.client.call(
|
return this.client.call(
|
||||||
"holidays",
|
"holidays",
|
||||||
@@ -14,7 +14,7 @@ export class HolidaysService {
|
|||||||
request
|
request
|
||||||
) as Promise<CountriesResponse>;
|
) as Promise<CountriesResponse>;
|
||||||
}
|
}
|
||||||
//
|
// List the holiday dates for a given country and year
|
||||||
list(request: ListRequest): Promise<ListResponse> {
|
list(request: ListRequest): Promise<ListResponse> {
|
||||||
return this.client.call(
|
return this.client.call(
|
||||||
"holidays",
|
"holidays",
|
||||||
|
|||||||
@@ -60,5 +60,5 @@
|
|||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"version": "1.0.523"
|
"version": "1.0.524"
|
||||||
}
|
}
|
||||||
@@ -11,10 +11,10 @@ func CreateArecord() {
|
|||||||
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
|
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := dbService.Create(&db.CreateRequest{
|
rsp, err := dbService.Create(&db.CreateRequest{
|
||||||
Record: map[string]interface{}{
|
Record: map[string]interface{}{
|
||||||
|
"id": "1",
|
||||||
"name": "Jane",
|
"name": "Jane",
|
||||||
"age": 42,
|
"age": 42,
|
||||||
"isActive": true,
|
"isActive": true,
|
||||||
"id": "1",
|
|
||||||
},
|
},
|
||||||
Table: "users",
|
Table: "users",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
//
|
// Get the list of countries that are supported by this API
|
||||||
func ListCountries() {
|
func ListCountries() {
|
||||||
holidaysService := holidays.NewHolidaysService(os.Getenv("MICRO_API_TOKEN"))
|
holidaysService := holidays.NewHolidaysService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := holidaysService.Countries(&holidays.CountriesRequest{})
|
rsp, err := holidaysService.Countries(&holidays.CountriesRequest{})
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as holidays from "m3o/holidays";
|
import * as holidays from "m3o/holidays";
|
||||||
|
|
||||||
//
|
// Get the list of countries that are supported by this API
|
||||||
async function ListCountries() {
|
async function ListCountries() {
|
||||||
let holidaysService = new holidays.HolidaysService(
|
let holidaysService = new holidays.HolidaysService(
|
||||||
process.env.MICRO_API_TOKEN
|
process.env.MICRO_API_TOKEN
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
//
|
// List the holiday dates for a given country and year
|
||||||
func GetHolidays() {
|
func GetHolidays() {
|
||||||
holidaysService := holidays.NewHolidaysService(os.Getenv("MICRO_API_TOKEN"))
|
holidaysService := holidays.NewHolidaysService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := holidaysService.List(&holidays.ListRequest{
|
rsp, err := holidaysService.List(&holidays.ListRequest{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as holidays from "m3o/holidays";
|
import * as holidays from "m3o/holidays";
|
||||||
|
|
||||||
//
|
// List the holiday dates for a given country and year
|
||||||
async function GetHolidays() {
|
async function GetHolidays() {
|
||||||
let holidaysService = new holidays.HolidaysService(
|
let holidaysService = new holidays.HolidaysService(
|
||||||
process.env.MICRO_API_TOKEN
|
process.env.MICRO_API_TOKEN
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ func PublishAmessage() {
|
|||||||
streamService := stream.NewStreamService(os.Getenv("MICRO_API_TOKEN"))
|
streamService := stream.NewStreamService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := streamService.Publish(&stream.PublishRequest{
|
rsp, err := streamService.Publish(&stream.PublishRequest{
|
||||||
Message: map[string]interface{}{
|
Message: map[string]interface{}{
|
||||||
|
"id": "1",
|
||||||
"type": "signup",
|
"type": "signup",
|
||||||
"user": "john",
|
"user": "john",
|
||||||
"id": "1",
|
|
||||||
},
|
},
|
||||||
Topic: "events",
|
Topic: "events",
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user