posthydra

package module
v0.0.0-...-f55e10f Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2015 License: GPL-2.0 Imports: 6 Imported by: 0

README

post-hydra

behold the gophydra

A terminal app for reading and writing social media posts.

The Posthydra logo is based on the Go mascot designed by Renée French and copyrighted under the Creative Commons Attribution 3.0 license.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	WildApricot WildApricotConfig
}

func NewConfig

func NewConfig(path string) (*Config, error)

type Event

type Event struct {
	Title    string
	Body     string
	Location string
	Start    string
	End      string
	URL      string
}

type Reader

type Reader interface {
	Read() ([]*Event, error)
}

type WildApricotClient

type WildApricotClient struct {
	Config *WildApricotConfig
	// contains filtered or unexported fields
}

func NewWildApricotClient

func NewWildApricotClient(c *Config) *WildApricotClient

func (*WildApricotClient) AcquireToken

func (w *WildApricotClient) AcquireToken() error

AcquireToken must be called first to gain access to other API methods

func (*WildApricotClient) Read

func (w *WildApricotClient) Read() ([]*Event, error)

Read performs the work of fetching events from WildApricot's API

type WildApricotConfig

type WildApricotConfig struct {
	Key       string
	AccountId int
}

func (*WildApricotConfig) TokenAuthHeader

func (c *WildApricotConfig) TokenAuthHeader() string

TokenAuthHeader encodes the API key on a WildApricotConfig to the Authorization header needed to gain an access token

type WildApricotResponse

type WildApricotResponse struct {
	Events []struct {
		StartDate                   string
		EndDate                     string
		Location                    string
		RegistrationEnabled         bool
		RegistrationsLimit          int
		PendingRegistrationsCount   int
		ConfirmedRegistrationsCount int
		CheckedInAttendeesNumber    int
		Tags                        []string
		AccessLevel                 string
		ID                          int
		URL                         string
		Name                        string
	}
}

WildApricotResponse defines the response from the WildApricot Events API. Used for unmarshalling the response to JSON.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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