Skip to content

About

Java API for Twingly Analytics

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

18 Commits

Folders and files

Repository files navigation

twingly-analytics-api-java

Java API for Twingly Analytics

To use the API you need an API key. To obtain an API key, send an email to [email protected]

Example usage

 Query q = new Query(yourApiKey);                // create a request object using your api key
 q.setDocumentLang("en");                        // only search for posts in english
 Result result = q.makeRequest("spotify");       // find posts containing the word spotify
 for (Post p : result.getPosts())
     System.out.println(p.getUrl());             // print the url for each post

Later you can repeat the search for any new posts that have come in since your last request:

 q.setStartTime(result.getNewestPost());         // only search for posts newer than the last result
 result = q.makeRequest("spotify");              // request new posts containing the word spotify

A Query object can be reused for several requests

About

Java API for Twingly Analytics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors