Using system;
Using system. Collections. Generic;
Using COM. Taobao. API. util;
Using COM. Taobao. API;
Using system. net;
Using system. IO;
Using system. text;
Using system. Web;
Namespace Taobao. Open. API {
/// <Summary>
/// Taobao. Items. Get C # client API call example.
/// </Summary>
Public class itemsget
{
Public itemsget (){
Dictionary <string, string> req_params =
New Dictionary <string, string> ();
// System-level input parameter // app_key
Req_params.add ("app_key", "test ");
// Return format
Req_params.add ("format", "XML ");
// API method name
Req_params.add ("method", "Taobao. Items. Get ");
// Timestamp
Req_params.add ("timestamp", datetime. Now. tostring ("yyyy-mm-dd hh: mm: SS "));
// Version
Req_params.add ("V", "1.0 ");
// Application-level input parameters
// Return Field List
Req_params.add ("fields", "IID, title, Nick, pic_path, CID, price, type, location. City, delist_time, post_hour ");
// Query Conditions
Req_params.add ("Q", "iPhone 3G ");
// Secret, app secret key
String secret = "test ";
// Sign to generate a signature string
String Sign = encryptutil. Signature (req_params, secret, "sign ");
Req_params.add ("sign", sign );
// Call the API
Taobaojsonrestclient client = new taobaojsonrestclient ();
String responsebody = client. invokeapi (req_params); console. writeline (responsebody );}
Public static void main (string [] ARGs ){
// Call the API
Itemsget = new itemsget ();}}}