megaphone

Connect to the megaphone.fm API


License
MIT
Install
pip install megaphone==0.2.1

Documentation

megaphone

Build Status

This is a Python 3 library for interacting with the API provided by Megaphone.fm.

Installation

pip install megaphone

Usage

Basic funtionality exists to extract podcasts and episodes from "networks":

from megaphone.network import NetworkClient

client = NetworkClient("secret-token", "nework id")
for podcast in client.podcasts:
    print("Podcast %s:" % podcast.title)
    for episode in podcast.episodes:
        print(episode)

You can also extract campaign information from "organizations":

from megaphone.organization import OrganizationClient

oc = OrganizationClient("secret-token", "organization-id")
for campaign in oc.campaigns:
    print(campaign.title)
    for order in campaign.orders:
        print(order)
        for ad in order.advertisements:
            print(ad)

Running Tests

To run tests:

pip install -r dev-requirements.txt
python -m unittest