fetchers

package
v0.0.0-...-2319eaa Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelFetchData

type ChannelFetchData struct {
	Title       string
	Description string
	IconURL     string
	CoverURL    string
	PublishedAt *time.Time
	WebsiteURL  string
	SourceID    string
	SkateSource bool
	Lang        string
}

Abstract representation of a Source from a channel

type ContentFetchData

type ContentFetchData struct {
	Title          string
	PublishedAt    time.Time
	Description    string // Or Summary
	RawDescription string // or RawSummary
	ThumbnailURL   string
	ContentID      string // or VideoID
	ContentURL     string
	SourceID       string
}

type FeedlyRefreshTokenResopnse

type FeedlyRefreshTokenResopnse struct {
	Provider     string `json:"provider"`
	IsNewAccount bool   `json:"is_new_account"`
	Plan         string `json:"plan"`
	ID           string `json:"id"`
	Scope        string `json:"scope"`
	AccessToken  string `json:"access_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
}

type Fetcher

type Fetcher struct {
	// contains filtered or unexported fields
}

func (*Fetcher) FetchChannelContents

func (fe *Fetcher) FetchChannelContents(sourceID string, sourceType string) ([]ContentFetchData, error)

func (*Fetcher) FetchChannelData

func (fe *Fetcher) FetchChannelData(url string) (ChannelFetchData, error)

For a given channel URL, will fetch the vimeo or youtube channel data

func (*Fetcher) FetchFeedlyContents

func (fe *Fetcher) FetchFeedlyContents(categoryID string) ([]ContentFetchData, error)

func (*Fetcher) FetchFeedlySources

func (fe *Fetcher) FetchFeedlySources(categoryID string) ([]ChannelFetchData, error)

func (*Fetcher) FetchVimeoChannelContents

func (fe *Fetcher) FetchVimeoChannelContents(userID string) ([]ContentFetchData, error)

func (*Fetcher) FetchYoutubeChannelContents

func (fe *Fetcher) FetchYoutubeChannelContents(channelID string) ([]ContentFetchData, error)

func (*Fetcher) FetchYoutubeContent

func (fe *Fetcher) FetchYoutubeContent(channelIDs []string, contents map[string][]ContentFetchData) map[string]error

func (*Fetcher) FetcherVimeoContent

func (fe *Fetcher) FetcherVimeoContent(userIDs []string, contents map[string][]ContentFetchData) map[string]error

func (*Fetcher) GetSourceID

func (fe *Fetcher) GetSourceID(url string) (string, error)

func (*Fetcher) RefreshFeedlyToken

func (fe *Fetcher) RefreshFeedlyToken() (string, time.Time, error)

func (*Fetcher) SourceType

func (fe *Fetcher) SourceType(url string) string

func (*Fetcher) UpdateFeedlyAccessToken

func (fe *Fetcher) UpdateFeedlyAccessToken(t string)

Jump to

Keyboard shortcuts

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