How to use java-google-translate-text-to-speech api? - java

I read one answer here (How to use Google Translate API in my Java application?) and started to use java-google-translate-text-to-speech api as it is free.
But when I use this api in a standalone java file, I am facing an issue : "Your client does not have permission to get URL /translate_a/t from this server. That’s all we know." HTTP Reponse Code 403-Forbidden error.
Do I need to use API key to use this api ?
Is there any sample code which uses API key ?
I am posting a question for the first time so apologies if the formatting is incorrect.
Thanks in advance !!

The official API is 20$ for 1 million characters (proportionally), so you could still consider using it as it's quite cheap.
The project you're referring to hasn't been updated in a long time, so it could just be broken due to changes by Google....
In the comments they also referenced this project, you could try using this, but I would still recommend the official API's.

Related

How can I read content from web using Java?

I never had this tough reading content from online with other language, I am developing an android app, It's need to read some JSON data from online. But I googled it and gave it a try on my own, but nothing is working as I expected
I want to read that JSON from the web, is there any good way to do that?
Please do a search on volley or ok http for android on google. (Though ok http is obsolete but volley is surely a good alternative)
Use Retrofit + GSON libraries. They can satisfy wide range of expectations and have perfect samples.

sample use cases for org.scribe.OAuthRequest.OAuthRequest(Verb verb, String url)

I am working on XeroAPI as a task given to me in my internship. i am not familiar with OAuth and i'm pretty much a newbie when it comes to programming. right now i managed to do a simple OAuth using Ashley Schroder's tutorial on Accessing Xero API for public applications using java his code is working fine and i managed to understand how it works(a little but enough to understand how to use it)
Here comes my problem, it happens that i need to use other http requests like PUT and POST. i researched for days before coming here but to no avail. i would like to know if there's someone here who can show me a thing or two on other use cases for Verb.PUT and Verb.POST
Ashley Schroder's Page for scribe oauth implentation for Xero API public application: Click Here
I would like to ask another question but i'll post it some other time.
Cheers,
You might consider using a client library that already has support for PUT requests, etc. E.g. here are two popular ones:
https://github.com/connectifier/xero-java-client
https://github.com/rossjourdain/XeroAPI-PrivateApplication-Java

Are there MSNP Implementation for Java, ActionScript (Flash) exist?

Interesting if there any Implementation of MSNP Live Messanges Protocol for Java or ActionScript (Flash)?
Here's one for ActionScript: http://code.google.com/p/as3msnp/
This seems to be the only one: http://sourceforge.net/apps/trac/java-jml
As per Microsoft new policy towards Skype MSNP12 protocol is not working.
major host of following reference are now responding
Microsoft Service host and ports
So, JML lib is now useless which work over MSNP8-15.
Here is another thread over MSNP - What's the future of MSNP
I used the below API in a chating server we were developing 4 years ago , at that time MSNP10 was working with us.You can download the API from below link and I found it very easy to getting started with this API based on the documentation and examples they have provided on their website.
http://sourceforge.net/apps/trac/java-jml/
Good Luck.

How to search in google by using java code?

How to search in google by using java code?
I would have told you to use one of their API. Unfortunatly, there does not seems to exist one for search. As a consequence, you'll have to use HtmlUnit to emulate a browser and go see their results (obviously, you can go the harder way and do some HTTP queries by yourself. But who would do that ?).
Unfortunately the SOAP API has been deprecated. But you can use the AJAX API for non-JavaScript purposes as well, see for example:
http://www.ajaxlines.com/ajax/stuff/article/using_google_is_ajax_search_api_with_java.php
Update Jul 3 2018: This link is now broken; some code from there can be found here: https://stackoverflow.com/a/1546475/55787, and I found a copy of the article here: https://blog.csdn.net/hgd250/article/details/5214702
Furthermore the orginial link to the AJAX API is now broken, too. It seems that this one is closest to the original meaning: https://developers.google.com/custom-search/json-api/v1/overview?csw=1
See also this StackOverflow question:
google java api for google search

google java api for google search

Does google provide a Java server side api **(NOT java script).**I dont want the ajax api which works at clint side.
What i want is that the result returned for a keyword should return me search result in some specific data structure.Like List or set data structure.Then i want to manipulate the result according to my need in java code.
I had used such a java server site api for youtube.
They used to but is discontinued. Most likely because you can remove their ads ;-)
From Google's terms of service
You may not send automated queries of any sort to Google's system
without express permission in advance from Google.
So, no - use their AJAX API. The SAOP API is discoutinued, but I think you should be able to use it, unless it requires a key, in which case you are tied to the AJAX API
Technically, the statement quoted above doesn't mean you can't use some sort of server-side API - there are examples of that if you google around. It means you shouldn't do it, because sooner or later you will be blacklisted (banned), as violating the terms.
What you would be looking for now is the CustomSearch API:
They used to have a different API developers could use but it has been depreciated (Nov. 2009 I think) so this is a for cost service now. I am not aware how long it might have been a free service. The new API allows 100 free searches a day, but you have to be signed up for billing else anything above 100 searches will fail, here are the details:
http://code.google.com/apis/customsearch/v1/overview.html
And sorry yes, this would still be using Java Script but you could use this:
http://www.json.org/java/
There is at least a SOAP API that I'm aware of: Google SOAP Search API
I don't think Google wants 3rd parties to use their search engine for their own services/applications. You would get "we think you are a robot" error page as a result if Google thinks you are not a real person.
You can however try Google Custom Search

Categories

Resources