ponyapi

package
v0.0.0-...-315be94 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2018 License: MIT Imports: 5 Imported by: 0

README

ponyapi

import "github.com/Xe/PonyAPI/client/go"

Package ponyapi provides glue for applications written in Go that want to use PonyAPI for getting information.

Usage

type Episode
type Episode struct {
	AirDate int    `json:"air_date"`
	Episode int    `json:"episode"`
	IsMovie bool   `json:"is_movie"`
	Name    string `json:"name"`
	Season  int    `json:"season"`
}

Episode is an episode of My Little Pony: Friendship is Magic.

func GetEpisode
func GetEpisode(season, episode int) (*Episode, error)

GetEpisode gets information about season x episode y or an error.

func Newest
func Newest() (*Episode, error)

Newest returns information on the newest episode or an error.

func Random
func Random() (*Episode, error)

Random returns information on a random episode.

func AllEpisodes
func AllEpisodes() ([]*Episode, error)

AllEpisodes gets all information on all episodes or returns an error.

func GetSeason
func GetSeason(season int) ([]*Episode, error)

GetSeason returns all information on season x or returns an error.

func Search(query string) ([]*Episode, error)

Search takes the give search terms and uses that to search the list of episodes.

Documentation

Overview

Package ponyapi provides glue for applications written in Go that want to use PonyAPI for getting information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Episode

type Episode struct {
	AirDate int    `json:"air_date"`
	Episode int    `json:"episode"`
	IsMovie bool   `json:"is_movie"`
	Name    string `json:"name"`
	Season  int    `json:"season"`
}

Episode is an episode of My Little Pony: Friendship is Magic.

func AllEpisodes

func AllEpisodes() ([]*Episode, error)

AllEpisodes gets all information on all episodes or returns an error.

func GetEpisode

func GetEpisode(season, episode int) (*Episode, error)

GetEpisode gets information about season x episode y or an error.

func GetSeason

func GetSeason(season int) ([]*Episode, error)

GetSeason returns all information on season x or returns an error.

func LastAired

func LastAired() (*Episode, error)

LastAired returns information on the most recently aried episode or an error.

func Newest

func Newest() (*Episode, error)

Newest returns information on the newest episode or an error.

func Random

func Random() (*Episode, error)

Random returns information on a random episode.

func Search(query string) ([]*Episode, error)

Search takes the give search terms and uses that to search the list of episodes.

Jump to

Keyboard shortcuts

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