Hi I have this project that I need to use Java to access twitter api, and I found Twitter4j easy to use and tried some samples from the site. However I cannot find details regarding the Query class regarding the query strings for this object, anyone knows a comprehensive info for this one?
Cheers.
If by "query string" you mean the value in the query field, that's literally any text you can type into the search box on Twitter's website. There's no list of examples because it's so wide open. Just use whatever you happen to be thinking about at that particular instant in time.
The related JavaDoc page is where I would start (select the library version your using) + searching for 'Twitter4J query examples' in Google.
Is what you need not covered in this?: http://twitter4j.org/en/code-examples.html
Related
How can i extract email id based on the website that i have got from Place Details using Google maps API.
I want to extract the generic email id from these place details or the website. I have attached a screen shot to show what i have. I am using open Refine.I am able to parse the phone number but can't parse email id's as its not present in these place details but i can see it on the website.
Thank you in advance.
This is the code i am using -
"https://maps.googleapis.com/maps/api/place/details/json?placeid=" + cells['PlaceID'].value + "&key=AIzaSyCSp-f-_FWHw8jfNFF9yd7mgUxaX-DZo8g"
According to the google maps places API this is not something that can be returned from the API. I believe that Google does not want its API to be used as a source for spamming companies. Based on that, I can't think of any legal option that would give you this email.
The only solution that I can think of would be to get the URL attribute from google maps API result and from then scrape the page and hope that there is a way to find the email address in the HTML code, but :
I don't think that google would present it in a easily scrappable way;
I believe it would go against terms of use of Google.
So to summarize I don't think there is an easy and legal solution to your question.
Wayback machine offers an API allowing you to download information. There are actually multiple APIs and after searching for a few hours I really can't manage to do the following:
Using the wayback machine API, I am trying to get a list of all domains indexed on 06/06/15.
I have read the documentation here
https://archive.org/help/wayback_api.php
but I can't find it...
I expected something like this to work:
http://archive.org/wayback/available?url=*×tamp=20150606
It is not possible to do what you want (?url=*), by design. You're asking us to go through 36 terabytes of data to fish out a huge list; it's not a query that our query engine supports.
Here's a working example check it bellow:
http://archive.org/wayback/available?http://sourceforge.net/projects/=%27+url+%27×tamp=20131006000000
Make sure you have the correct timestamp value
These are the lines i used to generate urls. It's in python:
url = "http://sourceforge.net/projects/"+name.rstrip()
wbm_url = 'http://archive.org/wayback/available?url='+url+'×tamp=20131006000000'
Since 2013, there may be an answer on how to get the timestamps one would need in order to fetch a specific archived copy of a website. look at this link:
http://web.archive.org/cdx/search/cdx?url=archive.org&limit=5&showResumeKey=true
Explained here:
https://github.com/internetarchive/wayback/tree/master/wayback-cdx-server#advanced-usage
Then, to get confirmation this url works (using python's requests):
w = requests.get('http://archive.org/wayback/available?url=archive.org×tamp=997121112295')
Or you can fetch the HTML directly:
w2 = requests.get('http://web.archive.org/web/20040324162136/http://www.globalgiving.org:80/')
I am currently using MediaWiki's URL example to query HTTP GET requests on android.
I am simply getting information through a URL like this;
http://en.wikipedia.org/w/api.php?format=xml&action=query&titles=Main%20Page&prop=revisions&rvprop=content
However, in this example, I always need some sort of direct title and only get one result back (titles=some name here)
I know that Wikipedia has more complex search methods explained here;
http://en.wikipedia.org/wiki/Help:Searching
I would like to offer a few "previews" of multiple wikipedia article per search, since what they type might not always be what they want.
Is there any way to query these special "search" results?
Any help would be appreciated.
It looks like the MediaWiki search API may be what you're after. That particular page discusses getting previews of search results.
I have to use Google Documents List API for an Android app until I have time to migrate to Drive API.
I want to get the First and Last name of the Author of a Document that is shared with me.
Currently I'm only able to get the username of the Author using the method below.
// entry is a DocumentListEntry
String aName = entry.getAuthors().get(0).getName();
Is there a property or method I'm missing? The documentation for the Java Docs API is sparse.
Nope. the docs here don't provide a lot of leeway on this. You might be able to try and tokenize the name, but there's no inherent guarantee a given name has to be made up of >1 part, and I wouldn't recommend that course of action.
I am writing a java code.
I want to search a string on google and google images using my java code.
Previously i wasnt even able to search text and then i had to register with google and then i could do it.
Now i want to search a string against googleimages
How can i do it?
Regards
Manjot
It's pretty similar to text search, you just need to specify the URL as
http://ajax.googleapis.com/ajax/services/search/images
Standard arguments are described here, image -specific ones are here.
I agree with ChssPly76, but you have to include version number in URL as following
http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=
put q= watever you want to search for.
I hope it will help you.
Cheers.