Here is the code to retrieve the contact list that is only emails ...
i really dont know how to return the first name or full of the emails
retrieve..


  public static void printDateMinQueryResults(ContactsService myService) {
        try {
            System.out.println("ddqq");
            // Create query and submit a request
            // URL feedUrl1 = new
            // URL("
http://www.google.com/m8/feeds/contacts/[email protected]/full";);
            URL feedUrl = new URL(
                    "https://www.google.com/m8/feeds/contacts/default/full
");

            Query myQuery = new Query(feedUrl);
            // myQuery.setUpdatedMin(startTime);
            myQuery.setMaxResults(999999);

            ContactFeed resultFeed = myService
                    .query(myQuery, ContactFeed.class);
            System.out.println("****" +
resultFeed.getTitle().getPlainText());
            List<ContactEntry> entry = resultFeed.getEntries();
            for (ContactEntry ce : entry) {
                Name dd = ce.getName();

                if (dd != null) {
                    System.out.println(dd.getFullName().getValue());

                }
                final List<Email> ee = ce.getEmailAddresses();
                final List<Im> mm = ce.getImAddresses();
                for (Im bl : mm) {
                    System.out.println("---> " + bl.getAddress());
                }

                for (Email ss : ee) {

                    System.out.println("==>" + ss.getAddress());
                }
            }

            // // Print the results
            // System.out.println(resultFeed.getTitle().getPlainText() +
            // " contacts updated on or after "
            // + startTime);
            // for (int i = 0; i < resultFeed.getEntries().size(); i++) {
            // ContactEntry entry = resultFeed.getEntries().get(i);
            // // We assume existence of a nameToPrintableString function
that
            // formats
            // // the Name of a contact into a string suitable for printing.
            // List<Email> ee=entry.getEmailAddresses();
            // for(Email ss : ee) {
            // System.out.println("==>"+ss.getAddress());
            // }
            // System.out.println("\t" + entry.getName());
            //
            // }
        } catch (ServiceException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

On Thu, Oct 8, 2009 at 8:21 PM, Stijn Meurkens <[email protected]> wrote:

>
> Hi,
> I can retrieve a list of all contacts by doing a signed GET for
> http://www.google.com/m8/feeds/contacts/default/full?max-results=100000
>
> Unfortunately, this list does not include email addresses. Is it
> possible to include email addresses, or do I have to fetch them one by
> one?
>
> Thanks.
> Stijn
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Contacts API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to