diff options
author | Mike Crute <mcrute@gmail.com> | 2013-12-30 21:00:27 -0500 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2013-12-30 21:00:27 -0500 |
commit | 41e8caecdc84b01aca1b62930f7dae5abceea9f7 (patch) | |
tree | c03fdf38aefbcda2763985fd4f6ccb5891626b1a /README.rst | |
parent | d96f8e4362ec61e2731bac1d3eac3aeeb5bc1e3e (diff) | |
download | pydora-41e8caecdc84b01aca1b62930f7dae5abceea9f7.tar.bz2 pydora-41e8caecdc84b01aca1b62930f7dae5abceea9f7.tar.xz pydora-41e8caecdc84b01aca1b62930f7dae5abceea9f7.zip |
Externalize config
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 35 |
1 files changed, 18 insertions, 17 deletions
@@ -15,25 +15,12 @@ abuse Pandora, that's not cool. | |||
15 | * API Spec from: http://pan-do-ra-api.wikia.com/wiki/Json/5 | 15 | * API Spec from: http://pan-do-ra-api.wikia.com/wiki/Json/5 |
16 | * Keys at: http://pan-do-ra-api.wikia.com/wiki/Json/5/partners | 16 | * Keys at: http://pan-do-ra-api.wikia.com/wiki/Json/5/partners |
17 | 17 | ||
18 | Example:: | ||
19 | |||
20 | >>> SETTINGS = { | ||
21 | ... 'ENCRYPTION_KEY': '', | ||
22 | ... 'DECRYPTION_KEY': '', | ||
23 | ... 'USERNAME': '', | ||
24 | ... 'PASSWORD': '', | ||
25 | ... 'DEVICE': '', | ||
26 | ... } | ||
27 | >>> client = APIClient.from_settings_dict(SETTINGS) | ||
28 | >>> client.login("username", "password") | ||
29 | |||
30 | |||
31 | Simple Player | 18 | Simple Player |
32 | ============= | 19 | ============= |
33 | Contained in `simple_player.py` is a simple Pandora stream player that runs at | 20 | Included is ``pydora``, a simple Pandora stream player that runs at the command |
34 | the command line. It requires that mpg123 be installed with HTTP support as | 21 | line. It requires that mpg123 be installed with HTTP support as well as a |
35 | well as a `settings.py` file that contains `SETTINGS` (per above), `USERNAME` | 22 | settings file (example below) located in ``~/.pydora.cfg``. Alternatively an |
36 | and `PASSWORD` which correspond to your Pandora credentials. | 23 | environment variable ``PYDORA_CFG`` can point to the path of the config file. |
37 | 24 | ||
38 | The player only supports basic functionality for now. It will display a station | 25 | The player only supports basic functionality for now. It will display a station |
39 | list, allow listening to any station, basic feeback and bookmarking are also | 26 | list, allow listening to any station, basic feeback and bookmarking are also |
@@ -52,3 +39,17 @@ When playing the following keys work (press enter afterwards): | |||
52 | * a - bookmark artist | 39 | * a - bookmark artist |
53 | * S - sleep song | 40 | * S - sleep song |
54 | * Q - quit program | 41 | * Q - quit program |
42 | * ? - display help | ||
43 | |||
44 | sample config:: | ||
45 | |||
46 | [api] | ||
47 | encryption_key = key | ||
48 | decryption_key = key | ||
49 | username = partner username | ||
50 | password = partner password | ||
51 | device = key | ||
52 | |||
53 | [user] | ||
54 | username = your username | ||
55 | password = your password | ||