Package net.easymodo.asagi.model.yotsuba

Examples of net.easymodo.asagi.model.yotsuba.PageJson


    public Page getPage(int pageNum, String lastMod) throws ContentGetException, ContentParseException {
        String[] wgetReply = this.wgetText(this.linkPage(pageNum), lastMod);
        String pageText = wgetReply[0];
        String newLastMod = wgetReply[1];

        PageJson pageJson;
        try {
            pageJson = GSON.fromJson(pageText, PageJson.class);
        } catch(JsonSyntaxException ex) {
            throw new ContentGetException("API returned invalid JSON", ex);
        }

        Page p = new Page(pageNum);
        Topic t = null;

        for(TopicJson tj : pageJson.getThreads()) {
            for(PostJson pj : tj.getPosts()) {
                if(pj.getResto() == 0) {
                    t = this.makeThreadFromJson(pj);
                    p.addThread(t);
                } else {
View Full Code Here

TOP

Related Classes of net.easymodo.asagi.model.yotsuba.PageJson

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.