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

Swift 3,4,5... 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
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

 

 

 

(Swift 3,4,5...) Walmart v3 Get All Feed Statuses

Returns the feed statuses for all the specified Feed IDs.

For more information, see https://developer.walmart.com/#/apicenter/marketPlace/latest#getAllFeedStatuses

Chilkat Downloads for the Swift Programming Language

MAC OS X (Cocoa) Objective-C/Swift Libs

iOS Objective-C/Swift Libs

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

    let http = CkoHttp()!
    var success: Bool

    // Implements the following CURL command:

    // curl -X GET \
    //   https://marketplace.walmartapis.com/v3/feeds?feedId={feedId}&limit={limit}&offset={offset} \
    //   -H 'WM_SVC.NAME: Walmart Marketplace'
    //   -H 'WM_SEC.ACCESS_TOKEN: eyJraWQiOiIzZjVhYTFmNS1hYWE5LTQzM.....'
    //   -H 'WM_QOS.CORRELATION_ID: b3261d2d-028a-4ef7-8602-633c23200af6'
    //   -H 'Content-Type: application/xml'
    //   -H 'Accept: application/xml'

    http.setRequestHeader("WM_QOS.CORRELATION_ID", value: "b3261d2d-028a-4ef7-8602-633c23200af6")
    http.setRequestHeader("Content-Type", value: "application/xml")
    http.setRequestHeader("WM_SEC.ACCESS_TOKEN", value: "eyJraWQiOiIzZjVhYTFmNS1hYWE5LTQzM.....")
    http.setRequestHeader("Accept", value: "application/xml")
    http.setRequestHeader("WM_SVC.NAME", value: "Walmart Marketplace")

    let sbResponseBody = CkoStringBuilder()!
    success = http.quickGetSb("https://marketplace.walmartapis.com/v3/feeds?feedId={feedId}&limit={limit}&offset={offset}", sbContent: sbResponseBody)
    if success == false {
        print("\(http.lastErrorText!)")
        return
    }

    let xmlResponse = CkoXml()!
    xmlResponse.loadSb(sbResponseBody, autoTrim: true)

    // Sample XML response:
    // (Sample code for parsing the XML response is shown below)

    // <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    // <ns2:list xmlns:ns2="http://walmart.com/">
    //     <ns2:totalResults>2</ns2:totalResults>
    //     <ns2:offset>0</ns2:offset>
    //     <ns2:limit>50</ns2:limit>
    //     <ns2:results>
    //         <ns2:feed>
    //             <ns2:feedId>12234EGGT564YTEGFA@AQMBAQA</ns2:feedId>
    //             <ns2:feedSource>MARKETPLACE_PARTNER</ns2:feedSource>
    //             <ns2:feedType>item</ns2:feedType>
    //             <ns2:partnerId>1413254255</ns2:partnerId>
    //             <ns2:itemsReceived>1</ns2:itemsReceived>
    //             <ns2:itemsSucceeded>1</ns2:itemsSucceeded>
    //             <ns2:itemsFailed>0</ns2:itemsFailed>
    //             <ns2:itemsProcessing>0</ns2:itemsProcessing>
    //             <ns2:feedStatus>PROCESSED</ns2:feedStatus>
    //             <ns2:feedDate>2018-07-20T21:56:12.605Z</ns2:feedDate>
    //             <ns2:batchId>HP_REQUEST_BATCH</ns2:batchId>
    //             <ns2:modifiedDtm>2018-07-20T21:56:17.948Z</ns2:modifiedDtm>
    //             <ns2:fileName>ItemFeed99_ParadiseCounty_paperback.xml</ns2:fileName>
    //             <ns2:itemDataErrorCount>0</ns2:itemDataErrorCount>
    //             <ns2:itemSystemErrorCount>0</ns2:itemSystemErrorCount>
    //             <ns2:itemTimeoutErrorCount>0</ns2:itemTimeoutErrorCount>
    //             <ns2:channelType>WM_TEST</ns2:channelType>
    //         </ns2:feed>
    //         <ns2:feed>
    //             <ns2:feedId>12234EGGT564YTEGFA@AQMBAQA</ns2:feedId>
    //             <ns2:feedSource>MARKETPLACE_PARTNER</ns2:feedSource>
    //             <ns2:feedType>item</ns2:feedType>
    //             <ns2:partnerId>1413254255</ns2:partnerId>
    //             <ns2:itemsReceived>1</ns2:itemsReceived>
    //             <ns2:itemsSucceeded>1</ns2:itemsSucceeded>
    //             <ns2:itemsFailed>0</ns2:itemsFailed>
    //             <ns2:itemsProcessing>0</ns2:itemsProcessing>
    //             <ns2:feedStatus>PROCESSED</ns2:feedStatus>
    //             <ns2:feedDate>2018-07-20T21:56:12.605Z</ns2:feedDate>
    //             <ns2:batchId>HP_REQUEST_BATCH</ns2:batchId>
    //             <ns2:modifiedDtm>2018-07-20T21:56:17.948Z</ns2:modifiedDtm>
    //             <ns2:fileName>ItemFeed99_ParadiseCounty_paperback.xml</ns2:fileName>
    //             <ns2:itemDataErrorCount>0</ns2:itemDataErrorCount>
    //             <ns2:itemSystemErrorCount>0</ns2:itemSystemErrorCount>
    //             <ns2:itemTimeoutErrorCount>0</ns2:itemTimeoutErrorCount>
    //             <ns2:channelType>WM_TEST</ns2:channelType>
    //         </ns2:feed>
    //     </ns2:results>
    // </ns2:list>

    // Sample code for parsing the XML response...
    // Use the following online tool to generate parsing code from sample XML:
    // Generate Parsing Code from XML

    var ns2_list_xmlns_ns2: String?
    var ns2_totalResults: Int
    var ns2_offset: Int
    var ns2_limit: Int
    var i: Int
    var count_i: Int
    var ns2_feedId: String?
    var ns2_feedSource: String?
    var ns2_feedType: String?
    var ns2_partnerId: Int
    var ns2_itemsReceived: Int
    var ns2_itemsSucceeded: Int
    var ns2_itemsFailed: Int
    var ns2_itemsProcessing: Int
    var ns2_feedStatus: String?
    var ns2_feedDate: String?
    var ns2_batchId: String?
    var ns2_modifiedDtm: String?
    var ns2_fileName: String?
    var ns2_itemDataErrorCount: Int
    var ns2_itemSystemErrorCount: Int
    var ns2_itemTimeoutErrorCount: Int
    var ns2_channelType: String?

    ns2_list_xmlns_ns2 = xmlResponse.getAttrValue("xmlns:ns2")
    ns2_totalResults = xmlResponse.getChildIntValue("ns2:totalResults").intValue
    ns2_offset = xmlResponse.getChildIntValue("ns2:offset").intValue
    ns2_limit = xmlResponse.getChildIntValue("ns2:limit").intValue
    i = 0
    count_i = xmlResponse.numChildrenHavingTag("ns2:results|ns2:feed").intValue
    while i < count_i {
        xmlResponse.i = i
        ns2_feedId = xmlResponse.getChildContent("ns2:results|ns2:feed[i]|ns2:feedId")
        ns2_feedSource = xmlResponse.getChildContent("ns2:results|ns2:feed[i]|ns2:feedSource")
        ns2_feedType = xmlResponse.getChildContent("ns2:results|ns2:feed[i]|ns2:feedType")
        ns2_partnerId = xmlResponse.getChildIntValue("ns2:results|ns2:feed[i]|ns2:partnerId").intValue
        ns2_itemsReceived = xmlResponse.getChildIntValue("ns2:results|ns2:feed[i]|ns2:itemsReceived").intValue
        ns2_itemsSucceeded = xmlResponse.getChildIntValue("ns2:results|ns2:feed[i]|ns2:itemsSucceeded").intValue
        ns2_itemsFailed = xmlResponse.getChildIntValue("ns2:results|ns2:feed[i]|ns2:itemsFailed").intValue
        ns2_itemsProcessing = xmlResponse.getChildIntValue("ns2:results|ns2:feed[i]|ns2:itemsProcessing").intValue
        ns2_feedStatus = xmlResponse.getChildContent("ns2:results|ns2:feed[i]|ns2:feedStatus")
        ns2_feedDate = xmlResponse.getChildContent("ns2:results|ns2:feed[i]|ns2:feedDate")
        ns2_batchId = xmlResponse.getChildContent("ns2:results|ns2:feed[i]|ns2:batchId")
        ns2_modifiedDtm = xmlResponse.getChildContent("ns2:results|ns2:feed[i]|ns2:modifiedDtm")
        ns2_fileName = xmlResponse.getChildContent("ns2:results|ns2:feed[i]|ns2:fileName")
        ns2_itemDataErrorCount = xmlResponse.getChildIntValue("ns2:results|ns2:feed[i]|ns2:itemDataErrorCount").intValue
        ns2_itemSystemErrorCount = xmlResponse.getChildIntValue("ns2:results|ns2:feed[i]|ns2:itemSystemErrorCount").intValue
        ns2_itemTimeoutErrorCount = xmlResponse.getChildIntValue("ns2:results|ns2:feed[i]|ns2:itemTimeoutErrorCount").intValue
        ns2_channelType = xmlResponse.getChildContent("ns2:results|ns2:feed[i]|ns2:channelType")
        i = i + 1
    }


}

 

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