SDK for afrobank
Afrobank Software Development Kit built to ease developement process and access to prebuilt APIs
npm i https://github.com/Akinolae/afrobank-sdk.git#master
yarn add https://github.com/Akinolae/afrobank-sdk.git#master
Documents are groups of pages connected through:
In your auth page
or @core/services
page, add the code below
Made to ease the login process by masking endpoints, helps to speed up coding process.
import { Auth } from "afrobank-sdk";
const auth = new Auth(reduxStore, endpointUrl, optionalData);
interface LoginParams {
email: string;
password: string;
}
async function login(data: LoginParams) {
try {
const response = await auth.login(data);
return response;
} catch (e) {
throw e;
}
}
Made to ease the register process by masking endpoints, helps to speed up coding process.
import { Auth } from "afrobank-sdk";
const auth = new Auth(reduxStore, endpointUrl, optionalData);
async function register(data) {
try {
const response = await auth.register(data);
return response;
} catch (e) {
throw e;
}
}
Made to ease the register process by masking endpoints, helps to speed up coding process.
import { Auth } from "afrobank-sdk";
const auth = new Auth(reduxStore, endpointUrl, optionalData);
async function validate2FA(data) {
try {
const response = await auth.validate2FA(data);
return response;
} catch (e) {
throw e;
}
}
- reduxStore: type
redux-toolkit/
- endpointUrl: type
string
- optionalData: type
object