Type: | Package |
Title: | R Client for Querying the UK 'Open Banking' ('Open Data') API |
Version: | 0.1.1 |
Maintainer: | Nik Lilovski <nik.lilovski@outlook.com> |
Description: | Creates a client with queries for the UK 'Open Banking' ('Open Data') API. |
URL: | https://github.com/nik01010/openbankeR |
BugReports: | https://github.com/nik01010/openbankeR/issues |
Depends: | R (≥ 3.2.3) |
Imports: | httr, httpcode, jsonlite, dplyr, magrittr, tidyr, glue |
Suggests: | testthat, lintr, knitr, rmarkdown, covr |
License: | GPL-3 |
Encoding: | UTF-8 |
RoxygenNote: | 7.1.2 |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2022-02-21 13:53:44 UTC; Nik |
Author: | Nik Lilovski [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2022-02-22 18:40:02 UTC |
initialize
Description
initialize
initialize
Public fields
BankDetails
Details for available banks that support the API
Methods
Public methods
Method new()
Initialize a new API client
Usage
.openBankingClient$new( bankDetails = "default", version = "latest", timeOutSeconds = 15 )
Arguments
bankDetails
optional. Bank details list to use. When set to "default", the bank details will be taken from the below URL: https://github.com/OpenBankingUK/opendata-api-spec-compiled/blob/master/participant_store.json Otherwise, the user can provide a custom list of bank details.
version
optional. Which version of the API to use. Defaults to "latest. When set to "latest", the version used will be the latest available for the selected bank and instrument. This information will be derived from the bank details table above. Alternatively, the user can supply a manually set version such as "v2.3"
timeOutSeconds
optional. Number of seconds before a request times out. Defaults to 15 seconds
Returns
Object of type OpenBankingClient with methods for querying the API
Method GetAvailableBanks()
Get available banks that support the API
Usage
.openBankingClient$GetAvailableBanks()
Returns
character list. Names of available banks
Method GetAvailableInstruments()
Get available instruments for the API
Usage
.openBankingClient$GetAvailableInstruments()
Returns
character list. Names of available instruments
Method GetRawData()
Get raw data for a specified bank and instrument
Usage
.openBankingClient$GetRawData(bankName, instrument)
Arguments
bankName
character. Name of the bank to get data for. See GetAvailableBanks()
instrument
character. Instrument to get data for. See GetAvailableInstruments()
Returns
list. Raw data for the requested bank and instrument
CreateOpenBankingClient
Description
Creates a new Open Banking (Open Data) API client with convenient queries
Usage
CreateOpenBankingClient(
bankDetails = "default",
version = "latest",
timeOutSeconds = 15
)
Arguments
bankDetails |
optional. Bank details list to use. When set to "default", the bank details will be taken from the below URL: https://github.com/OpenBankingUK/opendata-api-spec-compiled/blob/master/participant_store.json Otherwise, the user can provide a custom list of bank details. |
version |
optional. Which version of the API to use. Defaults to "latest". When set to "latest", the version used will be the latest available for the selected bank and instrument. The latest available version information will be derived from the bank details table above. Alternatively, the user can supply a manually set version such as "v2.3" |
timeOutSeconds |
optional. Number of seconds before a request times out. Defaults to 15 seconds |
Value
Object of type OpenBankingClient with methods for querying the API
Available client fields
-
BankDetails: The default table of bank details used to query the API.
Available client queries
-
GetAvailableBanks: Get a list of banks that report the API.
-
GetAvailableInstruments: Get a list of instruments reported via the API.
-
GetRawData: Get raw data using the API for a given bank and instrument.
Examples
library(openbankeR)
openBankingClient <- openbankeR::CreateOpenBankingClient()
bankDetails <- openBankingClient$BankDetails
availableBanks <- openBankingClient$GetAvailableBanks()
availableInstruments <- openBankingClient$GetAvailableInstruments()
bankName <- "HSBC Group"
instrument <- "branches"
rawData <- openBankingClient$GetRawData(
bankName = bankName,
instrument = instrument
)
openbankeR: a package for querying the UK Open Banking (Open Data) API
Description
The openbankeR package provides two main features:
Create an R client for the API
Extract raw data from the API using convenient queries
Available functions
The available functions are:
-
CreateOpenBankingClient
: Creates a client for querying the API