Example #1
0
        static void Main(string[] args)
        {
            var user = new ApiUser { Name = Environment.MachineName };
            var tokenStore = new SqliteTokenStore();

            var api = new Applications.Public.Core(tokenStore, user)
            {
                UserAgent = "Xero Api - Listing example"
            };

            new Lister(api).ListAsync().GetAwaiter().GetResult();            
        }
Example #2
0
        static void Main(string[] args)
        {
            var user = new ApiUser {
                Name = Environment.MachineName
            };
            var tokenStore = new SqliteTokenStore();

            var api = new Applications.Public.Core(tokenStore, user)
            {
                UserAgent = "Xero Api - Listing example"
            };

            new Lister(api).List();
        }
Example #3
0
        static void Main(string[] args)
        {
            var user = new ApiUser { Name = Environment.MachineName };
            var tokenStore = new SqliteTokenStore();

            var api = new Applications.Public.Core(tokenStore, user)
            {
                UserAgent = "Xero Api - Creating example"
            };

            var creator = new Creator.Creator();
            new ApiDataCreation(api).Create(10, 10,
                creator.People(5),
                creator.Addresses(5),
                creator.Descriptions(5));
        }
Example #4
0
        static void Main(string[] args)
        {
            var user = new ApiUser { Name = Environment.MachineName }; // ApiUser is used when retrieving tokens from the token store - See TokenStoreAuthenticator GetToken(IConsumer consumer, IUser user). This is primarily for Partner Applications
            var tokenStore = new SqliteTokenStore();

            var api = new Applications.Public.Core(tokenStore, user)
            {
                UserAgent = "Xero Api - Creating example"
            };

            var creator = new Creator.Creator();
            new ApiDataCreation(api).Create(10, 10,
                creator.People(5),
                creator.Addresses(5),
                creator.Descriptions(5));
        }
Example #5
0
        static void Main(string[] args)
        {
            var user = new ApiUser {
                Name = Environment.MachineName
            };                                                         // ApiUser is used when retrieving tokens from the token store - See TokenStoreAuthenticator GetToken(IConsumer consumer, IUser user). This is primarily for Partner Applications
            var tokenStore = new SqliteTokenStore();

            var api = new Applications.Public.Core(tokenStore, user)
            {
                UserAgent = "Xero Api - Creating example"
            };

            var creator = new Creator.Creator();

            new ApiDataCreation(api).Create(10, 10,
                                            creator.People(5),
                                            creator.Addresses(5),
                                            creator.Descriptions(5));
        }
Example #6
0
        static void Main(string[] args)
        {
            var user = new ApiUser {
                Name = Environment.MachineName
            };
            var tokenStore = new SqliteTokenStore();

            var api = new Applications.Public.Core(tokenStore, user)
            {
                UserAgent = "Xero Api - Creating example"
            };

            var creator = new Creator.Creator();

            new ApiDataCreation(api).Create(10, 10,
                                            creator.People(5),
                                            creator.Addresses(5),
                                            creator.Descriptions(5));
        }