不幸的是,我还没有找到任何例子,但它应该是这样的
var service = new PeopleService (new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = "APP_NAME",
});
Person contactToCreate = new Person();
List<Name> names = new List<Name>();
names.Add(new Name() {GivenName = "John", FamilyName = "Doe"});
contactToCreate.Names = names;
Google.Apis.PeopleService.v1.PeopleResource.CreateContactRequest request =
new Google.Apis.PeopleService.v1.PeopleResource.CreateContactRequest(service, contactToCreate);
Person createdContact = request.Execute();
您可以在此处找到更多信息:类参考。但这有点不清楚。