Package info.bliki.api

Examples of info.bliki.api.Connector


  }

  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());
    System.out.println("Retrieved html text:\n" + html);
  }
View Full Code Here


*/
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.
            connector.edit(user, Edit.create().title("MainTestTest").text("blabla"));
            fail("UnexpectedAnswerException must be thrown");
        } catch (UnexpectedAnswerException e) {
            // ok
        }
    }
View Full Code Here

  }

  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());
    // System.out.println("Retrieved html text:\n" + html);
  }
View Full Code Here

        Matcher matcher = MATCH_WIKI_SITE_BASE.matcher(fullBaseUrl);
        if (matcher.matches()) {
            baseUrl = matcher.group(1);
        }
        User user = new User("", "", baseUrl + "/w/api.php");
        Connector connector = new Connector();
        user = connector.login(user);

        // set image width thumb size to 200px
        List<info.bliki.api.Page> pages = user.queryImageinfo(new String[] { image }, 200);
        if (pages.size() == 1) {
            info.bliki.api.Page imagePage = pages.get(0);
View Full Code Here

TOP

Related Classes of info.bliki.api.Connector

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.