Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Visual FoxPro) Yapily - Get Application SelfSee more Yapily ExamplesGet the information about the institutions configured in your application For more information, see https://docs.yapily.com/api/reference/#operation/getApplicationMe
LOCAL loHttp LOCAL lnSuccess LOCAL loSbResponseBody LOCAL loJResp LOCAL lnRespStatusCode LOCAL lcStrVal LOCAL lcId LOCAL lcFullName LOCAL lcEnvironmentType LOCAL lcCredentialsType LOCAL j LOCAL lnCount_j LOCAL lcDisplayName LOCAL lcCountryCode2 LOCAL lcSource LOCAL lcV_type LOCAL lcUuid LOCAL lcName LOCAL lnActive LOCAL lcCreated LOCAL lcUpdated LOCAL i LOCAL lnCount_i * This example assumes the Chilkat API to have been previously unlocked. * See Global Unlock Sample for sample code. * For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Http') loHttp = CreateObject('Chilkat.Http') * Implements the following CURL command: * curl -i -X GET \ * -u <username>:<password> \ * https://api.yapily.com/me * Use the following online tool to generate HTTP code from a CURL command * Convert a cURL Command to HTTP Source Code loHttp.Login = "<username>" loHttp.Password = "<password>" * For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.StringBuilder') loSbResponseBody = CreateObject('Chilkat.StringBuilder') lnSuccess = loHttp.QuickGetSb("https://api.yapily.com/me",loSbResponseBody) IF (lnSuccess = 0) THEN ? loHttp.LastErrorText RELEASE loHttp RELEASE loSbResponseBody CANCEL ENDIF * For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject') loJResp = CreateObject('Chilkat.JsonObject') loJResp.LoadSb(loSbResponseBody) loJResp.EmitCompact = 0 ? "Response Body:" ? loJResp.Emit() lnRespStatusCode = loHttp.LastStatus ? "Response Status Code = " + STR(lnRespStatusCode) IF (lnRespStatusCode >= 400) THEN ? "Response Header:" ? loHttp.LastHeader ? "Failed." RELEASE loHttp RELEASE loSbResponseBody RELEASE loJResp CANCEL ENDIF * Sample JSON response: * (Sample code for parsing the JSON response is shown below) * { * "uuid": "64949de6-6510-4d70-9500-d4aa094c506c", * "name": "APPLICATION NAME", * "active": true, * "authCallbacks": [ * "https://display-parameters.com/" * ], * "institutions": [ * { * "id": "modelo-sandbox", * "name": "Modelo Sandbox", * "fullName": "Modelo Sandbox", * "countries": [ * { * "displayName": "United Kingdom", * "countryCode2": "GB" * } * ], * "environmentType": "SANDBOX", * "credentialsType": "OPEN_BANKING_UK_AUTO", * "media": [ * { * "source": "https://images.yapily.com/image/ce2bfdbf-1ae2-4919-ab7b-e8b3d5e93b36?size=0", * "type": "icon" * }, * { * "source": "https://images.yapily.com/image/ca502f24-d6df-4785-b4b8-1034b100af77?size=0", * "type": "logo" * } * ], * "features": [ * "INITIATE_SINGLE_PAYMENT_SORTCODE", * "CREATE_DOMESTIC_PERIODIC_PAYMENT", * "ACCOUNT_REQUEST_DETAILS", * "ACCOUNT_STATEMENT_FILE", * "CREATE_SINGLE_PAYMENT_SORTCODE", * "ACCOUNTS", * "CREATE_DOMESTIC_SCHEDULED_PAYMENT", * "ACCOUNT_PERIODIC_PAYMENTS", * "CREATE_DOMESTIC_SINGLE_PAYMENT", * "INITIATE_DOMESTIC_PERIODIC_PAYMENT", * "EXISTING_PAYMENTS_DETAILS", * "INITIATE_BULK_PAYMENT", * "EXISTING_PAYMENT_INITIATION_DETAILS", * "ACCOUNT_DIRECT_DEBITS", * "ACCOUNT_TRANSACTIONS", * "INITIATE_DOMESTIC_SINGLE_PAYMENT", * "PERIODIC_PAYMENT_FREQUENCY_EXTENDED", * "CREATE_INTERNATIONAL_SINGLE_PAYMENT", * "ACCOUNT_SCHEDULED_PAYMENTS", * "ACCOUNT", * "ACCOUNT_STATEMENTS", * "ACCOUNT_TRANSACTIONS_WITH_MERCHANT", * "CREATE_BULK_PAYMENT", * "ACCOUNT_BALANCES", * "INITIATE_INTERNATIONAL_SINGLE_PAYMENT", * "INITIATE_DOMESTIC_SCHEDULED_PAYMENT", * "ACCOUNT_BENEFICIARIES", * "IDENTITY", * "ACCOUNT_STATEMENT", * "INITIATE_ACCOUNT_REQUEST" * ] * } * ], * "media": [ * ], * "created": "2020-11-09T10:05:29.897+0000", * "updated": "2021-04-14T12:51:07.419+0000" * } * Sample code for parsing the JSON response... * Use the following online tool to generate parsing code from sample JSON: * Generate Parsing Code from JSON lcUuid = loJResp.StringOf("uuid") lcName = loJResp.StringOf("name") lnActive = loJResp.BoolOf("active") lcCreated = loJResp.StringOf("created") lcUpdated = loJResp.StringOf("updated") i = 0 lnCount_i = loJResp.SizeOfArray("authCallbacks") DO WHILE i < lnCount_i loJResp.I = i lcStrVal = loJResp.StringOf("authCallbacks[i]") i = i + 1 ENDDO i = 0 lnCount_i = loJResp.SizeOfArray("institutions") DO WHILE i < lnCount_i loJResp.I = i lcId = loJResp.StringOf("institutions[i].id") lcName = loJResp.StringOf("institutions[i].name") lcFullName = loJResp.StringOf("institutions[i].fullName") lcEnvironmentType = loJResp.StringOf("institutions[i].environmentType") lcCredentialsType = loJResp.StringOf("institutions[i].credentialsType") j = 0 lnCount_j = loJResp.SizeOfArray("institutions[i].countries") DO WHILE j < lnCount_j loJResp.J = j lcDisplayName = loJResp.StringOf("institutions[i].countries[j].displayName") lcCountryCode2 = loJResp.StringOf("institutions[i].countries[j].countryCode2") j = j + 1 ENDDO j = 0 lnCount_j = loJResp.SizeOfArray("institutions[i].media") DO WHILE j < lnCount_j loJResp.J = j lcSource = loJResp.StringOf("institutions[i].media[j].source") lcV_type = loJResp.StringOf("institutions[i].media[j].type") j = j + 1 ENDDO j = 0 lnCount_j = loJResp.SizeOfArray("institutions[i].features") DO WHILE j < lnCount_j loJResp.J = j lcStrVal = loJResp.StringOf("institutions[i].features[j]") j = j + 1 ENDDO i = i + 1 ENDDO i = 0 lnCount_i = loJResp.SizeOfArray("media") DO WHILE i < lnCount_i loJResp.I = i i = i + 1 ENDDO RELEASE loHttp RELEASE loSbResponseBody RELEASE loJResp |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.