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
(Go) Shopify Receive Count of All Products in a CollectionGet a count of all products of a given collection
rest := chilkat.NewRest() var success bool rest.SetAuthBasic("SHOPIFY_PRIVATE_API_KEY","SHOPIFY_PRIVATE_API_KEY") success = rest.Connect("chilkat.myshopify.com",443,true,true) if success != true { fmt.Println(rest.LastErrorText()) rest.DisposeRest() return } sbJson := chilkat.NewStringBuilder() success = rest.FullRequestNoBodySb("GET","/admin/products/count.json?collection_id=841564295 ",sbJson) if success != true { fmt.Println(rest.LastErrorText()) rest.DisposeRest() sbJson.DisposeStringBuilder() return } if rest.ResponseStatusCode() != 200 { fmt.Println("Received error response code: ", rest.ResponseStatusCode()) fmt.Println("Response body:") fmt.Println(*sbJson.GetAsString()) rest.DisposeRest() sbJson.DisposeStringBuilder() return } json := chilkat.NewJsonObject() json.LoadSb(sbJson) // The following code parses the JSON response. // A sample JSON response is shown below the sample code. var count int count = json.IntOf("count") // A sample JSON response body that is parsed by the above code: // { // "count": 1 // } fmt.Println("Example Completed.") rest.DisposeRest() sbJson.DisposeStringBuilder() json.DisposeJsonObject() |
© 2000-2023 Chilkat Software, Inc. All Rights Reserved.