Ejemplo n.º 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).List();
        }
Ejemplo n.º 2
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));
        }
Ejemplo n.º 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));
        }