1
0
Fork
You've already forked go-inoreader
0
An Inoreader API client for Go
  • Go 100%
2022年05月22日 11:08:43 -05:00
.vscode Initial commit 2021年07月03日 14:52:29 -05:00
config Improve comments 2022年05月22日 11:08:43 -05:00
stream Improve comments 2022年05月22日 11:08:43 -05:00
subscription Improve comments 2022年05月22日 11:08:43 -05:00
tags Improve comments 2022年05月22日 11:08:43 -05:00
userinfo Improve comments 2022年05月22日 11:08:43 -05:00
.gitignore Initial commit 2021年07月03日 14:52:29 -05:00
doc.go Implement testing 2022年05月14日 11:13:17 -05:00
go.mod Remodel to an actual API client 2022年05月09日 20:12:08 -05:00
LICENSE Initial commit 2021年07月03日 14:52:29 -05:00
README.md Update README.md 2022年05月20日 03:03:43 -05:00

go-inoreader

Go Report Card

WORK IN PROGRESS 🚧: An unofficial Inoreader API client

We need to create a new application on Inoreader under Preferences > Developer. Set the redirect URI to http://localhost:8081/oauth/redirect and scope to Read and write. We will then get an App ID and App Key. Save the App ID and App Key aa JSON items to the configuration file. On Unix/Linux: ~/.local/share/go-inoreader.json. On Windows: $env:APPDATA\go-inoreader.json.

{
 "app_id": <your app id>,
 "app_key": <your app key>
}

Install using Go's builtin package manager:

go get -v github.com/hyperreal64/go-inoreader

Usage

We need to authorize with the Inoreader API first:

packagemainimport"github.com/hyperreal64/go-inoreader/config"funcmain(){config.Init()}

Now run go run main.go to initiate the OAuth flow.

Example: Subscription list

packagemainimport("context""fmt""log""github.com/hyperreal64/go-inoreader/config""github.com/hyperreal64/go-inoreader/subscription")funcmain(){ctx,cancel:=context.WithCancel(context.Background())rc:=config.Oauth2RestyClient(ctx)defercancel()sublist,err:=subscription.GetSubscriptionList(rc)iferr!=nil{log.Fatalln(err)}for_,v:=rangesublist.Subscriptions{fmt.Printf("%s (%s)\n",v.Title,v.URL)}}

Output would be something like this:

OSNews (http://www.osnews.com/files/recent.xml)
Planet Python (http://planet.python.org/rss10.xml)
Opensource.com (https://opensource.com/feed)
The GoLang Blog (https://blog.golang.org/feed.atom)
Going Go Programming (https://www.goinggo.net/index.xml)
Go Time (https://changelog.com/gotime/feed)
The Changelog (https://changelog.com/podcast/feed)
Command Line Heroes (https://feeds.pacific-content.com/commandlineheroes)
freeCodeCamp.org News (https://www.freecodecamp.org/news/rss/)
Enable Sysadmin (https://www.redhat.com/sysadmin/rss.xml)
Blogs on Drew DeVault's blog (https://drewdevault.com/blog/index.xml)

ko-fi