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
(AutoIt) 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
; This example assumes the Chilkat API to have been previously unlocked. ; See Global Unlock Sample for sample code. $oHttp = ObjCreate("Chilkat.Http") Local $bSuccess ; 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 $oHttp.Login = "<username>" $oHttp.Password = "<password>" $oSbResponseBody = ObjCreate("Chilkat.StringBuilder") $bSuccess = $oHttp.QuickGetSb("https://api.yapily.com/me",$oSbResponseBody) If ($bSuccess = False) Then ConsoleWrite($oHttp.LastErrorText & @CRLF) Exit EndIf $oJResp = ObjCreate("Chilkat.JsonObject") $oJResp.LoadSb($oSbResponseBody) $oJResp.EmitCompact = False ConsoleWrite("Response Body:" & @CRLF) ConsoleWrite($oJResp.Emit() & @CRLF) Local $iRespStatusCode = $oHttp.LastStatus ConsoleWrite("Response Status Code = " & $iRespStatusCode & @CRLF) If ($iRespStatusCode >= 400) Then ConsoleWrite("Response Header:" & @CRLF) ConsoleWrite($oHttp.LastHeader & @CRLF) ConsoleWrite("Failed." & @CRLF) Exit 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 Local $strVal Local $sId Local $sFullName Local $sEnvironmentType Local $sCredentialsType Local $iJ Local $iCount_j Local $sDisplayName Local $sCountryCode2 Local $source Local $sV_type Local $sUuid = $oJResp.StringOf("uuid") Local $sName = $oJResp.StringOf("name") Local $bActive = $oJResp.BoolOf("active") Local $sCreated = $oJResp.StringOf("created") Local $sUpdated = $oJResp.StringOf("updated") Local $i = 0 Local $iCount_i = $oJResp.SizeOfArray("authCallbacks") While $i < $iCount_i $oJResp.I = $i $strVal = $oJResp.StringOf("authCallbacks[i]") $i = $i + 1 Wend $i = 0 $iCount_i = $oJResp.SizeOfArray("institutions") While $i < $iCount_i $oJResp.I = $i $sId = $oJResp.StringOf("institutions[i].id") $sName = $oJResp.StringOf("institutions[i].name") $sFullName = $oJResp.StringOf("institutions[i].fullName") $sEnvironmentType = $oJResp.StringOf("institutions[i].environmentType") $sCredentialsType = $oJResp.StringOf("institutions[i].credentialsType") $iJ = 0 $iCount_j = $oJResp.SizeOfArray("institutions[i].countries") While $iJ < $iCount_j $oJResp.J = $iJ $sDisplayName = $oJResp.StringOf("institutions[i].countries[j].displayName") $sCountryCode2 = $oJResp.StringOf("institutions[i].countries[j].countryCode2") $iJ = $iJ + 1 Wend $iJ = 0 $iCount_j = $oJResp.SizeOfArray("institutions[i].media") While $iJ < $iCount_j $oJResp.J = $iJ $source = $oJResp.StringOf("institutions[i].media[j].source") $sV_type = $oJResp.StringOf("institutions[i].media[j].type") $iJ = $iJ + 1 Wend $iJ = 0 $iCount_j = $oJResp.SizeOfArray("institutions[i].features") While $iJ < $iCount_j $oJResp.J = $iJ $strVal = $oJResp.StringOf("institutions[i].features[j]") $iJ = $iJ + 1 Wend $i = $i + 1 Wend $i = 0 $iCount_i = $oJResp.SizeOfArray("media") While $i < $iCount_i $oJResp.I = $i $i = $i + 1 Wend |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.