Nikki wrote:
> Hi there.
> I'm creating contacts with the api wrapped with .Net, that works fine
> for me now.
> But it appears I have to add nicknames for contacts as well.
> Actually I found the following possibility in the reference:
> <gContact:nickname>Dragon</gContact:nickname>
> But I don't know exactly how to provide it with .Net library using
> Google.GData.Contacts.ContactEntry :(
> Might be ContactEntry.Extensions or so?
> Does anyone have a good piece of code for example?
>
I did it this way, then we found that in the address book, both the
'real' name and the nickname show up. We didn't want to confuse our Dear
Users, so we didn't do it after all. But this code worked before I
commented it out:


     static AppsService          sckGAPI; // Admin connection to Google
     sckGAPI = new AppsService(<domain name>,
                               <admin user> + "@" + <domain name>,
                               <admin password>);


//    private void SetNick(string u, string n)
//    //
//    // string u - The user we're dealing with.
//    // string n - the nickname to set.
//    //
//    {
//      try
//      {
//        sckGAPI.CreateNickname(u, n);
//      }
//      catch (Exception x)
//      {
//        HandleFailure(x.Message);
//      }
//
//    return;
//    }


HTH

-- 
Andre -- Yes, there _are_ stupid questions.

--~--~---------~--~----~------------~-------~--~----~
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