Package info.bliki.api.query

Examples of info.bliki.api.query.RequestBuilder


  public static void main(String[] args) {
    User user = new User("", "", "http://en.wikipedia.org/w/api.php");
    Connector connector = new Connector();
    user = connector.login(user);

    RequestBuilder request = OpenSearch.create().search("test").format("json");
    String jsonResponse = connector.sendXML(user, request);
    System.out.println(jsonResponse);
  }
View Full Code Here


  public QueryTest(String name) {
    super(name);
  }

  public void test001() {
    RequestBuilder request = Query.create().titles("Main Page", "API");
    assertEquals("action=query&format=xml&titles=Main Page|API", request.toString());
  }
View Full Code Here

    RequestBuilder request = Query.create().titles("Main Page", "API");
    assertEquals("action=query&format=xml&titles=Main Page|API", request.toString());
  }

  public void test002() {
    RequestBuilder request = Query.create().list("allpages").apfrom("Java").aplimit(20).format("json");
    assertEquals("action=query&apfrom=20&format=json&list=allpages", request.toString());
  }
View Full Code Here

TOP

Related Classes of info.bliki.api.query.RequestBuilder

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.