mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-18 21:55:08 +00:00
Generate clients (#206)
This commit is contained in:
6
examples/rss/remove/curl/removeAFeed.sh
Executable file
6
examples/rss/remove/curl/removeAFeed.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
curl "https://api.m3o.com/v1/rss/Remove" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer $MICRO_API_TOKEN" \
|
||||
-d '{
|
||||
"name": "bbc"
|
||||
}'
|
||||
16
examples/rss/remove/go/removeAFeed.go
Executable file
16
examples/rss/remove/go/removeAFeed.go
Executable file
@@ -0,0 +1,16 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/rss"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Remove an RSS feed by name
|
||||
func RemoveAfeed() {
|
||||
rssService := rss.NewRssService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := rssService.Remove(&rss.RemoveRequest{
|
||||
Name: "bbc",
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
12
examples/rss/remove/node/removeAFeed.js
Executable file
12
examples/rss/remove/node/removeAFeed.js
Executable file
@@ -0,0 +1,12 @@
|
||||
import * as rss from "m3o/rss";
|
||||
|
||||
// Remove an RSS feed by name
|
||||
async function RemoveAfeed() {
|
||||
let rssService = new rss.RssService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await rssService.remove({
|
||||
name: "bbc",
|
||||
});
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await RemoveAfeed();
|
||||
Reference in New Issue
Block a user