Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Bug 841426 add get newsletters api #10

Merged
merged 1 commit into from

2 participants

@dpoirier

No description provided.

@pmclanahan
Owner

This looks good. I'll merge as soon as the API for this is live on prod.

Also "Refs #0000" won't do anything for our style of bug automation. If you want to refer to a bug, just do "Bug 0000", and to close a bug it's "Fix bug 000". You can refer to multiple bugs as well: "Bug 000, 0001, 0002".

We try to follow these guidelines: http://mozweb.readthedocs.org/en/latest/git.html#commit-messages

@pmclanahan pmclanahan merged commit 468e031 into mozilla:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 25, 2013
  1. @dpoirier

    Add get_newsletters API

    dpoirier authored
    Bug 841426
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 2 deletions.
  1. +2 −2 basket/__init__.py
  2. +6 −0 basket/base.py
View
4 basket/__init__.py
@@ -1,4 +1,4 @@
"""A Python client for Mozilla's basket service."""
-from base import (send_sms, subscribe, unsubscribe, user,
- update_user, debug_user, BasketException)
+from base import (BasketException, debug_user, get_newsletters, send_sms,
+ subscribe, unsubscribe, update_user, user)
View
6 basket/base.py
@@ -120,3 +120,9 @@ def debug_user(email, supertoken):
return request('get', 'debug-user',
params={'email': email,
'supertoken': supertoken})
+
+def get_newsletters():
+ """Returns data about the newsletters that basket knows about.
+ Format is a list of dictionaries.
+ """
+ return request('get', 'newsletters')['newsletters']
Something went wrong with that request. Please try again.