Skip to content

theatlantic/megaphone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Python API for interacting with the megaphone.fm service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages