开发者

MVC 3 and Google Contacts API

I am trying to delete contacts from my application and also from a users Google Mail contacts, which I am using a helper file for. The helper file has the following Delete method:

public static void Delete(string pGoogleUsername, string pGooglePassword, string EditUri)
    {
        RequestSettings rs = new RequestSettings("myApplication", pGoogleUsername, pGooglePassword);
      开发者_运维知识库  rs.AutoPaging = true;
        ContactsRequest cr = new ContactsRequest(rs);

        ***ContactsQuery query = new ContactsQuery();
        query.Uri = new Uri(EditUri);

        AtomFeed contacts = rs.Query(query);

        AtomEntry entry = new AtomEntry();
        entry = contacts.Entries[0];***

        entry.Delete();
    }

I feel okay about the code, apart from the code inside the stars. I get an error under the word "Query" in AtomFeed contacts = rs.Query(query);.

Any help is greatly appreciated.


See if my code here helps you get your contacts a bit better:

MVC 3 and Google Contacts API

try for instance: cr.Delete(entry); or f.Entries.First() etc inside the following loop:

foreach (Contact entry in f.Entries)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜