mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-22 07:15:25 +00:00
Generate clients (#206)
This commit is contained in:
18
examples/rss/add/go/addANewFeed.go
Executable file
18
examples/rss/add/go/addANewFeed.go
Executable file
@@ -0,0 +1,18 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/rss"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Add a new RSS feed with a name, url, and category
|
||||
func AddAnewFeed() {
|
||||
rssService := rss.NewRssService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := rssService.Add(&rss.AddRequest{
|
||||
Category: "news",
|
||||
Name: "bbc",
|
||||
Url: "http://feeds.bbci.co.uk/news/rss.xml",
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
Reference in New Issue
Block a user