/// <summary> /// Creates IXeroCoreApi for Public App. /// </summary> /// <returns>IXeroCoreApi instance</returns> private static IXeroCoreApi PublicApp() { var tokenStore = new MemoryTokenStore(); var user = new ApiUser { Identifier = Environment.MachineName }; var publicAuth = new PublicAuthenticator(tokenStore); return(new Xero.Api.Infrastructure.Applications.Public.Core(publicAuth, user) { UserAgent = "Xero API - Invoice Application Demo" }); }
private static IXeroCoreApi PublicApp() { var tokenStore = new MemoryTokenStore(); var user = new ApiUser { Identifier = Environment.MachineName }; var publicAuth = new PublicAuthenticator(tokenStore, new XeroApiSettings()); return(new Infrastructure.Applications.Public.Core(publicAuth, user) { UserAgent = "Xero API - Listing example" }); }