From 901e637687aa4272e7997f9d7df6f609277fee56 Mon Sep 17 00:00:00 2001 From: Dominic Wong Date: Thu, 7 Oct 2021 14:58:26 +0100 Subject: [PATCH] Display name (#225) * add displayname * Commit from GitHub Actions (Publish APIs & Clients) Co-authored-by: domwong --- address/publicapi.json | 3 ++- answer/publicapi.json | 3 ++- cache/publicapi.json | 3 ++- clients/go/m3o.go | 3 --- clients/ts/index.ts | 3 --- clients/ts/package.json | 2 +- cmd/publisher/main.go | 1 + crypto/publicapi.json | 3 ++- currency/publicapi.json | 3 ++- db/publicapi.json | 3 ++- email/publicapi.json | 3 ++- emoji/publicapi.json | 3 ++- evchargers/publicapi.json | 3 ++- examples/db/create/go/createARecord.go | 4 ++-- examples/db/update/go/updateARecord.go | 2 +- file/publicapi.json | 3 ++- forex/publicapi.json | 3 ++- geocoding/publicapi.json | 3 ++- gifs/README.md | 4 ++-- gifs/publicapi.json | 3 ++- gifs/skip | 0 helloworld/publicapi.json | 3 ++- holidays/publicapi.json | 3 ++- id/publicapi.json | 3 ++- image/publicapi.json | 3 ++- ip/publicapi.json | 3 ++- location/publicapi.json | 3 ++- notes/publicapi.json | 3 ++- otp/publicapi.json | 3 ++- postcode/publicapi.json | 3 ++- prayer/publicapi.json | 3 ++- qr/publicapi.json | 3 ++- quran/publicapi.json | 3 ++- routing/publicapi.json | 3 ++- rss/publicapi.json | 3 ++- sentiment/publicapi.json | 3 ++- sms/publicapi.json | 3 ++- stock/publicapi.json | 3 ++- stream/publicapi.json | 3 ++- sunnah/publicapi.json | 3 ++- thumbnail/publicapi.json | 3 ++- time/publicapi.json | 3 ++- twitter/publicapi.json | 3 ++- url/publicapi.json | 3 ++- user/publicapi.json | 3 ++- vehicle/publicapi.json | 3 ++- weather/publicapi.json | 3 ++- 47 files changed, 85 insertions(+), 51 deletions(-) create mode 100644 gifs/skip diff --git a/address/publicapi.json b/address/publicapi.json index c5cd176..95f00dd 100644 --- a/address/publicapi.json +++ b/address/publicapi.json @@ -4,5 +4,6 @@ "category": "logistics", "pricing": { "Address.LookupPostcode": 75000 - } + }, + "display_name": "Address" } diff --git a/answer/publicapi.json b/answer/publicapi.json index 3c0d22c..be270b0 100644 --- a/answer/publicapi.json +++ b/answer/publicapi.json @@ -1,5 +1,6 @@ { "name": "answer", "icon": "❓", - "category": "search" + "category": "search", + "display_name": "Answer" } diff --git a/cache/publicapi.json b/cache/publicapi.json index 11ad5e4..5b73945 100644 --- a/cache/publicapi.json +++ b/cache/publicapi.json @@ -1,5 +1,6 @@ { "name": "cache", "icon": "💭", - "category": "storage" + "category": "storage", + "display_name": "Cache" } diff --git a/clients/go/m3o.go b/clients/go/m3o.go index 224188e..60f4916 100755 --- a/clients/go/m3o.go +++ b/clients/go/m3o.go @@ -13,7 +13,6 @@ import ( "github.com/micro/services/clients/go/file" "github.com/micro/services/clients/go/forex" "github.com/micro/services/clients/go/geocoding" - "github.com/micro/services/clients/go/gifs" "github.com/micro/services/clients/go/helloworld" "github.com/micro/services/clients/go/holidays" "github.com/micro/services/clients/go/id" @@ -58,7 +57,6 @@ func NewClient(token string) *Client { FileService: file.NewFileService(token), ForexService: forex.NewForexService(token), GeocodingService: geocoding.NewGeocodingService(token), - GifsService: gifs.NewGifsService(token), HelloworldService: helloworld.NewHelloworldService(token), HolidaysService: holidays.NewHolidaysService(token), IdService: id.NewIdService(token), @@ -103,7 +101,6 @@ type Client struct { FileService *file.FileService ForexService *forex.ForexService GeocodingService *geocoding.GeocodingService - GifsService *gifs.GifsService HelloworldService *helloworld.HelloworldService HolidaysService *holidays.HolidaysService IdService *id.IdService diff --git a/clients/ts/index.ts b/clients/ts/index.ts index e164f16..7543fb4 100755 --- a/clients/ts/index.ts +++ b/clients/ts/index.ts @@ -10,7 +10,6 @@ import * as evchargers from "./evchargers"; import * as file from "./file"; import * as forex from "./forex"; import * as geocoding from "./geocoding"; -import * as gifs from "./gifs"; import * as helloworld from "./helloworld"; import * as holidays from "./holidays"; import * as id from "./id"; @@ -52,7 +51,6 @@ export class Client { this.fileService = new file.FileService(token); this.forexService = new forex.ForexService(token); this.geocodingService = new geocoding.GeocodingService(token); - this.gifsService = new gifs.GifsService(token); this.helloworldService = new helloworld.HelloworldService(token); this.holidaysService = new holidays.HolidaysService(token); this.idService = new id.IdService(token); @@ -93,7 +91,6 @@ export class Client { fileService: file.FileService; forexService: forex.ForexService; geocodingService: geocoding.GeocodingService; - gifsService: gifs.GifsService; helloworldService: helloworld.HelloworldService; holidaysService: holidays.HolidaysService; idService: id.IdService; diff --git a/clients/ts/package.json b/clients/ts/package.json index e4e11a1..a9b33b5 100644 --- a/clients/ts/package.json +++ b/clients/ts/package.json @@ -65,5 +65,5 @@ }, "type": "module", "types": "dist/index.d.ts", - "version": "1.0.541" + "version": "1.0.542" } \ No newline at end of file diff --git a/cmd/publisher/main.go b/cmd/publisher/main.go index 36d7588..f027e35 100644 --- a/cmd/publisher/main.go +++ b/cmd/publisher/main.go @@ -26,6 +26,7 @@ type PublicAPI struct { Pricing map[string]int64 `json:"pricing,omitempty"` ExamplesJson string `json:"examples_json,omitempty"` PostmanJson string `json:"postman_json,omitempty"` + DisplayName string `json:"display_name,omitempty"` } func publishAPI(apiSpec *PublicAPI) error { diff --git a/crypto/publicapi.json b/crypto/publicapi.json index 7f6e01e..8903ae2 100644 --- a/crypto/publicapi.json +++ b/crypto/publicapi.json @@ -7,5 +7,6 @@ "Crypto.Price": 2000, "Crypto.Quote": 2000, "Crypto.History": 3500 - } + }, + "display_name": "Crypto" } diff --git a/currency/publicapi.json b/currency/publicapi.json index 0c30ef6..d2e5e82 100644 --- a/currency/publicapi.json +++ b/currency/publicapi.json @@ -1,5 +1,6 @@ { "name": "currency", "icon": "💱", - "category": "money" + "category": "money", + "display_name": "Currency" } diff --git a/db/publicapi.json b/db/publicapi.json index de56c7d..5d90a68 100644 --- a/db/publicapi.json +++ b/db/publicapi.json @@ -1,5 +1,6 @@ { "name": "db", "icon": "📦", - "category": "storage" + "category": "storage", + "display_name": "DB" } diff --git a/email/publicapi.json b/email/publicapi.json index 95aacbf..19d819f 100644 --- a/email/publicapi.json +++ b/email/publicapi.json @@ -4,5 +4,6 @@ "category": "communication", "pricing": { "Email.Send": 1000 - } + }, + "display_name": "Email" } diff --git a/emoji/publicapi.json b/emoji/publicapi.json index 73f4abf..e707606 100644 --- a/emoji/publicapi.json +++ b/emoji/publicapi.json @@ -1,5 +1,6 @@ { "name": "emoji", "icon": "😀", - "category": "web" + "category": "web", + "display_name": "Emoji" } diff --git a/evchargers/publicapi.json b/evchargers/publicapi.json index ea779fc..9cc500b 100644 --- a/evchargers/publicapi.json +++ b/evchargers/publicapi.json @@ -1,5 +1,6 @@ { "name": "evchargers", "icon": "🔋", - "category": "travel" + "category": "travel", + "display_name": "EV Chargers" } diff --git a/examples/db/create/go/createARecord.go b/examples/db/create/go/createARecord.go index f9cc6bc..c582849 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{}{ - "isActive": true, - "id": "1", "name": "Jane", "age": 42, + "isActive": true, + "id": "1", }, Table: "users", }) diff --git a/examples/db/update/go/updateARecord.go b/examples/db/update/go/updateARecord.go index 4c7b7e9..d1cad90 100755 --- a/examples/db/update/go/updateARecord.go +++ b/examples/db/update/go/updateARecord.go @@ -11,8 +11,8 @@ func UpdateArecord() { dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN")) rsp, err := dbService.Update(&db.UpdateRequest{ Record: map[string]interface{}{ - "age": 43, "id": "1", + "age": 43, }, Table: "users", }) diff --git a/file/publicapi.json b/file/publicapi.json index 3c2c322..5b85375 100644 --- a/file/publicapi.json +++ b/file/publicapi.json @@ -1,5 +1,6 @@ { "name": "file", "icon": "📁", - "category": "storage" + "category": "storage", + "display_name": "File" } diff --git a/forex/publicapi.json b/forex/publicapi.json index 0921594..2d17b1b 100644 --- a/forex/publicapi.json +++ b/forex/publicapi.json @@ -6,5 +6,6 @@ "Forex.Price": 2000, "Forex.Quote": 2000, "Forex.History": 3500 - } + }, + "display_name": "Forex" } diff --git a/geocoding/publicapi.json b/geocoding/publicapi.json index 91d1913..a1d2362 100644 --- a/geocoding/publicapi.json +++ b/geocoding/publicapi.json @@ -5,5 +5,6 @@ "pricing": { "Geocoding.Lookup": 10000, "Geocoding.Reverse": 10000 - } + }, + "display_name": "Geocoding" } diff --git a/gifs/README.md b/gifs/README.md index 4d84d45..2e2eb23 100644 --- a/gifs/README.md +++ b/gifs/README.md @@ -1,7 +1,7 @@ Quick and simple GIF search -# Gifs Service +# GIFs Service -Add gifs to your project with keyword search and results in multiple sizes and formats. +Add GIFs to your project with keyword search and results in multiple sizes and formats. Powered by [GIPHY](https://giphy.com). diff --git a/gifs/publicapi.json b/gifs/publicapi.json index 3b957d2..f62b4fd 100644 --- a/gifs/publicapi.json +++ b/gifs/publicapi.json @@ -1,5 +1,6 @@ { "name": "gifs", "icon": "🎥", - "category": "web" + "category": "web", + "display_name": "GIFs" } diff --git a/gifs/skip b/gifs/skip new file mode 100644 index 0000000..e69de29 diff --git a/helloworld/publicapi.json b/helloworld/publicapi.json index d87b713..84702c2 100644 --- a/helloworld/publicapi.json +++ b/helloworld/publicapi.json @@ -1,5 +1,6 @@ { "name": "helloworld", "icon": "👋", - "category": "example" + "category": "example", + "display_name": "Hello World" } diff --git a/holidays/publicapi.json b/holidays/publicapi.json index 00d8c9c..9bf1c3b 100644 --- a/holidays/publicapi.json +++ b/holidays/publicapi.json @@ -1,5 +1,6 @@ { "name": "holidays", "icon": "🏖️", - "category": "util" + "category": "util", + "display_name": "Holidays" } diff --git a/id/publicapi.json b/id/publicapi.json index f7c0ce4..b4a030b 100644 --- a/id/publicapi.json +++ b/id/publicapi.json @@ -1,5 +1,6 @@ { "name": "id", "icon": "🆔", - "category": "util" + "category": "util", + "display_name": "ID" } diff --git a/image/publicapi.json b/image/publicapi.json index 30c5779..a43205f 100644 --- a/image/publicapi.json +++ b/image/publicapi.json @@ -1,5 +1,6 @@ { "name": "image", "icon": "🖼️", - "category": "web" + "category": "web", + "display_name": "Image" } diff --git a/ip/publicapi.json b/ip/publicapi.json index 9ed6dc2..edd6c36 100644 --- a/ip/publicapi.json +++ b/ip/publicapi.json @@ -1,5 +1,6 @@ { "name": "ip", "icon": "🗺️", - "category": "location" + "category": "location", + "display_name": "IP" } diff --git a/location/publicapi.json b/location/publicapi.json index 1d4973d..107f8ad 100644 --- a/location/publicapi.json +++ b/location/publicapi.json @@ -1,5 +1,6 @@ { "name": "location", "icon": "🛰️", - "category": "logistics" + "category": "logistics", + "display_name": "Location" } diff --git a/notes/publicapi.json b/notes/publicapi.json index 275adc7..cdc7715 100644 --- a/notes/publicapi.json +++ b/notes/publicapi.json @@ -1,5 +1,6 @@ { "name": "notes", "icon": "📝", - "category": "storage" + "category": "storage", + "display_name": "Notes" } diff --git a/otp/publicapi.json b/otp/publicapi.json index 12c12b4..e489eb9 100644 --- a/otp/publicapi.json +++ b/otp/publicapi.json @@ -1,5 +1,6 @@ { "name": "otp", "icon": "🔑", - "category": "user" + "category": "user", + "display_name": "OTP" } diff --git a/postcode/publicapi.json b/postcode/publicapi.json index b3b8baa..1b1d7a7 100644 --- a/postcode/publicapi.json +++ b/postcode/publicapi.json @@ -1,5 +1,6 @@ { "name": "postcode", "icon": "📮", - "category": "logistics" + "category": "logistics", + "display_name": "Postcode" } diff --git a/prayer/publicapi.json b/prayer/publicapi.json index 4a98dec..ef984e4 100644 --- a/prayer/publicapi.json +++ b/prayer/publicapi.json @@ -1,5 +1,6 @@ { "name": "prayer", "icon": "🙏", - "category": "religion" + "category": "religion", + "display_name": "Prayer" } diff --git a/qr/publicapi.json b/qr/publicapi.json index d8780c4..b5bd128 100644 --- a/qr/publicapi.json +++ b/qr/publicapi.json @@ -1,5 +1,6 @@ { "name": "qr", "icon": "🔲", - "category": "web" + "category": "web", + "display_name": "QR" } diff --git a/quran/publicapi.json b/quran/publicapi.json index f8a2ca9..fc54562 100644 --- a/quran/publicapi.json +++ b/quran/publicapi.json @@ -1,5 +1,6 @@ { "name": "quran", "icon": "📖", - "category": "religion" + "category": "religion", + "display_name": "Quran" } diff --git a/routing/publicapi.json b/routing/publicapi.json index 3e6991f..7f1d963 100644 --- a/routing/publicapi.json +++ b/routing/publicapi.json @@ -6,5 +6,6 @@ "Routing.Route": 1000, "Routing.Eta": 1000, "Routing.Directions": 1000 - } + }, + "display_name": "Routing" } diff --git a/rss/publicapi.json b/rss/publicapi.json index db435ea..7571070 100644 --- a/rss/publicapi.json +++ b/rss/publicapi.json @@ -1,5 +1,6 @@ { "name": "rss", "icon": "📰", - "category": "web" + "category": "web", + "display_name": "RSS" } diff --git a/sentiment/publicapi.json b/sentiment/publicapi.json index 6e6cef1..4a923db 100644 --- a/sentiment/publicapi.json +++ b/sentiment/publicapi.json @@ -1,5 +1,6 @@ { "name": "sentiment", "icon": "🤔", - "category": "web" + "category": "web", + "display_name": "Sentiment" } diff --git a/sms/publicapi.json b/sms/publicapi.json index 8a1fe68..3cabf7b 100644 --- a/sms/publicapi.json +++ b/sms/publicapi.json @@ -4,5 +4,6 @@ "category": "communication", "pricing": { "Sms.Send": 75000 - } + }, + "display_name": "SMS" } diff --git a/stock/publicapi.json b/stock/publicapi.json index b327c11..bcbd66d 100644 --- a/stock/publicapi.json +++ b/stock/publicapi.json @@ -7,5 +7,6 @@ "Stock.Quote": 2000, "Stock.History": 3500, "Stock.OrderBook": 3500 - } + }, + "display_name": "Stock" } diff --git a/stream/publicapi.json b/stream/publicapi.json index da4ffda..f0f05f0 100644 --- a/stream/publicapi.json +++ b/stream/publicapi.json @@ -1,5 +1,6 @@ { "name": "stream", "icon": "🌊", - "category": "messaging" + "category": "messaging", + "display_name": "Stream" } diff --git a/sunnah/publicapi.json b/sunnah/publicapi.json index ea2425c..b2ecd0e 100644 --- a/sunnah/publicapi.json +++ b/sunnah/publicapi.json @@ -1,5 +1,6 @@ { "name": "sunnah", "icon": "📖", - "category": "religion" + "category": "religion", + "display_name": "Sunnah" } diff --git a/thumbnail/publicapi.json b/thumbnail/publicapi.json index 970352c..eb0220e 100644 --- a/thumbnail/publicapi.json +++ b/thumbnail/publicapi.json @@ -1,5 +1,6 @@ { "name": "thumbnail", "icon": "📸", - "category": "web" + "category": "web", + "display_name": "Thumbnail" } diff --git a/time/publicapi.json b/time/publicapi.json index fe65ca9..d4936c2 100644 --- a/time/publicapi.json +++ b/time/publicapi.json @@ -1,5 +1,6 @@ { "name": "time", "icon": "🌐", - "category": "timezone" + "category": "timezone", + "display_name": "Time" } diff --git a/twitter/publicapi.json b/twitter/publicapi.json index 38691e2..2233219 100644 --- a/twitter/publicapi.json +++ b/twitter/publicapi.json @@ -1,5 +1,6 @@ { "name": "twitter", "icon": "💬", - "category": "social" + "category": "social", + "display_name": "Twitter" } diff --git a/url/publicapi.json b/url/publicapi.json index 030e270..47ca9c4 100644 --- a/url/publicapi.json +++ b/url/publicapi.json @@ -1,5 +1,6 @@ { "name": "url", "icon": "🔗", - "category": "web" + "category": "web", + "display_name": "URL" } diff --git a/user/publicapi.json b/user/publicapi.json index 98e1745..7c9aa61 100644 --- a/user/publicapi.json +++ b/user/publicapi.json @@ -1,5 +1,6 @@ { "name": "user", "icon": "👤", - "category": "authentication" + "category": "authentication", + "display_name": "User" } diff --git a/vehicle/publicapi.json b/vehicle/publicapi.json index b20f37d..de7419b 100644 --- a/vehicle/publicapi.json +++ b/vehicle/publicapi.json @@ -1,5 +1,6 @@ { "name": "vehicle", "icon": "🚗", - "category": "dvla" + "category": "dvla", + "display_name": "Vehicle" } diff --git a/weather/publicapi.json b/weather/publicapi.json index 90f2488..12aaffb 100644 --- a/weather/publicapi.json +++ b/weather/publicapi.json @@ -1,5 +1,6 @@ { "name": "weather", "icon": "☀️", - "category": "climate" + "category": "climate", + "display_name": "Weather" }