how to batch create contact with Google peopleservice dotnet library - google-people-api

The question is in the title.
I'm switching the google contact apis (that are being deprecated) to people api.
I can't find a way to batch the creation of contacts using the dotnet library in c#.
I'm currently using the nugetpackage Google.Apis.PeopleService.v1 version 1.50.0.2252
The library does not contact a batch creation method. However the documentation contains a batch rest api.
PeopleResource.CreateContactRequest request = new PeopleResource.CreateContactRequest(_peopleService, contactToCreate);
Person createdContact = request.Execute();
I can of course call the rest endpoint directly but I would prefer to go through the dotnet library provided by Google.
Any reason for this endpoint not beoing exposed by the dotnet library?

It seems that they are working on it.
You can find the BatchCreateContacts on the latest update from github
google-api-dotnet-client

Related

AWS Step Functions Graph Export API

With regards to the AWS Step Functions graph, is there a way to export/download it programmatically?
I want to automate the downloading of the image below.
I'm posting this feedback incase someone else runs into a similar issue. I decided to extract the Step Functions graph related code from the AWS Toolkit for Visual Studio Code and create a small react library to embed in a web page.
Here is the link to my library #tshepomgaga/aws-sfn-graph.
With this library in-hand, I can set up a small web app to load the AWS States Language JSON from a server and render the graph on a page.
Using a library like Puppeteer I can run a headless automation to download the graph image from the web app.
That is my solution in a nutshell but I would have preferred to call an API from AWS to download the image.
You can use AWS Toolkit for Visual Studio Code and the state machine will render right in your IDE.
State machine graph visualization

Where are the Google Admin SDK libraries?

I would like to work with the Google Admin SDK and get information about our domain's email settings per user. I refer to Developer's Guide | Email Settings API
I am comfortable approaching the problem in Java, Python, and C# and all three languages have examples included in the documentation.
Where can I get all these libraries shown in the documentation?
C#
using Google.GData.Apps;
using Google.GData.Apps.GoogleMailSettings;
using Google.GData.Client;
using Google.GData.Extensions;
Java
import sample.appsforyourdomain.gmailsettings.GmailSettingsService;
Python
import gdata.apps.emailsettings.client
They are located here:
https://developers.google.com/admin-sdk/directory/v1/libraries
If you work through the Java QuickStart, these three imports aren't included and the provided quick start code won't compile.
import com.google.api.services.admin.directory.DirectoryScopes;
import com.google.api.services.admin.directory.model.*;
import com.google.api.services.admin.directory.Directory;
It seems the Java portion of this project is in need of an update.
Note the Maven and Gradle builds on the Java download page - https://developers.google.com/api-client-library/java/apis/admin/directory_v1 - show this error message:
This library is in the process of uploading to the central Maven repository. Please check back in a few hours.
I've seen that message there for a couple months now.
There are basically 2 kinds of APIs for Google Apps. The old style "GData" Atom based APIs and the new API Discovery Service compliant "Google APIs" (modern infra).
The Email Settings API is an old style GData API so you need the GData API client libraries.
The GData API client libraries are available for download from here:
https://developers.google.com/gdata/docs/client-libraries

Google API CPP Client - Using Service Account

Does the Google API CPP Client Library support Authorization using Service Account?
I could not find an example of how to use the Service Account when using the CPP Client library from https://github.com/google/google-api-cpp-client/
The sample available only demonstrate using Client Secret for installed application
flow_.reset(OAuth2AuthorizationFlow::MakeFlowFromClientSecretsPath( client_secrets_file, config_->NewDefaultTransportOrDie(), &status));
I've spend quite some time figuring this out. The harsh answer is no.
Compared to the Python or PHP version of this library, the CPP version is pretty much outdated.
A quick solution might be to fetch the required data from Google and write the result to a file using the Python client libraries. I.e. with std::system(). Then parse the file from your C++ application.

How to programatically create a Facebook application via JS SDK or Open Graph API? (createApplication)

I know there are currently two methods that can be used to do this, documented (poorly) on Facebook's Developer site:
The old (depreciated) JavaScript SDK FB.Connect.createApplication
A new FBJS method Facebook.createApplication (only for use on Canvas pages)
The problem is that I not using a Canvas app that runs FBJS, and I am not using the OLD JS SKD. I am trying to do this on a regular old PHP website that uses the current JavaScript SDK and the PHP SDK.
I am doing the usual Open Graph API calls and such with the current SDK, so I understand the basics, I'm just not sure how to proceed to use the OLD SDK, or if (fingers crossed) I even really have to?
So, is there a way to make new Facebook Apps with the current JS SDK? Or with a server side PHP SDK call to the Graph?
And if not, how do I call the old SDK to do this?
Thanks
UPDATE: You still can't do this, but there is an official bug in the Facebook tracker about it: http://developers.facebook.com/bugs/295627350461318
There isn't outside of the OLD SDK as you indicated. It's been removed (what Facebook calls "deprecated"). I put in a feature request recently for them to add it back into the API:
Me:
The Facebook Developer tool is
considerably lacking in features. We'd
like to be able to create a third
party application that adds layers of
functionality to the developer
application, but we'd need to be able
to create and administer applications
via the Graph API.
The Graph API supports querying for
information on existing applications.
To create, administer or delete
applications developers must go to the
Developer Application.
Them:
------- Comment #1 From Jeff Bowen 2010-12-07 16:59:12 (-) [reply]
------- Thanks for the request. We’ll track this on our wishlist

Consuming a web service with the Netbeans Platform

I have an application that is written with the NetBeans Platform 5.5. I'm having trouble consuming a web service.
If I create a Java SE application in NetBeans, I can add a web service reference without problem.
Since my application is using the NetBeans Platform, many of the menu choices change. So, I cannot figure out how to add a reference to the web service. I've googled this topic a number of ways but haven't found any pages that deal with consuming a service through the platform. They all talk about consuming a service with a Java SE application.
Changing the application from the Platform architecture is not an option.
Here is a good tutorial for setting up a Feed Reader on NetBeans Platform. It covers some of the configuration issues for using web services
Blog with an entry about making a web services client
I'd be happy to try and give you a more specific answer if you can give information about the service you want to access.
Found this:
Create web service and client using this tutorial
Create library wrapper module for web service client (you don't need to include JAX-WS libs, only your client jar)
In your wrapper module add following dependencies (important):
JAX-WS 2.1 API
JAX-WS 2.1 and JAXB 2.1 Library (for this you have to check Show Non-API Modules in "Add Module Dependency" window)
If you try to build module after these steps it will fail telling you that your module is not friend of "path-to-netbeans"/java2/modules/org-netbeans-modules-websvc-jaxws21.jar.
Right click on JAX-WS 2.1 and JAXB 2.1 Library and choose Edit. Select Implementation Version.
from here.