Exemple #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            GetUserCall apiCall = new GetUserCall(apiContext);

            apiCall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll);
            apiCall.Execute();

            Console.WriteLine("UserID: " + apiCall.User.UserID.ToString());
            Console.WriteLine("EIAS Token is: " + apiCall.User.EIASToken.ToString());
            Console.WriteLine();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            try
            {
                Console.WriteLine("+++++++++++++++++++++++++++++++++++++++");
                Console.WriteLine("+ Welcome to eBay SDK for .Net Sample +");
                Console.WriteLine("+ - ConsoleGetUser                    +");
                Console.WriteLine("+++++++++++++++++++++++++++++++++++++++");

                //Initialize eBay ApiContext object
                ApiContext apiContext = GetApiContext();


                //Create Call object and execute the Call
                GetUserCall apiCall = new GetUserCall(apiContext);

                apiCall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll);
                apiCall.Execute();
                Console.WriteLine("Begin to call eBay API, please wait ...");

                Console.WriteLine("End to call eBay API, show call result ...");
                Console.WriteLine();

                //Handle the result returned
                Console.WriteLine("UserID: " + apiCall.User.UserID.ToString());
                Console.WriteLine("EIAS Token is: " + apiCall.User.EIASToken.ToString());
                Console.WriteLine();

                if (apiCall.User.eBayGoodStanding == true)
                {
                    Console.WriteLine("User has good eBay standing");
                }

                Console.WriteLine("Rating Star color: " + apiCall.User.FeedbackRatingStar.ToString());
                Console.WriteLine("Feedback score: " + apiCall.User.FeedbackScore.ToString());
                Console.WriteLine();

                Console.WriteLine("Total count of Negative Feedback: " + apiCall.User.UniqueNegativeFeedbackCount.ToString());
                Console.WriteLine("Total count of Neutral Feedback: " + apiCall.User.UniqueNeutralFeedbackCount.ToString());
                Console.WriteLine("Total count of Positive Feedback: " + apiCall.User.UniquePositiveFeedbackCount.ToString());
                Console.WriteLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Failed to get user data : " + ex.Message);
            }

            Console.WriteLine();
            Console.WriteLine("Press any key to close the program.");
            Console.ReadKey();
        }