Module ponyapi

A bunch of glue for Nim applications to query PonyAPI.

Types

Episode = object of RootObj
  name*: string               ## Episode name
  air_date*: int              ## Air date in unix time
  season*: int                ## season number of the episode
  episode*: int               ## the episode number in the season
  is_movie*: bool             ## does this record represent a movie?
  
An episode of My Little Pony: Friendship is Magic

Procs

proc newest(): Episode {.raises: [ValueError, OSError, HttpRequestError, 
                                  OverflowError, TimeoutError, ProtocolError, 
                                  Exception, JsonParsingError], 
                         tags: [ReadIOEffect, WriteIOEffect, TimeEffect].}
returns information on the newest episode of My Little Pony: Friendship is Magic.
proc random(): Episode {.raises: [ValueError, OSError, HttpRequestError, 
                                  OverflowError, TimeoutError, ProtocolError, 
                                  Exception, JsonParsingError], 
                         tags: [ReadIOEffect, WriteIOEffect, TimeEffect].}
returns information on a random episode.
proc get_episode(season, episode: int): Episode {.raises: [ValueError, OSError, 
    HttpRequestError, OverflowError, TimeoutError, ProtocolError, Exception, 
    JsonParsingError], tags: [ReadIOEffect, WriteIOEffect, TimeEffect].}
return an arbitrary episode by season, episode pair.
proc all_episodes(): seq[Episode] {.raises: [ValueError, OSError, 
    HttpRequestError, OverflowError, TimeoutError, ProtocolError, Exception, 
    JsonParsingError], tags: [ReadIOEffect, WriteIOEffect, TimeEffect].}
return all information on all episodes.
proc get_season(season: int): seq[Episode] {.raises: [ValueError, OSError, 
    HttpRequestError, OverflowError, TimeoutError, ProtocolError, Exception, 
    JsonParsingError], tags: [ReadIOEffect, WriteIOEffect, TimeEffect].}
return all information on a single season.
searches for episodes by the given query term.