/// <summary> /// Gets a members Watchlist - requires authentication. /// </summary> private void GetWatchlist() { //get the watchlist var watch = client.Watchlist(WatchlistCriteria.None, null, null); //display it in the console Console.Write("{0}Watchlist Response:{0}", Environment.NewLine); Console.Write(PrintMethods.PrintWatchlist(watch)); //return to the command list Start(); }
/// <summary> /// Get a list of Categories - does not require authentication. /// </summary> private void GetCategories() { try { Console.Write("Un-Authenticated Call:" + Environment.NewLine); Console.Write("Retrieve Categories:" + Environment.NewLine); //get a list of categories var cat = client.RetrieveCategories(); Console.Write(Environment.NewLine + PrintMethods.PrintCategories(cat)); } catch (Exception e) { Console.Write("Exception occured: " + e); } //return to the command list Start(); }
/// <summary> /// Get a listing details by listing ID - does not require authentication. /// </summary> private void GetListing() { try { Console.Write("{0}{0}Enter listing ID:{0}", Environment.NewLine); var readLine = Console.ReadLine(); if (readLine != null) { var listingId = readLine.Trim(); var listing = client.ListingDetailById(listingId); Console.Write(Environment.NewLine + PrintMethods.PrintListingInto(listing)); } } catch (Exception e) { Console.Write("Exception occured: " + e); } Start(); }