Module: Episodic::Platform

Defined in:
lib/episodic/platform/base.rb,
lib/episodic/platform/response.rb,
lib/episodic/platform/connection.rb,
lib/episodic/platform/exceptions.rb,
lib/episodic/platform/query_methods.rb,
lib/episodic/platform/write_methods.rb,
lib/episodic/platform/analytics_methods.rb,
lib/episodic/platform/collection_response.rb

Overview

Episodic::Platform is a Ruby library for Episodic’s Platform REST API (app.episodic.com/help/server_api)

Getting started

To get started you need to require ‘episodic/platform’:

require 'episodic/platform'

Before you can use any of the object methods, you need to create a connection using Base.establish_connection!. The Base.establish_connection! method requires that you pass your Episodic API Key and Episodic Secret Key.

Episodic::Platform::Base.establish_connection!('my_api_key', 'my_secret_key')

Handling errors

Any errors returned from the Episodic Platform API are converted to exceptions and raised from the called method. For example, the following response would cause Episodic::Platform::InvalidAPIKey to be raised.

<?xml version="1.0" encoding="UTF-8"?>
<error>
  <code>1</code>
  <message>Invalid API Key</message>
</error>

Defined Under Namespace

Classes: APIAccessDisabled, AnalyticsMethods, Base, CollectionResponse, Connection, CreateUpdateEpisodeResponse, CustomFieldItem, DownloadItem, EpisodeItem, EpisodePlaylistItem, EpisodesResponse, EpisodicPlatformException, FileUploadFailed, HTTPResponse, InternalError, InvalidAPIKey, InvalidParameters, Item, MissingRequiredParameter, NotFound, PlayerItem, PlaylistEpisodeItem, PlaylistItem, PlaylistsResponse, QueryMethods, ReportNotFound, RequestExpired, Response, ResponseError, ShowItem, ShowsResponse, ThumbnailItem, TokenResponse, Upload, WriteMethods, WriteResponse

Constant Summary collapse

API_HOST =
'app.episodic.com'
API_VERSION =
'v2'