feedly

package module
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 17 Imported by: 1

README

feedly

Releases PkgGoDev Test

feedly is a Go client library for accessing the Feedly API.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	CollectionsCreate(context.Context, *CollectionCreate) (Collections, error)
	CollectionsFeedsPut(context.Context, string, CollectionFeedCreate) (Feeds, error)
	CollectionsFeedsMPut(context.Context, string, CollectionFeedCreates) (Feeds, error)
	CollectionsFeedsDelete(context.Context, string, string) error
	CollectionsFeedsMDelete(context.Context, string, CollectionFeedDeletes) error
	CollectionsGet(context.Context, string) (Collections, error)
	CollectionsList(context.Context) (Collections, error)
	EntriesGet(context.Context, string) (Entries, error)
	FeedsGet(context.Context, string) (*Feed, error)
	FeedsMGet(context.Context, []string) (Feeds, error)
	MarkersCounts(context.Context) (*Marker, error)
	MarkersReads(context.Context, *MarkersReadsOptions) (*MarkersReads, error)
	ProfileGet(context.Context) (*Profile, error)
	PrioritiesList(context.Context, bool) (Priorities, error)
	PrioritiesDelete(context.Context, string, bool) error
	PrioritiesPut(context.Context, PriorityCreate) (Priorities, error)
	PrioritiesUpdate(context.Context, PriorityUpdate) (Priorities, error)
	StreamsContents(context.Context, string, *StreamOptions) (*StreamContents, error)
	StreamsIDs(context.Context, string, *StreamOptions) (*StreamIDs, error)
	SubscriptionsGet(context.Context) (Subscriptions, error)
	TagsList(context.Context) (Tags, error)
}

func NewAPI

func NewAPI(client *http.Client) API

type Alternate

type Alternate struct {
	Href string `json:"href"`
	Type string `json:"type"`
}

type Board added in v0.8.0

type Board struct {
	ID          string `json:"id"`
	Description string `json:"description"`
	Label       string `json:"label"`
}

type Category

type Category struct {
	ID    string `json:"id"`
	Label string `json:"label"`
}

type Collection

type Collection struct {
	Customizable bool    `json:"customizable"`
	Description  string  `json:"description"`
	Enterprise   bool    `json:"enterprise"`
	Feeds        []Feed  `json:"feeds"`
	ID           string  `json:"id"`
	Label        string  `json:"label"`
	NumFeeds     float64 `json:"numFeeds"`
}

func (Collection) String

func (a Collection) String() string

type CollectionCreate

type CollectionCreate struct {
	Description string                 `json:"description,omitempty"`
	Feeds       []CollectionFeedCreate `json:"feeds"`
	ID          string                 `json:"id"`
	Label       string                 `json:"label"`
}

type CollectionFeedCreate

type CollectionFeedCreate struct {
	ID    string `json:"id"`
	Title string `json:"title,omitempty"`
}

type CollectionFeedCreates added in v0.7.0

type CollectionFeedCreates []CollectionFeedCreate

type CollectionFeedDelete

type CollectionFeedDelete struct {
	ID string `json:"id"`
}

type CollectionFeedDeletes

type CollectionFeedDeletes []CollectionFeedDelete

type Collections

type Collections []Collection

func (Collections) String

func (a Collections) String() string

type Content

type Content struct {
	Content   string `json:"content"`
	Direction string `json:"direction"`
}

type Entries

type Entries []Entry

func (Entries) String

func (a Entries) String() string

type Entry

type Entry struct {
	Alternate      []Alternate `json:"alternate"`
	Author         string      `json:"author"`
	Categories     []Category  `json:"categories"`
	Content        *Content    `json:"content"`
	Crawled        int64       `json:"crawled"`
	Engagement     int64       `json:"engagement"`
	EngagementRate float64     `json:"engagementRate"`
	Fingerprint    string      `json:"fingerprint"`
	ID             string      `json:"id"`
	Keywords       []string    `json:"keywords"`
	Origin         *Origin     `json:"origin"`
	OriginID       string      `json:"originId"`
	Published      int64       `json:"published"`
	Title          string      `json:"title"`
	Unread         bool        `json:"unread"`
	Updated        int64       `json:"updated"`
	Visual         *Visual     `json:"visual"`
}

func (Entry) String

func (a Entry) String() string

type Feed

type Feed struct {
	ContentType         string   `json:"contentType"`
	Description         string   `json:"description"`
	EstimatedEngagement float64  `json:"estimatedEngagement"`
	FeedID              string   `json:"feedId"`
	IconURL             string   `json:"iconUrl"`
	ID                  string   `json:"id"`
	Language            string   `json:"language"`
	Partial             bool     `json:"partial"`
	Subscribers         float64  `json:"subscribers"`
	Title               string   `json:"title"`
	Topics              []string `json:"topics"`
	Updated             float64  `json:"updated"`
	Velocity            float64  `json:"velocity"`
	VisualURL           string   `json:"visualUrl"`
	Website             string   `json:"website"`
}

func (Feed) String

func (a Feed) String() string

type Feeds

type Feeds []Feed

func (Feeds) String

func (a Feeds) String() string

type Filter added in v0.8.0

type Filter struct {
	Boards        []Board      `json:"boards"`
	ComplexFilter bool         `json:"complexFilter"`
	Parts         []FilterPart `json:"parts"`
	Salience      string       `json:"salience"`
	Severities    []string     `json:"severities"`
	Type          string       `json:"type"`
}

type FilterPart added in v0.8.0

type FilterPart struct {
	ID    string `json:"id"`
	Label string `json:"label"`
	Text  string `json:"text"`
}

type GlobalResource

type GlobalResource int
const (
	GlobalCategoryAll GlobalResource = 1 << iota
	GlobalCategoryUncategorized
	GlobalCategoryMust
	GlobalTagRead
	GlobalTagSaved
	GlobalTagAll
	GlobalTagAnnotated
	GlobalPriorityAll
)

func (GlobalResource) Format added in v0.8.0

func (r GlobalResource) Format() string

func (GlobalResource) ID added in v0.8.0

func (r GlobalResource) ID(userID string) string

type Login

type Login struct {
	FullName   string `json:"fullName"`
	ID         string `json:"id"`
	Picture    string `json:"picture"`
	Provider   string `json:"provider"`
	ProviderID string `json:"providerId"`
	Verified   bool   `json:"verified"`
}

type Marker

type Marker struct {
	UnreadCounts []UnreadCount `json:"unreadcounts"`
	Updated      int64         `json:"updated"`
}

func (Marker) String

func (a Marker) String() string

type MarkersReads

type MarkersReads struct {
	Entries []string           `json:"entries"`
	Feeds   []MarkersReadsFeed `json:"feeds"`
	Updated int64              `json:"updated"`
}

func (MarkersReads) String

func (a MarkersReads) String() string

type MarkersReadsFeed

type MarkersReadsFeed struct {
	ID   string `json:"id"`
	AsOf int64  `json:"asOf"`
}

type MarkersReadsOptions

type MarkersReadsOptions struct {
	NewerThan int64 `url:"newerThan,omitempty"`
}

type Origin

type Origin struct {
	HTMLURL  string `json:"htmlUrl"`
	StreamID string `json:"streamId"`
	Title    string `json:"title"`
}

type PaymentProviderID

type PaymentProviderID struct {
	Paypal string `json:"Paypal"`
}

type PaymentSubscriptionID

type PaymentSubscriptionID struct {
	Paypal string `json:"Paypal"`
}

type Priorities added in v0.8.0

type Priorities []Priority

func (Priorities) String added in v0.8.0

func (a Priorities) String() string

type Priority added in v0.8.0

type Priority struct {
	Active                   bool                   `json:"active"`
	ActiveUntil              float64                `json:"activeUntil"`
	Created                  float64                `json:"created"`
	ID                       string                 `json:"id"`
	Label                    string                 `json:"label"`
	LastEntryMatch           float64                `json:"lastEntryMatch"`
	LastLikeBoardRequestDate float64                `json:"lastLikeBoardRequestDate"`
	LastStatsRefreshDate     float64                `json:"lastStatsRefreshDate"`
	LastTrainingDate         float64                `json:"lastTrainingDate"`
	LastUpdated              float64                `json:"lastUpdated"`
	LatestRefreshErrors      []PriorityRefreshError `json:"latestRefreshErrors"`
	Layers                   []Filter               `json:"layers"`
	NextRun                  float64                `json:"nextRun"`
	NumEntries               float64                `json:"numEntries"`
	NumEntriesMatching       float64                `json:"numEntriesMatching"`
	NumEntriesProcessed      float64                `json:"numEntriesProcessed"`
	StreamIDs                []string               `json:"streamIds"`
	TrainingScore            float64                `json:"trainingScore"`
	TrainingStatus           string                 `json:"trainingStatus"`
}

func (Priority) String added in v0.8.0

func (a Priority) String() string

type PriorityCreate added in v0.8.0

type PriorityCreate struct {
	Active      bool     `json:"active,omitempty"`
	ActiveUntil float64  `json:"activeUntil,omitempty"`
	Label       string   `json:"label"`
	Layers      []Filter `json:"layers"`
	StreamIDs   []string `json:"streamIds,omitempty"`
}

type PriorityCreates added in v0.8.0

type PriorityCreates []PriorityCreate

type PriorityRefreshError added in v0.8.0

type PriorityRefreshError struct {
	BoardID            string  `json:"boardId"`
	Message            string  `json:"message"`
	NumEntries         float64 `json:"numEntries"`
	NumRequiredEntries float64 `json:"numRequiredEntries"`
	Type               string  `json:"type"`
}

type PriorityUpdate added in v0.8.0

type PriorityUpdate struct {
	ID          string   `json:"id"`
	Active      bool     `json:"active,omitempty"`
	ActiveUntil float64  `json:"activeUntil,omitempty"`
	Label       string   `json:"label"`
	Layers      []Filter `json:"layers"`
	StreamIDs   []string `json:"streamIds,omitempty"`
}

type Profile

type Profile struct {
	Client                      string                 `json:"client"`
	DropboxConnected            bool                   `json:"dropboxConnected"`
	Email                       string                 `json:"email"`
	EvernoteConnected           bool                   `json:"evernoteConnected"`
	FacebookConnected           bool                   `json:"facebookConnected"`
	FamilyName                  string                 `json:"familyName"`
	FullName                    string                 `json:"fullName"`
	Gender                      string                 `json:"gender"`
	GivenName                   string                 `json:"givenName"`
	Google                      string                 `json:"google"`
	ID                          string                 `json:"id"`
	Locale                      string                 `json:"locale"`
	Logins                      []Login                `json:"logins"`
	PaymentProviderID           *PaymentProviderID     `json:"paymentProviderId"`
	PaymentSubscriptionID       *PaymentSubscriptionID `json:"paymentSubscriptionId"`
	Picture                     string                 `json:"picture"`
	PocketConnected             bool                   `json:"pocketConnected"`
	Product                     string                 `json:"product"`
	ProductExpiration           int64                  `json:"productExpiration"`
	SubscriptionPaymentProvider string                 `json:"subscriptionPaymentProvider"`
	SubscriptionStatus          string                 `json:"subscriptionStatus"`
	TwitterConnected            bool                   `json:"twitterConnected"`
	UpgradeDate                 int64                  `json:"upgradeDate"`
	Wave                        string                 `json:"wave"`
	WindowsLiveConnected        bool                   `json:"windowsLiveConnected"`
	WordPressConnected          bool                   `json:"wordPressConnected"`
}

func (Profile) String

func (a Profile) String() string

type Resource added in v0.8.0

type Resource int
const (
	ResourceFeed Resource = 1 << iota
	ResourceCategory
	ResourceTag
	ResourcePriority
	ResourceMeme
)

func (Resource) Format added in v0.8.0

func (r Resource) Format() string

func (Resource) ID added in v0.8.0

func (r Resource) ID(ids []interface{}) (id string)

type StreamContents

type StreamContents struct {
	Continuation string  `json:"continuation"`
	ID           string  `json:"id"`
	Items        []Entry `json:"items"`
	Updated      int64   `json:"updated"`
}

func (StreamContents) String

func (a StreamContents) String() string

type StreamIDs

type StreamIDs struct {
	IDs          []string `json:"ids"`
	Continuation string   `json:"continuation,omitempty"`
}

func (StreamIDs) String

func (a StreamIDs) String() string

type StreamOptions

type StreamOptions struct {
	Count        uint   `url:"count,omitempty"`
	Ranked       string `url:"ranked,omitempty"`
	UnreadOnly   bool   `url:"unreadOnly,omitempty"`
	NewerThan    int64  `url:"newerThan,omitempty"`
	Continuation string `url:"continuation,omitempty"`
}

type Subscription

type Subscription struct {
	Categories  []Category `json:"categories"`
	ContentType string     `json:"contentType"`
	IconURL     string     `json:"iconUrl"`
	ID          string     `json:"id"`
	Partial     bool       `json:"partial"`
	Subscribers float64    `json:"subscribers"`
	Title       string     `json:"title"`
	Topics      []string   `json:"topics"`
	Updated     float64    `json:"updated"`
	Velocity    float64    `json:"velocity"`
	VisualURL   string     `json:"visualUrl"`
	Website     string     `json:"website"`
}

func (Subscription) String

func (a Subscription) String() string

type Subscriptions

type Subscriptions []Subscription

func (Subscriptions) String

func (a Subscriptions) String() string

type Tag

type Tag struct {
	ID          string `json:"id"`
	Label       string `json:"label"`
	Description string `json:"description"`
}

func (Tag) String

func (a Tag) String() string

type Tags

type Tags []Tag

func (Tags) String

func (a Tags) String() string

type UnreadCount

type UnreadCount struct {
	Count   int    `json:"count"`
	ID      string `json:"id"`
	Updated int64  `json:"updated"`
}

type Visual

type Visual struct {
	ContentType string  `json:"contentType"`
	Height      float64 `json:"height"`
	Processor   string  `json:"processor"`
	URL         string  `json:"url"`
	Width       float64 `json:"width"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL