I found online that I can use this URL to take a free translation from Google Translate
https://translate.googleapis.com/translate_a/single?client=gtx&sl={0}&tl={1}&dt=t&q={2}
Where {0} is the origin language, {1} is the target language and {2} is the text I want to be translated and I'm using this inside my C++ project.
With System::Net::WebClient DownloadString() method I download the file that that URL provides me.
I'd like to know if there's some kind of limitation in using this.
Can I use this URL in my code to take a translation from Google? Is there something wrong about this?
Thanks
It's an unsupported API endpoint used by the Google Translate extension for Chrome. It may disappear, stop working, or block your requests at any time and without notice.
The only supported API Google offers for their machine translation services is the Google Translate API.
As #一二三 say it`s not official supported public API same as get_video_id from YouTube.
So You have few ways for solving this problem:
Use this or other crutches like this one. And always check if it`s works today or not.
Using official PAID gTranslateAPI
Use some free API like: Yandex API Bing Translator
Related
I am using FB Graph API to get the posts and comments from a Page. Just wanted to know if there is an option to convert the comments /content of any post to required language.
No, Facebook does not offer an API for that.
I am not sure if they are still using Bing for their live translation of content, or have implemented their own system by now. (I think I remember that in the past it used to say below such translations that they were handled through Bing – but that note seems to have gone.)
But using a service such as Bing or Google is probably your best option. (Not sure if they offers APIs for that for free though.)
So I've done some digging, but came up with nothing thus far because I feel that this would be a close to impossible task. But I am more than willing to look on my own, I wanted to know if it was possible to access Google related resources using QT Creator. So For example if I wanted to use say Google analytics, what would I need to research? Would I need to have some sort of app-engine side?
Thanks!
You can access most of the Google products by using the corresponding API (AppEngine is not required for that). This link lists all available Google APIs. You can then access it using the Google API Client for C++, but the C++ binding seems to be in alpha.
Edit:
It seems that Google stopped the development and support of the C++ binding for their APIs. The library source code can still be found on Github.
I'm trying to make an autorun app with c++ that doesn't have an UI, but it will log into google drive when u plug in the USB drive. I was wondering if there was a way to do this, either by using google api, or by detecting the field forms on the login screen, and automatically filling them in. Also this is going to be strictly a private software.
Add one part How do you make a HTTP request with C++? with two parts https://developers.google.com/drive/v2/reference/.
Shake lightly. Chill and serve.
Optionally add for flavor: https://developers.google.com/drive/auth/web-server
However, I'm unable to find a c++ oath2 library. The closest thing I found was https://code.google.com/p/twitcurl/. If you find an oath library, please comment on this.
UPDATE:
POCO has a OAuth 1.0 implementation seen here: https://github.com/pocoproject/poco/tree/develop/Net/samples/TwitterClient/src
Also, according to this landmark blog post, there are still many concerns about OAuth 2.0's security. The 1.0 implementation above is what I would attempt.
For more information on OAuth 2.0, see RFC6749 and RFC6750.
How can I get Google search results from inside a program? I need to get an array of search results for a specified string.
C++ requires a little more work then other languages. You will need to connect to Google's REST Search API and then use a JSON parser to parse out the search results. Json.org has a collection of JSON parsers in various languages.
Use their javascript search API http://code.google.com/apis/ajaxsearch/
They no longer support their SOAP search api unfortunately
So... nine years later, you can no longer do that. You do get JSON, but it's quite short and just says "The Google Web Search API is no longer available. Please migrate to the Google Custom Search API (https://developers.google.com/custom-search/)"
Google Custom Search can search the entire web using the 'Thing' schema.org topic. https://support.google.com/customsearch/answer/4513886?visit_id=636769478248533420-865620074&rd=1
Google offers Ajax API for JavaScript programmers and a poor documentation for Python, PHP and Flash.By the way, If you are able to connect to remote http server with any other c++ library, you can do it. just change the url you are using and point it to: http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q={My_CPP_Query}
You will get JSON data stream, that you will be able to work with.
i remember i saw youtube tutorial on doing that, not sure about the library name but its something like _NT_SEARCH_GH:etcetcetcetcetcetc;
Does anybody know a wiki engine that can be built on top of a RESTful application?
I have a restful application, that exposes a document resource,
I want the wiki engine to use the REST API to persist the documents, instead of saving them to a DB.
I am also open for suggestions of an open-source wiki engines that can be easily modified to support such functionality.
As Wikis were originally designed to work in a standard browser, and most browsers did not support anything except GET and POST, REST is not a concept used a lot on the wiki world. However, nowadays, some wikis (foswiki - the community fork of TWiki for instance) provide you a REST API to it http://foswiki.org/System/CommandAndCGIScripts#rest ).
But you need the opposite: a wiki with a customizable backend (storage) that could be plugged on top of a REST storage service. As wikis with a pluggable backend, I know only of pmwiki http://www.pmwiki.org/wiki/PmWiki/PmWiki and foswiki (the open fork of TWiki) http://foswiki.org.
Okay, this is a puzzler. Wikis in general are more or less the canonical example of a RESTful approach. The page name names a resource. What do you want that isn't in, eg, Twiki?
While you could try to find a wiki that can use a REST backend, it may be better to write a small wiki yourself. Because even though a your backend has REST interface, that doesn't mean you can put some other application in front of it.
dokuwiki does not use a database. It is a filesystem based wiki. I don't know its internal code structure but you might be able to use it as your base.