SOAP API Demo - VB.NET
Overview
SoapApiDemo VB.NET demonstrates how to use SDK API wrapper classes (AddItemCall,
GetItemCall, etc).
Build Instructions
Run Visual Studio .NET, open SoapApiDemo.sln and build it.
How it works
- SoapApiDemo lists all available SDK API classes in its main window.
Each SDK API class is represented by its verb in the list box (e.g., "AddItem"
in the list represents AddItemCall class of SDK)
- Click "Config Api Account" button in the main window will pop up
FormAccount dialog. It demonstrates how to collection user input to
construct an ApiContext object, which is required to call each API class.
- When the user clicks the the "Run [Verb]" (e.g., "Run
AddItem") button, SoapApiDemo will invoke a form with the name
convention of "Form[Verb]". E.g., if you click "Run AddItem",
FormAddItem will be displayed.
- Each API form (e.g., FormAddItem) follows the same pattern to call SDK API
class:
1) Collect user input in form. For AddItem, user needs to enter Title,
Description, StartPrice, Quantity, etc.
2) Create SDK call class. e.g., for AddItemCall:
Dim
item As ItemType
= FillItem()
Dim
ApiCall As
AddItemCall = New
AddItemCall(Context)
3) Call the verb method in the call class.
Dim
fees As
FeeTypeCollection = ApiCall.AddItem(item)
4) Display call results in form.