Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Debug can be set to true to get debug logging from pocketcleaner Debug = false )
Functions ¶
This section is empty.
Types ¶
type PocketClient ¶
type PocketClient struct { BaseURL string ConsumerSecret string APIToken string HTTPClient *http.Client KeepCount int }
PocketClient struct to interact with the API. This mostly holds the API token and secret, but also provides a way to mock out the HTTP client library so the code is easier to test.
func PocketClientWithToken ¶
func PocketClientWithToken(apiToken string, consumerSecret string, toKeep int) *PocketClient
PocketClientWithToken returns a PocketClient with the provided token and consumer secret set as well as the provided number of articles to keep.
func (*PocketClient) CleanUpItems ¶
func (c *PocketClient) CleanUpItems() (archived int, err error)
CleanUpItems is the main method to use this module from. After configuring the client with access token and consumer secret and the number of items to keep, just run this method and it will clean up your pocket account.
Click to show internal directories.
Click to hide internal directories.