mirror of
https://github.com/miniflux/v2.git
synced 2025-07-22 17:18:37 +00:00
Add API endpoint to import OPML file
This commit is contained in:
parent
7a1653a2e9
commit
5cacae6cf2
9 changed files with 96 additions and 23 deletions
7
vendor/github.com/miniflux/miniflux-go/client.go
generated
vendored
7
vendor/github.com/miniflux/miniflux-go/client.go
generated
vendored
|
@ -7,6 +7,7 @@ package miniflux
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/url"
|
||||
"strconv"
|
||||
|
@ -230,6 +231,12 @@ func (c *Client) Export() ([]byte, error) {
|
|||
return opml, nil
|
||||
}
|
||||
|
||||
// Import imports an OPML file.
|
||||
func (c *Client) Import(f io.ReadCloser) error {
|
||||
_, err := c.request.PostFile("/v1/import", f)
|
||||
return err
|
||||
}
|
||||
|
||||
// Feed gets a feed.
|
||||
func (c *Client) Feed(feedID int64) (*Feed, error) {
|
||||
body, err := c.request.Get(fmt.Sprintf("/v1/feeds/%d", feedID))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue