mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-19 14:05:23 +00:00
Commit from GitHub Actions (Publish APIs & Clients)
This commit is contained in:
@@ -16,7 +16,7 @@ type GifsService struct {
|
|||||||
client *client.Client
|
client *client.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search for a gif
|
// Search for a GIF
|
||||||
func (t *GifsService) Search(request *SearchRequest) (*SearchResponse, error) {
|
func (t *GifsService) Search(request *SearchRequest) (*SearchResponse, error) {
|
||||||
rsp := &SearchResponse{}
|
rsp := &SearchResponse{}
|
||||||
return rsp, t.client.Call("gifs", "Search", request, rsp)
|
return rsp, t.client.Call("gifs", "Search", request, rsp)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import (
|
|||||||
"github.com/micro/services/clients/go/forex"
|
"github.com/micro/services/clients/go/forex"
|
||||||
"github.com/micro/services/clients/go/function"
|
"github.com/micro/services/clients/go/function"
|
||||||
"github.com/micro/services/clients/go/geocoding"
|
"github.com/micro/services/clients/go/geocoding"
|
||||||
|
"github.com/micro/services/clients/go/gifs"
|
||||||
"github.com/micro/services/clients/go/google"
|
"github.com/micro/services/clients/go/google"
|
||||||
"github.com/micro/services/clients/go/helloworld"
|
"github.com/micro/services/clients/go/helloworld"
|
||||||
"github.com/micro/services/clients/go/holidays"
|
"github.com/micro/services/clients/go/holidays"
|
||||||
@@ -61,6 +62,7 @@ func NewClient(token string) *Client {
|
|||||||
ForexService: forex.NewForexService(token),
|
ForexService: forex.NewForexService(token),
|
||||||
FunctionService: function.NewFunctionService(token),
|
FunctionService: function.NewFunctionService(token),
|
||||||
GeocodingService: geocoding.NewGeocodingService(token),
|
GeocodingService: geocoding.NewGeocodingService(token),
|
||||||
|
GifsService: gifs.NewGifsService(token),
|
||||||
GoogleService: google.NewGoogleService(token),
|
GoogleService: google.NewGoogleService(token),
|
||||||
HelloworldService: helloworld.NewHelloworldService(token),
|
HelloworldService: helloworld.NewHelloworldService(token),
|
||||||
HolidaysService: holidays.NewHolidaysService(token),
|
HolidaysService: holidays.NewHolidaysService(token),
|
||||||
@@ -108,6 +110,7 @@ type Client struct {
|
|||||||
ForexService *forex.ForexService
|
ForexService *forex.ForexService
|
||||||
FunctionService *function.FunctionService
|
FunctionService *function.FunctionService
|
||||||
GeocodingService *geocoding.GeocodingService
|
GeocodingService *geocoding.GeocodingService
|
||||||
|
GifsService *gifs.GifsService
|
||||||
GoogleService *google.GoogleService
|
GoogleService *google.GoogleService
|
||||||
HelloworldService *helloworld.HelloworldService
|
HelloworldService *helloworld.HelloworldService
|
||||||
HolidaysService *holidays.HolidaysService
|
HolidaysService *holidays.HolidaysService
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import * as file from "./file";
|
|||||||
import * as forex from "./forex";
|
import * as forex from "./forex";
|
||||||
import * as fx from "./function";
|
import * as fx from "./function";
|
||||||
import * as geocoding from "./geocoding";
|
import * as geocoding from "./geocoding";
|
||||||
|
import * as gifs from "./gifs";
|
||||||
import * as google from "./google";
|
import * as google from "./google";
|
||||||
import * as helloworld from "./helloworld";
|
import * as helloworld from "./helloworld";
|
||||||
import * as holidays from "./holidays";
|
import * as holidays from "./holidays";
|
||||||
@@ -55,6 +56,7 @@ export class Client {
|
|||||||
this.forexService = new forex.ForexService(token);
|
this.forexService = new forex.ForexService(token);
|
||||||
this.functionService = new fx.FunctionService(token);
|
this.functionService = new fx.FunctionService(token);
|
||||||
this.geocodingService = new geocoding.GeocodingService(token);
|
this.geocodingService = new geocoding.GeocodingService(token);
|
||||||
|
this.gifsService = new gifs.GifsService(token);
|
||||||
this.googleService = new google.GoogleService(token);
|
this.googleService = new google.GoogleService(token);
|
||||||
this.helloworldService = new helloworld.HelloworldService(token);
|
this.helloworldService = new helloworld.HelloworldService(token);
|
||||||
this.holidaysService = new holidays.HolidaysService(token);
|
this.holidaysService = new holidays.HolidaysService(token);
|
||||||
@@ -98,6 +100,7 @@ export class Client {
|
|||||||
forexService: forex.ForexService;
|
forexService: forex.ForexService;
|
||||||
functionService: fx.FunctionService;
|
functionService: fx.FunctionService;
|
||||||
geocodingService: geocoding.GeocodingService;
|
geocodingService: geocoding.GeocodingService;
|
||||||
|
gifsService: gifs.GifsService;
|
||||||
googleService: google.GoogleService;
|
googleService: google.GoogleService;
|
||||||
helloworldService: helloworld.HelloworldService;
|
helloworldService: helloworld.HelloworldService;
|
||||||
holidaysService: holidays.HolidaysService;
|
holidaysService: holidays.HolidaysService;
|
||||||
|
|||||||
@@ -76,5 +76,5 @@
|
|||||||
"prepare": "npm run build"
|
"prepare": "npm run build"
|
||||||
},
|
},
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"version": "1.0.564"
|
"version": "1.0.565"
|
||||||
}
|
}
|
||||||
@@ -12,10 +12,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",
|
|
||||||
"age": 42,
|
"age": 42,
|
||||||
"isActive": true,
|
"isActive": true,
|
||||||
|
"id": "1",
|
||||||
|
"name": "Jane",
|
||||||
},
|
},
|
||||||
Table: "users",
|
Table: "users",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ func UpdateArecord() {
|
|||||||
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
|
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := dbService.Update(&db.UpdateRequest{
|
rsp, err := dbService.Update(&db.UpdateRequest{
|
||||||
Record: map[string]interface{}{
|
Record: map[string]interface{}{
|
||||||
"age": 43,
|
|
||||||
"id": "1",
|
"id": "1",
|
||||||
|
"age": 43,
|
||||||
},
|
},
|
||||||
Table: "users",
|
Table: "users",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,11 +2,12 @@ package example
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/micro/services/clients/go/gifs"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/micro/services/clients/go/gifs"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Search for a gif
|
// Search for a GIF
|
||||||
func Search() {
|
func Search() {
|
||||||
gifsService := gifs.NewGifsService(os.Getenv("MICRO_API_TOKEN"))
|
gifsService := gifs.NewGifsService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := gifsService.Search(&gifs.SearchRequest{
|
rsp, err := gifsService.Search(&gifs.SearchRequest{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import * as gifs from "m3o/gifs";
|
const { GifsService } = require("m3o/gifs");
|
||||||
|
|
||||||
// Search for a gif
|
// Search for a GIF
|
||||||
async function Search() {
|
async function search() {
|
||||||
let gifsService = new gifs.GifsService(process.env.MICRO_API_TOKEN);
|
let gifsService = new GifsService(process.env.MICRO_API_TOKEN);
|
||||||
let rsp = await gifsService.search({
|
let rsp = await gifsService.search({
|
||||||
limit: 2,
|
limit: 2,
|
||||||
query: "dogs",
|
query: "dogs",
|
||||||
@@ -10,4 +10,4 @@ async function Search() {
|
|||||||
console.log(rsp);
|
console.log(rsp);
|
||||||
}
|
}
|
||||||
|
|
||||||
await Search();
|
search();
|
||||||
|
|||||||
Reference in New Issue
Block a user