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) MercadoLibre - Consultar mis datos personales

Consultar mis datos personales

For more information, see https://developers.mercadolibre.com.ar/es_ar/servicios-consulta-usuarios

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

Use ChilkatAx-win32.pkg

Procedure Test
    Handle hoHttp
    Handle hoJsonToken
    Boolean iSuccess
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJResp
    Integer iRespStatusCode
    String sStrVal
    Integer iId
    String sNickname
    String sRegistration_date
    String sCountry_id
    String sAddressState
    String sAddressCity
    String sUser_type
    String sLogo
    Integer iPoints
    String sSite_id
    String sPermalink
    String sSeller_reputationLevel_id
    String sSeller_reputationPower_seller_status
    String sSeller_reputationTransactionsPeriod
    Integer iSeller_reputationTransactionsTotal
    Integer iSeller_reputationTransactionsCompleted
    Integer iSeller_reputationTransactionsCanceled
    Integer iSeller_reputationTransactionsRatingsPositive
    Integer iSeller_reputationTransactionsRatingsNegative
    Integer iSeller_reputationTransactionsRatingsNeutral
    String sStatusSite_status
    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

    // First get our previously obtained OAuth2 access token.
    Get Create (RefClass(cComChilkatJsonObject)) To hoJsonToken
    If (Not(IsComObjectCreated(hoJsonToken))) Begin
        Send CreateComObject of hoJsonToken
    End
    Get ComLoadFile Of hoJsonToken "qa_data/tokens/mercadolibre.json" To iSuccess

    // Implements the following CURL command:

    // curl - X GET https://api.mercadolibre.com/users/me?access_token=$ACCESS_TOKEN

    // Use the following online tool to generate HTTP code from a CURL command
    // Convert a cURL Command to HTTP Source Code

    Get ComStringOf Of hoJsonToken "access_token" To sTemp1
    Get ComSetUrlVar Of hoHttp "access_token" sTemp1 To iSuccess

    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.mercadolibre.com/users/me?access_token={$access_token}" 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)

    // {
    //   "id": 202593498,
    //   "nickname": "TETE2870021",
    //   "registration_date": "2016-01-06T11: 31: 42.000-04: 00",
    //   "country_id": "AR",
    //   "address": {
    //     "state": "AR-C",
    //     "city": "Palermo"
    //   },
    //   "user_type": "normal",
    //   "tags": [
    //     "normal",
    //     "test_user",
    //     "user_info_verified"
    //   ],
    //   "logo": null,
    //   "points": 100,
    //   "site_id": "MLA",
    //   "permalink": "http://perfil.mercadolibre.com.ar/TETE2870021",
    //   "seller_reputation": {
    //     "level_id": null,
    //     "power_seller_status": null,
    //     "transactions": {
    //       "period": "historic",
    //       "total": 0,
    //       "completed": 0,
    //       "canceled": 0,
    //       "ratings": {
    //         "positive": 0,
    //         "negative": 0,
    //         "neutral": 0
    //       }
    //     }
    //   },
    //   "buyer_reputation": {
    //     "tags": [
    //     ]
    //   },
    //   "status": {
    //     "site_status": "active"
    //   }
    // }

    // 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 ComIntOf Of hoJResp "id" To iId
    Get ComStringOf Of hoJResp "nickname" To sNickname
    Get ComStringOf Of hoJResp "registration_date" To sRegistration_date
    Get ComStringOf Of hoJResp "country_id" To sCountry_id
    Get ComStringOf Of hoJResp "address.state" To sAddressState
    Get ComStringOf Of hoJResp "address.city" To sAddressCity
    Get ComStringOf Of hoJResp "user_type" To sUser_type
    Get ComStringOf Of hoJResp "logo" To sLogo
    Get ComIntOf Of hoJResp "points" To iPoints
    Get ComStringOf Of hoJResp "site_id" To sSite_id
    Get ComStringOf Of hoJResp "permalink" To sPermalink
    Get ComStringOf Of hoJResp "seller_reputation.level_id" To sSeller_reputationLevel_id
    Get ComStringOf Of hoJResp "seller_reputation.power_seller_status" To sSeller_reputationPower_seller_status
    Get ComStringOf Of hoJResp "seller_reputation.transactions.period" To sSeller_reputationTransactionsPeriod
    Get ComIntOf Of hoJResp "seller_reputation.transactions.total" To iSeller_reputationTransactionsTotal
    Get ComIntOf Of hoJResp "seller_reputation.transactions.completed" To iSeller_reputationTransactionsCompleted
    Get ComIntOf Of hoJResp "seller_reputation.transactions.canceled" To iSeller_reputationTransactionsCanceled
    Get ComIntOf Of hoJResp "seller_reputation.transactions.ratings.positive" To iSeller_reputationTransactionsRatingsPositive
    Get ComIntOf Of hoJResp "seller_reputation.transactions.ratings.negative" To iSeller_reputationTransactionsRatingsNegative
    Get ComIntOf Of hoJResp "seller_reputation.transactions.ratings.neutral" To iSeller_reputationTransactionsRatingsNeutral
    Get ComStringOf Of hoJResp "status.site_status" To sStatusSite_status
    Move 0 To i
    Get ComSizeOfArray Of hoJResp "tags" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComStringOf Of hoJResp "tags[i]" To sStrVal
        Move (i + 1) To i
    Loop

    Move 0 To i
    Get ComSizeOfArray Of hoJResp "buyer_reputation.tags" 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.