event

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2016 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Overview

Package event provides implementations of getting events from each event provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJson

func GetJson(url string) (interface{}, error)

GetJson sends get request to the url passed by the argument and returns json-formatted event data.

func SetTimezone added in v0.2.0

func SetTimezone(t string)

SetTimezone sets timezone specified in the configuration file.

Types

type Api

type Api interface {
	// Get gets a slice of Event using API depending on api providers.
	Get(baseurl, keyword, nickname string, places []string) ([]Event, error)
}

Api is an interface to get a slice of Event

func GetApi

func GetApi(provider string) Api

GetApi is a factory function. GetApi returns an implementation of Api which gets actual events provided by each event provider.

type Atnd

type Atnd struct {
	Result struct {
		Results_returned int
		Results_start    int
		Events           []struct {
			Event struct {
				Event_id    string
				Title       string
				Catch       string
				Event_url   string
				Started_at  string
				Address     string
				Place       string
				Description string
			}
		}
	}
}

Atnd implements Api Atnd represents event data returned by ATND API.

func (*Atnd) Get

func (self *Atnd) Get(baseurl, keyword, nickname string, places []string) ([]Event, error)

type Connpass

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

Connpass implements Api Connpass represents event data returned by Connpass.

func (*Connpass) Get

func (self *Connpass) Get(baseurl, keyword, nickname string, places []string) ([]Event, error)

type Doorkeeper

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

Doorkeeper implements Api Doorkeeper represents event data returned by DoorKeeper API.

func (*Doorkeeper) Get

func (self *Doorkeeper) Get(baseurl, keyword, nickname string, places []string) ([]Event, error)

type Event

type Event struct {
	Id          string
	Title       string
	Summary     string
	Url         string
	Started_at  string
	Place       string
	Description string
}

Event represents details of an event. Event is sent to Slack in this format. Atcual event type depends on event api providers, so provider-specific event type is defined in the each file and converted to this Event.

func (*Event) IsValid

func (event *Event) IsValid(place []string, taboo string) bool

IsValid checks if the event is valid according to the place and date.

type Eventbrite added in v0.2.0

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

Eventbrite implements Api Eventbrite represents event data returned by Eventbrite.

func (*Eventbrite) Get added in v0.2.0

func (self *Eventbrite) Get(baseurl, keyword, nickname string, places []string) ([]Event, error)

type Meetup added in v0.2.0

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

Meetup implements Api Meetup represents event data returned by Meetup.

func (*Meetup) Get added in v0.2.0

func (self *Meetup) Get(baseurl, keyword, nickname string, places []string) ([]Event, error)

type Strtacademy

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

Strtacademy implements Api Strtacademy represents event data returned by street academy API.

func (*Strtacademy) Get

func (self *Strtacademy) Get(baseurl, keyword, nickname string, places []string) ([]Event, error)

type Zusaar

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

Zusaar implements Api Zusaar represents event data returned by Zusaar Api.

func (*Zusaar) Get

func (self *Zusaar) Get(baseurl, keyword, nickname string, places []string) ([]Event, error)

Jump to

Keyboard shortcuts

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