Package info.bliki.api

Examples of info.bliki.api.User.login()


  public static void testWikipediaENAPI(String title) {
    String[] listOfTitleStrings = { title };
    String titleURL = Encoder.encodeTitleLocalUrl(title);
    User user = new User("", "", "http://en.wikipedia.org/w/api.php");
    user.login();
    String mainDirectory = "c:/temp/";
    // the following subdirectory should not exist if you would like to create a
    // new database
    String databaseSubdirectory = "WikiDB";
    // the following directory must exist for image downloads
View Full Code Here


   */
  public static String testWikipediaENAPI(String title, String apiLink, Locale locale) {
    String[] listOfTitleStrings = { title };
    String titleURL = Encoder.encodeTitleLocalUrl(title);
    User user = new User("", "", apiLink);
    user.login();
    String mainDirectory = "c:/temp/";
    // the following subdirectory should not exist if you would like to create a
    // new database
    String databaseSubdirectory = "WikiDB";
    // the following directory must exist for image downloads
View Full Code Here

  public static void testWikipediaENAPI(String title, String apiLink, Locale locale) {
    String[] listOfTitleStrings = { title };
    String titleURL = Encoder.encodeTitleLocalUrl(title);
    User user = new User("", "", apiLink);
    user.login();
    String mainDirectory = "c:/temp/";
    // the following subdirectory should not exist if you would like to create a
    // new database
    String databaseSubdirectory = "WikiDB";
    // the following directory must exist for image downloads
View Full Code Here

  public static void testWikipediaENAPI(String title) {
    String[] listOfTitleStrings = { title };
    String titleURL = Encoder.encodeTitleLocalUrl(title);
    User user = new User("", "", "http://en.wikipedia.org/w/api.php");
    user.login();
    String mainDirectory = "c:/temp/";
    // the following subdirectory should not exist if you would like to create a
    // new database
    String databaseSubdirectory = "WikiDB";
    // the following directory must exist for image downloads
View Full Code Here

   */
  public static String testWikipediaENAPI(String title, String apiLink, Locale locale) {
    String[] listOfTitleStrings = { title };
    String titleURL = Encoder.encodeTitleLocalUrl(title);
    User user = new User("", "", apiLink);
    user.login();
    String mainDirectory = "c:/temp/";
    // the following subdirectory should not exist if you would like to create a
    // new database
    String databaseSubdirectory = "WikiDB";
    // the following directory must exist for image downloads
View Full Code Here

  public static void testWikipediaENAPI(String title, String apiLink) {
    String[] listOfTitleStrings = { title };
    String titleURL = Encoder.encodeTitleLocalUrl(title);
    User user = new User("", "", apiLink);
    user.login();
    String mainDirectory = "c:/temp/";
    // the following subdirectory should not exist if you would like to create a
    // new database
    String databaseSubdirectory = "WikiDB";
    // the following directory must exist for image downloads
View Full Code Here

  public static void testWikipediaENAPI(String title, String apiLink) {
    String[] listOfTitleStrings = { title };
    String titleURL = Encoder.encodeTitleLocalUrl(title);
    User user = new User("", "", apiLink);
    user.login();
    String mainDirectory = "c:/temp/";
    // the following subdirectory should not exist if you would like to create a
    // new database
    String databaseSubdirectory = "WikiDB";
    // the following directory must exist for image downloads
View Full Code Here

   */
  public static String testWikipediaENAPI(String title, String apiLink, Locale locale) {
    String[] listOfTitleStrings = { title };
    String titleURL = Encoder.encodeTitleLocalUrl(title);
    User user = new User("", "", apiLink);
    user.login();
    String mainDirectory = "c:/temp/";
    // the following subdirectory should not exist if you would like to create a
    // new database
    String databaseSubdirectory = "WikiDB";
    // the following directory must exist for image downloads
View Full Code Here

  private static void testWikipediaENAPI(String title) {
    String[] listOfTitleStrings = { title };
    String titleURL = Encoder.encodeTitleLocalUrl(title);
    User user = new User("", "", "http://en.wikipedia.org/w/api.php");
    user.login();
    WikiDB db = null;
    String mainDirectory = "c:/temp/";
    // the following subdirectory should not exist if you would like to create a
    // new database
    String databaseSubdirectory = "WikiDB";
View Full Code Here

    String articleAddress = "http://en.wikipedia.org/w/api.php?action=query&titles=" + Encoder.encodeTitleToUrl(title, true)
        + "&prop=revisions&rvprop=content&format=xml";
    String articleWikiContent = loadRAWContent(articleAddress);

    User wikiUser = new User("", "", "http://en.wikipedia.org/w/api.php");
    wikiUser.login();

    // set up a simple cache for this example. HashMap is not usable for
    // production! Use something like http://ehcache.org for production!
    Map<String, String> contentCache = new HashMap<String, String>(2000);
    APIWikiModelInMemory wikiModel = new APIWikiModelInMemory(wikiUser, Locale.ENGLISH, "${image}", "${title}", contentCache);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.