Package info.bliki.api

Examples of info.bliki.api.User


    super(name);
  }

  protected User getAnonymousUser() {
    // no username and password
    return new User("", "", DEFAULT_MEDIA_WIKI_API_URL);
  }
View Full Code Here


   *
   * @return
   * @see ParseTest#testParseRegisteredQuery()
   */
  protected User getRegisteredUser() {
    return new User(DEFAULT_USER, DEFAULT_PASSWORD, DEFAULT_MEDIA_WIKI_API_URL);
  }
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 void testWikipediaText(String rawWikiText, String title, String apiLink, Locale locale) {
    String[] listOfTitleStrings = { title };
    String titleURL = Encoder.encodeTitleLocalUrl(title);
    User user = new User("", "", apiLink);
    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

   *         is set in the wiki text; <code>null</code> otherwise
   */
  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

    assertEquals("action=parse&amp;format=xml&amp;text={{Project:Sandbox}}&amp;title=A Sandbox Template test", request.toString());
  }

  public void testParseQuery() {

    User user = getAnonymousUser();
    Connector connector = new Connector();
    user = connector.login(user);
    System.out.println(user.getToken());
    RequestBuilder request = Parse.create().page("Main Page");
    ParseData parseData = connector.parse(user, request);
    assertNotNull(parseData);
    assertNotNull(parseData.getText());
    String html = StringEscapeUtils.unescapeHtml(parseData.getText());
View Full Code Here

* Tests edit query.
*/
public class EditTest extends BaseQueryTest {

    public void testSmokeTest() {
        User user = getAnonymousUser();
        Connector connector = new Connector();
        connector.login(user);

        try {
            // there is no rights to do this action. The error must be received.
View Full Code Here

        super(name);
    }

    protected User getAnonymousUser() {
        // no username and password
        return new User("", "", DEFAULT_MEDIA_WIKI_API_URL);
    }
View Full Code Here

  }

  public static void testWikipediaText(String rawWikiText, String title, Locale locale) {
    String[] listOfTitleStrings = { title };
    String titleURL = Encoder.encodeTitleLocalUrl(title);
    User user = new User("", "", null);
    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

TOP

Related Classes of info.bliki.api.User

Copyright © 2018 www.massapicom. 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.