Package info.bliki.api

Examples of info.bliki.api.User


    private Result testWikipediaDEAPI(String title) throws Exception {
        return testAPI(title, "http://de.wikipedia.org/w/api.php", wikipediaDe, GERMAN);
    }

    private Result testAPI(String title, String apiLink, WikiDB db, Locale locale) throws IOException {
        User user = new User(null, null, apiLink);
        user.login();

        Path mainDirectory = Files.createTempDirectory("bliki-" + encodeTitleLocalUrl(title).replace("/", "_"));
        Path imageDirectory = mainDirectory.resolve("WikiImages");

        APIWikiModel wikiModel = new APIWikiModel(user, db,
View Full Code Here


    private static final String DEFAULT_PASSWORD = "wrong_password";


    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

        String baseUrl = "http://en.wikipedia.org";
        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);
//            System.out.println("IMG-THUMB-URL: " + imagePage.getImageThumbUrl());
//            System.out.println("IMG-URL: " + imagePage.getImageUrl());
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.