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.
Related
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
I've spent so many time trying to find a good Open Source tool to integrate webservices with c/c++.
GSOAP: I cant use it because the license, if you use its tool to generate code by the WSDL, GPL license is not avaiable.
WWSAPI: Appart that is only for Windows, if you read documentation carefully, when you need the redistributables, you have to mail to a Microsoft email, so, I think I should have to pay too.
Axis2C: Project is not maintained (at all) and if you want to use the wsdl to code tool, you are going to get into a lot of memory leaks.
Reading other posts here, someone was speaking about axis2c but using SVC Client API instead of generating code tool. I am using it, and it works, but my question is, it is worth to use SVC Client API, instead of developing your own socket setting the envelope before the xml? I'm not an SOAP expert, could SVC Client API save me time? Its AXIS2c with SVC Client API hiding me more WebServices concepts that I should implement if I make manually?
Thanks in advance!
I have a requirement where I have to implement a timer based application which will periodically call a rest web service implemented in asp.net MVC 3 and store the response JSON data in a SQL Lite database. It will also have to implement a http web client to download media files of huge size which will need decompression. This component has to be written using C++.
Would need some help in isolating the logical task breakdown for this component. Typically a list of items like:
POC to isolate an open source C++ web service communication library
POC to isolate an open source C++ JSON framework
POC to isolate an open source C++ Zlib packages
Also if somebody can provide some good suggestions around some stable and flexible open source libraries in C++ for
Web Service communication
JSON parsing
SQL Lite adapter
Some other lightweight database alternative to SQL Lite
HTTP based downloader. Possibly implementing multithreaded and multipart download
Decompression library
Performance is a primary concern for the application. can somebody suggest designs around implementing faster downloads of huge media files over HTTP.
Facebook Folly provides JSON services, amongst other utilities.
Although not Open Source, Microsoft's Casablanca library
provides Web Client functions.
How do you use cloud storage such as Dropbox in your C++ Apllication ? I've checked out their API and they only have Java, Python, and Ruby options. If you cant use dropbox with a c++ app, is therte any cloud storage provider that has an API for C++.
The drop box APIs seem to be wrappers for a http interface.
So if you want to hit them up from C++ you can use a http supporting library like libcurl to access stuff using the REST api
Droper is an open source C++/Qt Dropbox client that I have recently wrote. It can be compiled for Windows and Linux, but the GUI is optimized for Symbian mobile phones. Check it out.
I've found several differnet APIs on their website, righ under the place you propably found the ruby / pathon stuff..
http://sharpbox.codeplex.com/
http://github.com/dkarzon/DropNet
Not sure if this is, wha you were looking for..
I have a library/API that is completely built with C/C++ for over 10 years (under Linux). Now I want to export the API as a web service for other web projects use. I search for the web and narrow down to the following 3 chooses:
use SWIG to export the API to PHP or other script/web base language
use gSOAP to export the API as SOAP protocol
export the API as RESTful service (I can't find any exist framework, any suggestions?)
I want to compare them in terms of
stability
easy of use
performance
SWIG seems easy to use buy I am not sure the stability of it.
gSOAP seems very stable but a bit difficult to use and setup.
Any suggestion?
I personally used WSO2-WSF-CPP which is a C++ layer on top of AXIS2/2 to export legacy C++ code as web-service.
I tried back then gSOAP which worked quite well, but for stability and deployment reasons I choose WSO2, since AXIS2/C can be deployed easily as a module of the well know Apache2 HTTP server.
For the ease of use requirement I don't know if you plan to take WSDL file as a template to generate source code skeleton, but you can forget about this feature of the WSO2 package ... It seems to have been deprecated for a long time and the generated code is way too ugly to be maintained by hand.
Although doing a code generator yourself could be a good idea depending on the complexity and the amount of services you have. I recommend it! I did that and creating/building/generating services is quite straightforward now.
Another thing to notice about the WSO2 web services is that it's simple to build out of the box, and comes with stand-alone server to develop and test with. It was quite helpful (even if I am quite sure any decent web-service platform provides this kind of stuff like gSOAP does).