Home
Find the answer to your question
How can I make a simple GetCategorySpecifics API request using VB .NET?
Summary
GetCategorySpecifics VB .NET sample
This sample is using Microsoft Visual Studio 2010, eBay .NET SDK Version 825 - .NET 4.0 Point Release
Requirements:
After opening a VB project,
- Add a reference to the eBay DLL's, if you do not have them you can download them from here, https://go.developer.ebay.com/developers/ebay/documentation-tools/sdks/dotnet
- Make sure Target Framework is NOT set to .NET Framework Client Profile
- Here are the imports you will need
Imports eBay.Service.Call
Imports eBay.Service.Core.Sdk
Imports eBay.Service.Util
Imports eBay.Service.Core.Soap
1. Code Sample (This sample was in a windows form project in a button click):
'© 2013-2013 eBay Inc., All Rights Reserved 'Licensed under CDDL 1.0 - http://opensource.org/licenses/cddl1.php 'create the context Dim context As New ApiContext() 'set the User token context.ApiCredential.eBayToken = "your token here" 'sandbox URL 'context.SoapApiServerUrl = "https://api.sandbox.ebay.com/wsapi" 'production URL context.SoapApiServerUrl = "https://api.ebay.com/wsapi" 'enable logging context.ApiLogManager = New ApiLogManager() context.ApiLogManager.ApiLoggerList.Add(New FileLogger("log.txt", True, True, True)) context.ApiLogManager.EnableLogging = True 'set the version context.Version = "825" context.Site = SiteCodeType.US Dim GCSCall As New GetCategorySpecificsCall(context) ' //' set the Version used in the call GCSCall.Version = context.Version ' //' set the Site of the call GCSCall.Site = context.Site ' //' enable the compression feature GCSCall.EnableCompression = True 'This is where you will input your CategoryID GCSCall.CategoryIDList = New StringCollection() GCSCall.CategoryIDList.Add("377") GCSCall.MaxValuesPerName = 200 GCSCall.DetailLevelList = New DetailLevelCodeTypeCollection() GCSCall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll) GCSCall.Execute() 'TODO 'Need to write the code to parse the info out of the response that you want. |
eBay SDK for .NET page: http://developer.ebay.com/developercenter/windows/sdk/