silos

package
v0.0.0-...-2efcb5c Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package silos provides methods to re-publish entries on other sites.

Index

Constants

View Source
const FlickrUID = "https://flickr.com/"
View Source
const GithubUID = "https://github.com/"
View Source
const TwitterUID = "https://twitter.com/"

TwitterUID is the unique identifier for twitter.

Variables

This section is empty.

Functions

func Flickr

func Flickr(options FlickrOptions) (*flickrClient, error)

func Github

func Github(options GithubOptions) (*githubClient, error)

func Twitter

func Twitter(options TwitterOptions, fw FileWriter) (*twitterClient, error)

Twitter creates a client for Twitter. On creation it makes a call to the API to verify the credentials are correct and the screen name of the authenticated user.

Types

type ErrUnsure

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

ErrUnsure can be used when a syndicator is not able to determine what should be posted. It contains the data of the entry that was used.

func (ErrUnsure) Error

func (e ErrUnsure) Error() string

type FileWriter

type FileWriter interface {
	WriteFile(name, contentType string, r io.Reader) (location string, err error)
}

type FlickrOptions

type FlickrOptions struct {
	BaseURL                        string
	ConsumerKey, ConsumerSecret    string
	AccessToken, AccessTokenSecret string
}

type GithubOptions

type GithubOptions struct {
	BaseURL     string
	AccessToken string
}

type TwitterOptions

type TwitterOptions struct {
	BaseURL                        string
	ConsumerKey, ConsumerSecret    string
	AccessToken, AccessTokenSecret string
}

TwitterOptions is the configuration required to connect to the Twitter API.

Jump to

Keyboard shortcuts

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