Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Lianja) Shopify Receive Count of All Products in a CollectionGet a count of all products of a given collection
loRest = createobject("CkRest") loRest.SetAuthBasic("SHOPIFY_PRIVATE_API_KEY","SHOPIFY_PRIVATE_API_KEY") llSuccess = loRest.Connect("chilkat.myshopify.com",443,.T.,.T.) if (llSuccess <> .T.) then ? loRest.LastErrorText release loRest return endif loSbJson = createobject("CkStringBuilder") llSuccess = loRest.FullRequestNoBodySb("GET","/admin/products/count.json?collection_id=841564295 ",loSbJson) if (llSuccess <> .T.) then ? loRest.LastErrorText release loRest release loSbJson return endif if (loRest.ResponseStatusCode <> 200) then ? "Received error response code: " + str(loRest.ResponseStatusCode) ? "Response body:" ? loSbJson.GetAsString() release loRest release loSbJson return endif loJson = createobject("CkJsonObject") loJson.LoadSb(loSbJson) // The following code parses the JSON response. // A sample JSON response is shown below the sample code. lnCount = loJson.IntOf("count") // A sample JSON response body that is parsed by the above code: // { // "count": 1 // } ? "Example Completed." release loRest release loSbJson release loJson |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.