One Library to find them, One Library to bring them all
Java
1,054
19 commits
updated Jul 27, 2017
This is the Loklak Java API. One Library to find them, One Library to bring them all.
Loklak server scrapes data from multiple social networking websites, primarily from Twitter. The scraped data is open and can be accessed by anyone without the need of an API key!!! For more please visit http://loklak.org.
You can anonymously use the data provided by Loklak server using this library. Currently it supports the following API endpoints:
It depends on joda and json libraries which are included in android by default. If you want to use this library in an android project, you therefore have zero dependencies. If you want to use this library in any other java project, just include the jar files in the lib folder.
After successful build using maven, jar file can be found in target folder. Building
and testing in command line and different IDEs:
Using command line:
$ mvn clean package # to build
$ mvn clean compile test # to run unit-test
In eclipse:
clean package in goals. Use the created run configuration to generate the jar
file.In IntelliJ IDEA:
Its as simple as:
public class LoklakApiUse {
public static void main(String[] argv) {
String baseUrl = "https://api.loklak.org";
// API methods are generated by the library.
LoklakAPI loklakApi = APIGenerator.createApiMethods(LoklakAPI.class, baseUrl);
// using the hello API endpoint, request url: http://api.loklak.org/api/hello.json
JSONOBject helloReply = loklakApi.hello(); // use the required API endpoint with parameters
System.out.println(helloReply.toString());
// similarly search API endpoint, request url: https://api.loklak.org/api/search.json?q=fossasia
JSONObject searchReply = loklakApi.search("fossasia");
System.out.println(searchReply.toString());
}
}
298 followers · starred Dec 2017
62 followers · starred Sep 2019
136 followers · starred Feb 2018
107 followers · starred Sep 2018
One Library to find them, One Library to bring them all
Java
1,054
19 commits
updated Jul 27, 2017
This is the Loklak Java API. One Library to find them, One Library to bring them all.
Loklak server scrapes data from multiple social networking websites, primarily from Twitter. The scraped data is open and can be accessed by anyone without the need of an API key!!! For more please visit http://loklak.org.
You can anonymously use the data provided by Loklak server using this library. Currently it supports the following API endpoints:
It depends on joda and json libraries which are included in android by default. If you want to use this library in an android project, you therefore have zero dependencies. If you want to use this library in any other java project, just include the jar files in the lib folder.
After successful build using maven, jar file can be found in target folder. Building
and testing in command line and different IDEs:
Using command line:
$ mvn clean package # to build
$ mvn clean compile test # to run unit-test
In eclipse:
clean package in goals. Use the created run configuration to generate the jar
file.In IntelliJ IDEA:
Its as simple as:
public class LoklakApiUse {
public static void main(String[] argv) {
String baseUrl = "https://api.loklak.org";
// API methods are generated by the library.
LoklakAPI loklakApi = APIGenerator.createApiMethods(LoklakAPI.class, baseUrl);
// using the hello API endpoint, request url: http://api.loklak.org/api/hello.json
JSONOBject helloReply = loklakApi.hello(); // use the required API endpoint with parameters
System.out.println(helloReply.toString());
// similarly search API endpoint, request url: https://api.loklak.org/api/search.json?q=fossasia
JSONObject searchReply = loklakApi.search("fossasia");
System.out.println(searchReply.toString());
}
}
298 followers · starred Dec 2017
62 followers · starred Sep 2019
136 followers · starred Feb 2018
107 followers · starred Sep 2018