TangerineDownloader
public class TangerineDownloader
Class to download accounts and transactions from Tangerine
This class uses a webscraper to login. Your delegate needs to provide a view to add the webview to, as well as the otp the user received during the login attempt.
-
Delegate for the TangerineDownloader
Declaration
Swift
public weak var delegate: TangerineDownloaderDelegate? -
Creates an instance of the TangerineDownloader
Declaration
Swift
public init() -
Logs into the Tangerine website and requests the accounts
Note: If you want to call this function multiple times, be aware that it will request a view every time
Declaration
Swift
public func authorizeAndGetAccounts(username: String, pin: String, _ completion: @escaping (Result<[[String : Any]], Error>) -> Void)Parameters
usernameTangerine website username / Login ID
pinTangerine website / online banking PIN
completioncompletion handler - receives Result with an array containing the account info
-
Downloads the transactions for accounts
Note: you need to call this function after
authorizeAndGetAccountsas only this one adds the webview to the view from the delegateDeclaration
Swift
public func downloadAccountTransactions(accounts: [String : [String : Any]], dateToLoadFrom: Date) -> Result<[String : [[String : Any]]], Error>Parameters
accountsdictionary of accounts to load. Mapping from account name to the JSON received from
authorizeAndGetAccountsdateToLoadFromDate which will be passed to the API as start date to load transactions
Return Value
completion handler which returns a Result with the account names mapped to and array of transaction JSONs
View on GitHub
Install in Dash
TangerineDownloader Class Reference