https://github.com/chyroc/go-feedbin
feedbin go sdk
https://github.com/chyroc/go-feedbin
Last synced: 9 months ago
JSON representation
feedbin go sdk
- Host: GitHub
- URL: https://github.com/chyroc/go-feedbin
- Owner: chyroc
- License: apache-2.0
- Created: 2021-09-26T01:07:05.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-05-19T05:58:24.000Z (over 2 years ago)
- Last Synced: 2025-03-26T21:37:53.633Z (10 months ago)
- Language: Go
- Size: 138 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-feedbin
[](https://codecov.io/gh/chyroc/go-feedbin)
[](https://goreportcard.com/report/github.com/chyroc/go-feedbin)
[](https://github.com/chyroc/go-feedbin/actions)
[](https://opensource.org/licenses/Apache-2.0)
[](https://pkg.go.dev/github.com/chyroc/go-feedbin)
[](https://badge.fury.io/go/github.com%2Fchyroc%2Fgo-feedbin)

Feedbin API Documentation: https://github.com/feedbin/feedbin-api.
## Install
```shell
go get github.com/chyroc/go-feedbin
```
## Usage
## Create Page
```go
package main
import (
"context"
"fmt"
"github.com/chyroc/go-feedbin"
)
func main() {
url := ""
cli := feedbin.New(feedbin.WithCredential("username", "password"))
resp, err := cli.CreatePage(context.Background(), &feedbin.CreatePageReq{
URL: url,
})
if err != nil {
panic(err)
}
fmt.Println("title", resp.Title)
fmt.Println("content", resp.Content)
}
```
## Get Subscriptions
```go
package main
import (
"context"
"fmt"
"github.com/chyroc/go-feedbin"
)
func main() {
cli := feedbin.New(feedbin.WithCredential("username", "password"))
resp, err := cli.GetSubscriptions(context.Background(), &feedbin.GetSubscriptionsReq{})
if err != nil {
panic(err)
}
fmt.Println("subscriptions length:", len(resp.Subscriptions))
for _, v := range resp.Subscriptions {
fmt.Println(v.ID, v.Title, v.FeedURL)
}
}
```
## Extracting Content
```go
package main
import (
"context"
"fmt"
"github.com/chyroc/go-feedbin"
)
func main() {
url := ""
cli := feedbin.New()
resp, err := cli.ExtractingContent(context.Background(), &feedbin.ExtractingContentReq{
URL: url,
})
if err != nil {
panic(err)
}
fmt.Println("title", resp.Title)
fmt.Println("content", resp.Content)
}
```