quotes

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

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

Go to latest
Published: Jun 22, 2017 License: AGPL-3.0 Imports: 6 Imported by: 1

Documentation

Overview

Provides a qod of the specified category (http://quotes.rest/qod/categories to see the list of available public categories).

Index

Constants

This section is empty.

Variables

View Source
var BaseURL, Category string = "http://quotes.rest/qod.json?category=", "love"

Functions

func Execute

func Execute(ReplyToken string, Client *linebot.Client)

Sends the quote to the user.

func Initialize

func Initialize()

Initializes Quotes.

Types

type QuoteContent

type QuoteContent struct {
	Quote  string
	Author string
}

type QuoteHandler

type QuoteHandler struct {
	URL      string
	Category string
}
var Quotes QuoteHandler

func NewQuote

func NewQuote(BaseURL, Category string) QuoteHandler

Construct a new QuoteHandler from specified URL and Category.

type QuoteInfo

type QuoteInfo struct {
	Quotes []*QuoteContent
}

type QuoteJSON

type QuoteJSON struct {
	Contents *QuoteInfo
}

func NewQuoteJSON

func NewQuoteJSON() QuoteJSON

Construct a new QuoteJSON to handle JSON decoding.

Jump to

Keyboard shortcuts

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