Other APIs (No need for Access Token)
i. Terms and Conditions
API : BSA.APICaller.getAgreements
swift
BSA.APICaller.getAgreements(languageCode: .korean,
clientKey: "a1hrg2xv...",
onSuccess: { [weak self] arrayData in
// Successful Invocation
self?.data.arrayAgreementData = arrayData
}, onFailed: { [weak self] rtCode, resultMessage in
// Invocation Failure
}, onError: { [weak self] error in
// Invocation Error
}, onTotalLog: { text in
// Invocation Log
}, onCompleted: {
// invocation completed
}, disposeBag: disposeBag)
Parameters
swift
BSA.APICaller.getAgreements(languageCode: BSA.Enums.AgreementsLanguageCode,
clientKey: String,
onSuccess: @escaping ([BSA.JSONData.AgreementData]) -> (),
onFailed: @escaping OnFailed,
onError: @escaping OnError,
onTotalLog: @escaping OnTotalLog? = nil,
onCompleted: @escaping onCompleted? = nil,
disposeBag: DisposeBag )
Parameter | Type | Description |
---|---|---|
languageCode | BSA.Enums.AgreementsLanguageCode | Language of the terms and conditions. |
clientKey | String | Client's unique key |
onSuccess | ([BSA.Enums.AgreementData] ) -> () | Callback called on success. It returns an array of data that allows you to view detailed terms and conditions. |
onFailed | OnFailed | Callback function called on API processing failure. |
onError | OnError | Callback function called on error. |
onTotalLog | OnTotalLog | Callback function to receive all logs generated during API calls. |
onCompleted | onCompleted | Called at the end after all processes are completed. |
disposeBag | DisposeBag | DisposeBag variable to manage RxSwift Disposable objects. |
Description
- You can get approximate information about the existing terms and conditions, and if you want detailed information about a specific term and condition, you need to call
BSA.APICaller.getAgreementDetail
using the seq fromBSA.Enums.AgreementData
.
Related Data
BSA.Enums.AgreementData
Name | Type | Description |
---|---|---|
clientKey | String | Client's unique key |
lang | String | Language. |
seq | Int | Sequence. |
title | String | Title. |
type | String | Type of terms and conditions. |
i-a. Detailed Terms and Conditions
API : BSA.APICaller.getAgreementDetail
swift
BSA.APICaller.getAgreementDetail(seq: seq,
clientKey: "a1hrg2xv...",
onSuccess: { [weak self] agreementDetailData in
// Successful Invocation
}, onFailed: { [weak self] rtCode, resultMessage in
// Invocation Failure
}, onError: { [weak self] error in
// Invocation Error
}, onTotalLog: { text in
// Invocation Log
}, onCompleted: {
// invocation completed
}, disposeBag: disposeBag)
Parameters
swift
BSA.APICaller.getAgreementDetail(seq: Int,
clientKey: String,
onSuccess: @escaping (BSA.JSONData.AgreementDetailData) -> (),
onFailed: @escaping OnFailed,
onError: @escaping OnError,
onTotalLog: @escaping OnTotalLog? = nil,
onCompleted: @escaping onCompleted? = nil,
disposeBag: DisposeBag )
Parameter | Type | Description |
---|---|---|
seq | Int | BSA.Enums.AgreementData's seq value |
clientKey | String | Client's unique key |
onSuccess | (BSA.Enums.AgreementDetailData) -> () | Callback called on success. It contains detailed information about the terms and conditions. |
onFailed | OnFailed | Callback function called on API processing failure. |
onError | OnError | Callback function called on error. |
onTotalLog | OnTotalLog | Callback function to receive all logs generated during API calls. |
onCompleted | onCompleted | Called at the end after all processes are completed. |
disposeBag | DisposeBag | DisposeBag variable to manage RxSwift Disposable objects. |
Description
- Retrieve detailed information about the terms and conditions that match the
seq
.
Related Data
BSA.Enums.AgreementDetailData
Name | Type | Description |
---|---|---|
regDt | String | Registration date. |
lang | String | Language. |
clientKey | String | Client's unique key |
clientName | String | Client name |
regUserKey | String | Registrant's ID. |
seq | Int | Sequence. |
title | String | Title. |
type | String | Type of terms and conditions. |
content | String | Terms and conditions text. |
ii. Notice
API : BSA.APICaller.retrieveNotice
swift
BSA.APICaller.retrieveNotice(clientKey: "a1hrg2xv...",
pageIndex: pageIndex,
pageSize: pageSize,
onSuccess: { arrayData, pageData in
// Successful Invocation
}, onFailed: { [weak self] rtCode, resultMessage in
// Invocation Failure
}, onError: { [weak self] error in
// Invocation Error
}, onTotalLog: { text in
// Invocation Log
}, onCompleted: {
// invocation completed
}, disposeBag: disposeBag)
Parameters
swift
BSA.APICaller.retrieveNotice(clientKey: String,
pageIndex: Int,
pageSize: Int,
onSuccess: @escaping ([BSA.JSONData.NoticeData], BSA.JSONData.NoticePage) -> (),
onFailed: @escaping OnFailed,
onError: @escaping OnError,
onTotalLog: @escaping OnTotalLog? = nil,
onCompleted: @escaping onCompleted? = nil,
disposeBag: DisposeBag )
Parameter | Type | Description |
---|---|---|
clientKey | String | Client's unique key |
pageIndex | Int | Page number to be queried. The value for the first page is 0. |
pageSize | Int | Number of Notice entries per page. |
onSuccess | ([BSA.JSONData.NoticeData], BSA.JSONData.NoticePage ) -> () | Callback called on success. It returns an array of Notice data and page information. |
onFailed | OnFailed | Callback function called on API processing failure. |
onError | OnError | Callback function called on error. |
onTotalLog | OnTotalLog | Callback function to receive all logs generated during API calls. |
onCompleted | onCompleted | Called at the end after all processes are completed. |
disposeBag | DisposeBag | DisposeBag variable to manage RxSwift Disposable objects. |
Description
- The information about Notice is contained in
[BSA.JSONData.NoticeData]
returned on success. BSA.JSONData.NoticePage
contains page information such as the maximum number of entries per page.
Related Data
BSA.JSONData.NoticeData
Name | Type | Description |
---|---|---|
seq | Int | Sequence. |
version | String | App's Version |
patchType | String | OS Type |
title | String | Title. |
regUserName | String | Registrant's ID. |
content | String | Content. |
deplyDt | String | Distribution date. |
regDt | String | Registration date. |
BSA.JSONData.NoticePage
Name | Type | Description |
---|---|---|
first | Bool | Check if the current data is on the first page. |
last | Bool | Check if the current data is on the last page. |
currentPage | Int | Current page number. |
pageSize | Int | Number of data entries per page. |
totalElements | Int | Total number of data entries. |
totalPages | Int | Total number of pages calculated based on (pageSize). |