mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Minor improvements in integration package
This commit is contained in:
parent
34dd358eb0
commit
49119eff00
16 changed files with 57 additions and 108 deletions
|
@ -1,10 +0,0 @@
|
|||
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
|
||||
Package instapaper provides an integration with Instapaper.
|
||||
|
||||
*/
|
||||
package instapaper // import "miniflux.app/integration/instapaper"
|
|
@ -17,6 +17,11 @@ type Client struct {
|
|||
password string
|
||||
}
|
||||
|
||||
// NewClient returns a new Instapaper client.
|
||||
func NewClient(username, password string) *Client {
|
||||
return &Client{username: username, password: password}
|
||||
}
|
||||
|
||||
// AddURL sends a link to Instapaper.
|
||||
func (c *Client) AddURL(link, title string) error {
|
||||
if c.username == "" || c.password == "" {
|
||||
|
@ -41,8 +46,3 @@ func (c *Client) AddURL(link, title string) error {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewClient returns a new Instapaper client.
|
||||
func NewClient(username, password string) *Client {
|
||||
return &Client{username: username, password: password}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue