Skip to content

Commit

Permalink
added confirm account methods
Browse files Browse the repository at this point in the history
  • Loading branch information
tsilva committed Jun 6, 2016
1 parent 621ac0c commit c1e3848
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/eadapters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ def create_account(self, account, *args, **kwargs):
def update_account(self, account, *args, **kwargs):
raise appier.NotImplementedError()

def confirm_account(self, token, *args, **kwargs):
raise appier.NotImplementedError()

def recover_password_account(self, username, *args, **kwargs):
raise appier.NotImplementedError()

Expand Down
3 changes: 3 additions & 0 deletions src/eadapters/budy_a.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ def update_account(self, account, *args, **kwargs):
self._flush_context()
return account

def confirm_account(self, token, *args, **kwargs):
models.BDAccount.confirm_s(token)

def avatar_me_account(self, *args, **kwargs):
avatar = models.BDAccount.avatar_me()
return avatar
Expand Down
8 changes: 8 additions & 0 deletions src/eadapters/models/budy/bd_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ def login(cls, username, password):
account = cls.wrap(account)
return account

@classmethod
@bd_common.handle_error
def confirm_s(cls, token):
api = cls._get_api_g()
account = api.confirm_account(token)
account = cls.wrap(account)
return account

@classmethod
@bd_common.handle_error
def me(cls):
Expand Down

0 comments on commit c1e3848

Please sign in to comment.