Home
Find the answer to your question
I need to execute a request using the .NET SDK, but the call wrapper does not have a method with the parameters that I need to send in. How should I make the call?
Summary
All the SDK call wrapper classes derive from the ApiCall class which has a no argument Execute method. You can use this to execute your request and pass in inputs by setting the properties of the call. This is also the recommended way of executing requests using the SDK.
Detailed Description
/*
using System; namespace SDK3Examples public class GetCharities } { public void GetCharitiesUsingQuery(string query)
{ GetCharitiesCall apicall = new GetCharitiesCall(GetContext()); apicall.Query = query; apicall.Execute; // Get the Charity List CharityInfoTypeCollection charities = apicall.CharityList; } public ApiContext GetContext() // Credentials for the call }
context.ApiCredential.eBayToken = 'token'; // Set the URL // Set logging // Set the version return context; } |