Skip to content

Commit

Permalink
Update link to allow provider being set
Browse files Browse the repository at this point in the history
  • Loading branch information
maitham committed Jul 26, 2021
1 parent b1442c3 commit d89ed51
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions vital/api/link.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
from typing import Mapping
from typing import Mapping, Optional

from vital.api.api import API


class Link(API):
"""Endpoints for managing link tokens."""

def create(self, user_key: str) -> Mapping[str, str]:
def create(
self, user_key: str, provider: Optional[str] = None
) -> Mapping[str, str]:
"""
Create a Link token.
:param str user_key: User key returned by service.
"""
return self.client.post("/link/token/", {"user_key": user_key})
return self.client.post(
"/link/token/", {"user_key": user_key, "provider": provider}
)

def connect_provider(
self, link_token: str, provider: str, username: str, password: str
Expand Down

0 comments on commit d89ed51

Please sign in to comment.