Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

DataFlex Web API Examples

Primary Categories

ABN AMRO
AWS Secrets Manager
AWS Security Token Service
AWS Translate
Activix CRM
Adyen
Alibaba Cloud OSS
Amazon Cognito
Amazon DynamoDB
Amazon MWS
Amazon Pay
Amazon Rekognition
Amazon SP-API
Amazon Voice ID
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Backblaze S3
Banco Inter
Belgian eHealth Platform
Bitfinex v2 REST
Bluzone
BrickLink
Bunny CDN
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
Duo Auth MFA
ETrade
Ecwid
Egypt ITIDA
Egypt eReceipt
Etsy
Facebook
Faire
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Google Translate
Google Vision
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
JCC Cyprus
Jira
Lightspeed
MYOB
Magento
Mailgun
Malaysia MyInvois

Mastercard
MedTunnel
MercadoLibre
MessageMedia
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Microsoft Teams
Moody's
Okta OAuth/OIDC
OneLogin OIDC
OneNote
OpenAI ChatGPT
PRODA
PayPal
Paynow.pl
Peoplevox
Populi
QuickBooks
Rabobank
Refinitiv
Royal Mail OBA
SCiS Schools Catalogue
SII Chile
SMSAPI
SOAP finkok.com
Salesforce
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
TikTok Shop
Trello
Twilio
Twitter API v2
Twitter v1
UPS
UniPin
VoiceBase
Vonage
WaTrend
Walmart v3
Wasabi
WhatsApp
WiX
WooCommerce
WordPress
Xero
Yahoo Mail
Yapily
Yousign
ZATCA
Zendesk
Zoom
_Miscellaneous_
eBay
effectconnect
hacienda.go.cr

 

 

 

(DataFlex) Yapily - Get Application Self

See more Yapily Examples

Get the information about the institutions configured in your application

For more information, see https://docs.yapily.com/api/reference/#operation/getApplicationMe

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

Use ChilkatAx-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJResp
    Integer iRespStatusCode
    String sStrVal
    String sId
    String sFullName
    String sEnvironmentType
    String sCredentialsType
    Integer j
    Integer iCount_j
    String sDisplayName
    String sCountryCode2
    String sSource
    String sV_type
    String sUuid
    String sName
    Boolean iActive
    String sCreated
    String sUpdated
    Integer i
    Integer iCount_i
    String sTemp1

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    // 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

    Set ComLogin Of hoHttp To "<username>"
    Set ComPassword Of hoHttp To "<password>"

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComQuickGetSb Of hoHttp "https://api.yapily.com/me" vSbResponseBody To iSuccess
    If (iSuccess = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
    If (Not(IsComObjectCreated(hoJResp))) Begin
        Send CreateComObject of hoJResp
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
    Set ComEmitCompact Of hoJResp To False

    Showln "Response Body:"
    Get ComEmit Of hoJResp To sTemp1
    Showln sTemp1

    Get ComLastStatus Of hoHttp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Header:"
        Get ComLastHeader Of hoHttp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Procedure_Return
    End

    // 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

    Get ComStringOf Of hoJResp "uuid" To sUuid
    Get ComStringOf Of hoJResp "name" To sName
    Get ComBoolOf Of hoJResp "active" To iActive
    Get ComStringOf Of hoJResp "created" To sCreated
    Get ComStringOf Of hoJResp "updated" To sUpdated
    Move 0 To i
    Get ComSizeOfArray Of hoJResp "authCallbacks" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComStringOf Of hoJResp "authCallbacks[i]" To sStrVal
        Move (i + 1) To i
    Loop

    Move 0 To i
    Get ComSizeOfArray Of hoJResp "institutions" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComStringOf Of hoJResp "institutions[i].id" To sId
        Get ComStringOf Of hoJResp "institutions[i].name" To sName
        Get ComStringOf Of hoJResp "institutions[i].fullName" To sFullName
        Get ComStringOf Of hoJResp "institutions[i].environmentType" To sEnvironmentType
        Get ComStringOf Of hoJResp "institutions[i].credentialsType" To sCredentialsType
        Move 0 To j
        Get ComSizeOfArray Of hoJResp "institutions[i].countries" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "institutions[i].countries[j].displayName" To sDisplayName
            Get ComStringOf Of hoJResp "institutions[i].countries[j].countryCode2" To sCountryCode2
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "institutions[i].media" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "institutions[i].media[j].source" To sSource
            Get ComStringOf Of hoJResp "institutions[i].media[j].type" To sV_type
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "institutions[i].features" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "institutions[i].features[j]" To sStrVal
            Move (j + 1) To j
        Loop

        Move (i + 1) To i
    Loop

    Move 0 To i
    Get ComSizeOfArray Of hoJResp "media" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Move (i + 1) To i
    Loop



End_Procedure

 

© 2000-2024 Chilkat Software, Inc. All Rights Reserved.