/// <summary>
        /// Get Address Book Location
        /// </summary>
        public void GetAddressbookLocation()
        {
            // Create the manager with the api key
            Route4MeManager route4Me = new Route4MeManager(c_ApiKey);

            AddressBookParameters addressBookParameters = new AddressBookParameters
            {
                Query = "david",
                Offset = 0,
                Limit = 20
            };

            // Run the query
            uint total = 0;
            string errorString = "";
            AddressBookContact[] contacts = route4Me.GetAddressBookLocation(addressBookParameters, out total, out errorString);

            Console.WriteLine("");

            if (contacts != null)
            {
                Console.WriteLine("GetAddressbookLocation executed successfully, {0} contacts returned, total = {1}", contacts.Length, total);

                Console.WriteLine("");
            }
            else
            {
                Console.WriteLine("GetAddressbookLocation error: {0}", errorString);
            }
        }
Exemple #2
0
        /// <summary>
        /// Search Locations By IDs
        /// </summary>
        public void SearchLocationsByIDs()
        {
            // Create the manager with the api key
            Route4MeManager route4Me = new Route4MeManager(c_ApiKey);

            AddressBookParameters addressBookParameters = new AddressBookParameters {
                AddressId = "2640129,4621569"
            };

            // Run the query
            uint   total       = 0;
            string errorString = "";

            AddressBookContact[] contacts = route4Me.GetAddressBookLocation(addressBookParameters, out total, out errorString);

            Console.WriteLine("");

            if (contacts != null)
            {
                Console.WriteLine("SearchLocationsByIDs executed successfully, {0} contacts returned, total = {1}", contacts.Length, total);

                Console.WriteLine("");
            }
            else
            {
                Console.WriteLine("SearchLocationsByIDs error: {0}", errorString);
            }
        }
        /// <summary>
        /// Get Address Book Location
        /// </summary>
        public void GetAddressbookLocation()
        {
            // Create the manager with the api key
            Route4MeManager route4Me = new Route4MeManager(c_ApiKey);

            AddressBookParameters addressBookParameters = new AddressBookParameters
            {
                Query  = "david",
                Offset = 0,
                Limit  = 20
            };

            // Run the query
            uint   total       = 0;
            string errorString = "";

            AddressBookContact[] contacts = route4Me.GetAddressBookLocation(addressBookParameters, out total, out errorString);

            Console.WriteLine("");

            if (contacts != null)
            {
                Console.WriteLine("GetAddressbookLocation executed successfully, {0} contacts returned, total = {1}", contacts.Length, total);

                Console.WriteLine("");
            }
            else
            {
                Console.WriteLine("GetAddressbookLocation error: {0}", errorString);
            }
        }
        /// <summary>
        /// Search Locations By IDs
        /// </summary>
        public void SearchLocationsByIDs()
        {
            // Create the manager with the api key
            Route4MeManager route4Me = new Route4MeManager(c_ApiKey);

            AddressBookParameters addressBookParameters = new AddressBookParameters { AddressId = "2640129,4621569" };

            // Run the query
            uint total = 0;
            string errorString = "";
            AddressBookContact[] contacts = route4Me.GetAddressBookLocation(addressBookParameters, out total, out errorString);

            Console.WriteLine("");

            if (contacts != null)
            {
                Console.WriteLine("SearchLocationsByIDs executed successfully, {0} contacts returned, total = {1}", contacts.Length, total);

                Console.WriteLine("");
            }
            else
            {
                Console.WriteLine("SearchLocationsByIDs error: {0}", errorString);
            }
        }
        /// <summary>
        /// Get the address book contacts
        /// </summary>
        public void GetAddressBookContacts()
        {
            // Create the manager with the api key
            var route4Me = new Route4MeManager(ActualApiKey);

            var addressBookParameters = new AddressBookParameters()
            {
                Limit  = 10,
                Offset = 0
            };

            // Run the query
            AddressBookContact[] contacts = route4Me.GetAddressBookLocation(
                addressBookParameters,
                out uint total,
                out string errorString);

            PrintExampleContact(contacts, total, errorString);
        }
Exemple #6
0
        /// <summary>
        /// Search Locations By IDs
        /// </summary>
        public void SearchLocationsByIDs()
        {
            // Create the manager with the api key
            var route4Me = new Route4MeManager(ActualApiKey);

            CreateTestContacts();

            var addressBookParameters = new AddressBookParameters
            {
                AddressId = contact1.address_id + "," + contact2.address_id
            };

            // Run the query

            AddressBookContact[] contacts = route4Me.GetAddressBookLocation(
                addressBookParameters,
                out uint total,
                out string errorString);

            PrintExampleContact(contacts, total, errorString);

            RemoveTestContacts();
        }