func (c *Client) Import(f io.ReadCloser) error {
	_, err := c.request.PostFile("/v1/import", f)
	return err
}
Import imports an OPML file.
package client  
import (
	"encoding/json"
	"fmt"
	"io"
	"net/url"
	"strconv"
)
type Client struct {
	request *request
}
func New(endpoint string, credentials ...string) *Client {
	if len(credentials) == 2 {
		return &Client{request: &request{endpoint: endpoint, username: credentials[0], password: credentials[1]}}
	}
	return &Client{request: &request{endpoint: endpoint, apiKey: credentials[0]}}
}
func (c *Client) Me() (*User, error) {
	body, err := c.request.Get("/v1/me")
	if err != nil {
		return nil, err
	}
	defer body.Close()
	var user *User
	decoder := json.NewDecoder(body)
	if err := decoder.Decode(&user); err != nil {
		return nil, fmt.Errorf("miniflux: json error (%v)", err)
	}
	return user, nil
}
func (c *Client) Users() (Users, error) {
	body, err := c.request.Get("/v1/users")
	if err != nil {
		return nil, err
	}
	defer body.Close()
	var users Users
	decoder := json.NewDecoder(body)
	if err := decoder.Decode(&users); err != nil {
		return nil, fmt.Errorf("miniflux: response error (%v)", err)
	}
	return users, nil
}
func (c *Client) UserByID(userID int64) (*User, error) {
	body, err := c.request.Get(fmt.Sprintf("/v1/users/%d", userID))
	if err != nil {
		return nil, err
	}
	defer body.Close()
	var user User
	decoder := json.NewDecoder(body)
	if err := decoder.Decode(&user); err != nil {
		return nil, fmt.Errorf("miniflux: response error (%v)", err)
	}
	return &user, nil
}
func (c *Client) UserByUsername(username string) (*User, error) {
	body, err := c.request.Get(fmt.Sprintf("/v1/users/%s", username))
	if err != nil {
		return nil, err
	}
	defer body.Close()
	var user User
	decoder := json.NewDecoder(body)
	if err := decoder.Decode(&user); err != nil {
		return nil, fmt.Errorf("miniflux: response error (%v)", err)
	}
	return &user, nil
}
func (c *Client) CreateUser(username, password string, isAdmin bool) (*User, error) {
	body, err := c.request.Post("/v1/users", &UserCreationRequest{
		Username: username,
		Password: password,
		IsAdmin:  isAdmin,
	})
	if err != nil {
		return nil, err
	}
	defer body.Close()
	var user *User
	decoder := json.NewDecoder(body)
	if err := decoder.Decode(&user); err != nil {
		return nil, fmt.Errorf("miniflux: response error (%v)", err)
	}
	return user, nil
}
func (c *Client) UpdateUser(userID int64, userChanges *UserModificationRequest) (*User, error) {
	body, err := c.request.Put(fmt.Sprintf("/v1/users/%d", userID), userChanges)
	if err != nil {
		return nil, err
	}
	defer body.Close()
	var u *User
	decoder := json.NewDecoder(body)
	if err := decoder.Decode(&u); err != nil {
		return nil, fmt.Errorf("miniflux: response error (%v)", err)
	}
	return u, nil
}
func (c *Client) DeleteUser(userID int64) error {
	return c.request.Delete(fmt.Sprintf("/v1/users/%d", userID))
}
func (c *Client) MarkAllAsRead(userID int64) error {
	_, err := c.request.Put(fmt.Sprintf("/v1/users/%d/mark-all-as-read", userID), nil)
	return err
}
func (c *Client) Discover(url string) (Subscriptions, error) {
	body, err := c.request.Post("/v1/discover", map[string]string{"url": url})
	if err != nil {
		return nil, err
	}
	defer body.Close()
	var subscriptions Subscriptions
	decoder := json.NewDecoder(body)
	if err := decoder.Decode(&subscriptions); err != nil {
		return nil, fmt.Errorf("miniflux: response error (%v)", err)
	}
	return subscriptions, nil
}
func (c *Client) Categories() (Categories, error) {
	body, err := c.request.Get("/v1/categories")
	if err != nil {
		return nil, err
	}
	defer body.Close()
	var categories Categories
	decoder := json.NewDecoder(body)
	if err := decoder.Decode(&categories); err != nil {
		return nil, fmt.Errorf("miniflux: response error (%v)", err)
	}
	return categories, nil
}
func (c *Client) CreateCategory(title string) (*Category, error) {
	body, err := c.request.Post("/v1/categories", map[string]interface{}{
		"title": title,
	})
	if err != nil {
		return nil, err
	}
	defer body.Close()
	var category *Category
	decoder := json.NewDecoder(body)
	if err := decoder.Decode(&category); err != nil {
		return nil, fmt.Errorf("miniflux: response error (%v)", err)
	}
	return category, nil
}
func (c *Client) UpdateCategory(categoryID int64, title string) (*Category, error) {
	body, err := c.request.Put(fmt.Sprintf("/v1/categories/%d", categoryID), map[string]interface{}{
		"title": title,
	})
	if err != nil {
		return nil, err
	}
	defer body.Close()
	var category *Category
	decoder := json.NewDecoder(body)
	if err := decoder.Decode(&category); err != nil {
		return nil, fmt.Errorf("miniflux: response error (%v)", err)
	}
	return category, nil
}
func (c *Client) MarkCategoryAsRead(categoryID int64) error {
	_, err := c.request.Put(fmt.Sprintf("/v1/categories/%d/mark-all-as-read", categoryID), nil)
	return err
}
func (c *Client) CategoryFeeds(categoryID int64) (Feeds, error) {
	body, err := c.request.Get(fmt.Sprintf("/v1/categories/%d/feeds", categoryID))
	if err != nil {
		return nil, err
	}
	defer body.Close()
	var feeds Feeds
	decoder := json.NewDecoder(body)
	if err := decoder.Decode(&feeds); err != nil {
		return nil, fmt.Errorf("miniflux: response error (%v)", err)
	}
	return feeds, nil
}
func (c *Client) DeleteCategory(categoryID int64) error {
	return c.request.Delete(fmt.Sprintf("/v1/categories/%d", categoryID))
}
func (c *Client) Feeds() (Feeds, error) {
	body, err := c.request.Get("/v1/feeds")
	if err != nil {
		return nil, err
	}
	defer body.Close()
	var feeds Feeds
	decoder := json.NewDecoder(body)
	if err := decoder.Decode(&feeds); err != nil {
		return nil, fmt.Errorf("miniflux: response error (%v)", err)
	}
	return feeds, nil
}
func (c *Client) Export() ([]byte, error) {
	body, err := c.request.Get("/v1/export")
	if err != nil {
		return nil, err
	}
	defer body.Close()
	opml, err := io.ReadAll(body)
	if err != nil {
		return nil, err
	}
	return opml, nil
}