Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added confirm account to api #8

Merged
merged 2 commits into from Jun 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/budy/account.py
Expand Up @@ -39,12 +39,13 @@

class AccountApi(object):

def create_account(self, payload):
def create_account(self, payload, pre_enabled = True):
url = self.base_url + "accounts"
contents = self.post(
url,
auth = False,
data_j = payload
data_j = payload,
params = dict(pre_enabled = pre_enabled)
)
return contents

Expand Down Expand Up @@ -82,3 +83,8 @@ def delete_address_me_account(self, key):
url = self.base_url + "accounts/me/addresses/%s" % key
contents = self.delete(url)
return contents

def confirm_account(self, token):
url = self.base_url + "accounts/confirm/%s" % token
contents = self.get(url, auth = False)
return contents