Documentation

The PocketCasts class

class pycketcasts.pocketcasts.PocketCast(email: str, password: str)

Bases: object

category(category_name: str) Optional[Category]

Get a category by name

Parameters

category_name (str) – name of PocketCasts category

Returns

Either a matching category or None if not found

Return type

Category

content(list_id: str) List[Podcast]

Get a list of podcasts by a list ID

Parameters

list_id (str) – ID of list

Returns

list of podcasts

Return type

list[Podcast]

get_episode_by_id(episode_id: str, podcast_id: str) Optional[Episode]

Get an episode by its ID

Parameters
  • episode_id (str) – ID of episode

  • podcast_id (str) – ID of podcast

Returns

JSON data

Return type

dict

get_podcast_by_id(podcast_id: str) Optional[Podcast]

Get a podcast by its ID

Parameters

podcast_id (str) – ID of podcast

Returns

Podcast or None if not found

Return type

Podcast

search(keyword: str) List[Podcast]

Search for podcasts by a keyword

Parameters

keyword (str) – keyword to use in search

Returns

list of podcasts from search

Return type

list[Podcast]

property account: Account

Get your PocketCasts user account

Returns

PocketCasts user account

Return type

Account

property categories: List[Category]

Get the available PocketCasts categories

Returns

list of available categories

Return type

list[Category]

property featured: List[Podcast]

Get featured podcasts

Returns

list of featured podcasts

Return type

list[Podcast]

property history: List[Episode]

Get your podcast episode history

Returns

list of episodes

Return type

list[Episode]

property in_progress: List[Episode]

Get your in-progress podcast episodes

Returns

list of episodes

Return type

list[Episode]

property networks

Get available podcast networks

Returns

list of available podcast networks

Return type

list

property new_releases: List[Episode]

Get newly-released podcast episodes

Returns

list of episodes

Return type

list[Episode]

property popular: List[Podcast]

Get popular podcasts

Returns

list of popular podcasts

Return type

list[Podcast]

property recommendations: List[Episode]

Get recommended podcast episodes

Returns

list of episodes

Return type

list[Episode]

property starred: List[Episode]

Get your starred podcast episodes

Returns

list of episodes

Return type

list[Episode]

property stats: Optional[Stats]

Get PocketCasts statistics

Returns

dictionary of statistics

Return type

dict

property subscriptions: List[Podcast]

Get your PocketCasts podcast subscriptions

Returns

list of podcasts

Return type

list[Podcast]

property trending: List[Podcast]

Get trending podcasts

Returns

list of trending podcasts

Return type

list[Podcast]

property up_next: List[Episode]

Get the podcast episodes in your queue

Returns

list of episodes

Return type

list[Episode]

The Podcast class

class pycketcasts.pocketcasts.Podcast(data: dict, api, extended_json: dict = {}, full_item: bool = False)

Bases: object

get_episode_by_id(episode_id: str) Optional[Episode]

Get an episode of this podcast by its ID

Parameters

episode_id (str) – ID of episode

Returns

Episode object or None if not found

Return type

Episode

subscribe() bool

Subscribe to this podcast

Returns

True if successful, False if unsuccessful

Return type

bool

unsubscribe() bool

Unsubscribe to this podcast

Returns

True if successful, False if unsuccessful

Return type

bool

property author: str

Get podcast author

Return type

str

property category

Get podcast category

Return type

Category

property category_name: str

Get podcast category name

Return type

str

property description: str

Get podcast description

Return type

str

property episode_count: int

Get podcast episode count

Return type

int

property episode_frequency: str

Get episode frequency

Return type

str

property episodes: List[Episode]

Get this podcast’s episodes

Returns

List of episodes

Return type

list[Episode]

property feed: str

Get podcast RSS feed

Return type

str

property has_more_episodes: bool

Get whether the podcast has more episodes

Return type

bool

property has_seasons: bool

Get whether the podcast has seasons

Return type

bool

property id: str

Get podcast ID

Return type

str

property is_audio: bool

Get whether the podcast is audio

Return type

bool

property itunes: str

Get podcast iTunes ID

Return type

str

property licensing: bool

Get whether the podcast is licensed

Return type

bool

property next_episode_date: Optional[datetime]

Estimated date for next episode

Return type

datetime.datetime

property paid: bool

Get whether the podcast is paid

Return type

bool

property season_count: int

Get podcast season count

Return type

int

Get share link for this podcast

Returns

share link

Return type

str

property show_type: str

Get podcast show type (i.e. episodic)

Return type

str

property title: str

Get podcast title

Return type

str

property website: str

Get podcast website URL

Return type

str

The Episode class

class pycketcasts.pocketcasts.Episode(data: dict, podcast, api)

Bases: object

add_star() bool

Add a star to this episode

Returns

True if successful, False if unsuccessful

Return type

bool

archive() bool

Archive this episode

Returns

True if successful, False if unsuccessful

Return type

bool

mark_played() bool

Mark this episode as played

Returns

True if successful, False if unsuccessful

Return type

bool

mark_unplayed() bool

Mark this episode as unplayed

Returns

True if successful, False if unsuccessful

Return type

bool

play_last() bool

Add this episode to the end of the “Play Next” queue

Returns

True if successful, False if unsuccessful

Return type

bool

play_next() bool

Add this episode to the front of the “Play Next” queue

Returns

True if successful, False if unsuccessful

Return type

bool

remove_star() bool

Remove a star from this episode

Returns

True if successful, False if unsuccessful

Return type

bool

unarchive() bool

Unarchive this episode

Returns

True if successful, False if unsuccessful

Return type

bool

update_progress(progress: int) bool

Update progress in this episode

Parameters

progress (int) – Episode progress in seconds

Returns

True if successful, False if unsuccessful

Return type

bool

property current_position: int

Get episode current position

Return type

int

property deleted: bool

Get whether the episode is deleted

Return type

bool

property duration: int

Get episode duration

Return type

int

property file_type: str

Get episode file type

Return type

str

property id: str

Get episode ID

Return type

str

property number: int

Get episode number

Return type

int

property playing: bool

Get episode playing status

Return type

bool

property podcast

Get episode’s corresponding podcast

Return type

Podcast

property podcast_id: str

Get ID of corresponding podcast

Return type

str

property podcast_title: str

Get title of corresponding podcast

Return type

str

property published_date: Optional[datetime]

Get episode’s publication date

Return type

datetime.datetime

property season: int

Get episode season

Return type

int

Get share link for this episode

Returns

share link

Return type

str

property show_notes: str

Get the show notes for the episode

Returns

show notes

Return type

str

property size: int

Get episode size

Return type

int

property starred: bool

Get whether episode is starred

Return type

bool

property title: str

Get episode title

Return type

str

property type: str

Get episode type

Return type

str

property url: str

Get episode url

Return type

str

The Account class

class pycketcasts.pocketcasts.Account(data: dict, api)

Bases: object

upload_file(file_path: str) bool

Upload a file to PocketCasts

Parameters

file_path (str) – path of file to upload

Returns

True if successful, False if unsuccessful

Return type

bool

property account_file_details: Optional[dict]
property files: List[File]
property subscriptions: List[Subscription]

Get your PocketCasts subscriptions

Returns

list of PocketCasts subscriptions

Return type

list[Subscription]

property web: dict

Get web info

Return type

dict

The Subscription class

class pycketcasts.pocketcasts.Subscription(data: dict)

Bases: object

property auto_renewing: bool

Get auto-renewing status

Return type

bool

property bundle_id: str

Get account bundle ID

Return type

str

property cancel_url: str

Get URL to cancel account

Return type

str

property expiry_date: Optional[datetime]

Get expiry date

Return type

datetime.datetime

property frequency: int

Get account frequency

Return type

int

property gift_days: int

Get gift days

Return type

int

property index: int

Get account index

Return type

int

property paid: bool

Get whether this account if Premium

Return type

bool

property plan: str

Get account plan type

Return type

str

property platform: int

Get account platform

Return type

int

property type: int

Get account type

Return type

int

property update_url: str

Get URL to update account

Return type

str

property web_status: int

Get account web status

Return type

int

The Stats class

class pycketcasts.pocketcasts.Stats(data: dict)

Bases: object

property intro_time_skipped: int

Get how many seconds of intro you have skipped

Return type

int

property silence_time_removed: int

Get how many seconds of silence have been removed

Return type

int

property starting_date: Optional[datetime]

Get when these stats started

Return type

datetime.datetime

property time_listened: int

Get how many seconds you have listened

Return type

int

property time_skipped: int

Get how many seconds you have skipped

Return type

int

property time_variable_speed: int

Get how many seconds you have used variable speed

Return type

int

The Files class

The Category class

class pycketcasts.pocketcasts.Category(data: dict, api)

Bases: object

get_podcasts(region: str = 'us') List[Podcast]

Get podcasts in this category

Parameters

region (str) – Region for the category (default: ‘us’)

Returns

list of podcasts

Return type

list[Podcast]

property icon: str

Get category icon URL

Return type

str

property name: str

Get category name

Return type

str

property source: str

Get category source

Return type

str