Package com.renren.api.client.param.impl

Examples of com.renren.api.client.param.impl.AccessToken


   
    @Test
    public void testAddBlog(){
        String title="测试日志";
        String content="这是一篇测试的日志";
        int res=this.getRenrenApiClient().getBlogService().addBlog(title, content,new AccessToken(this.getAccessToken()));
        System.out.println(res);
        Assert.assertTrue(res>0);
    }
View Full Code Here


        long blogid=790501086L;
        long uid=432801017L;
        int comment=0;
        String password="";
       
        JSONObject json=this.getRenrenApiClient().getBlogService().getBlog(uid, blogid, comment, password, BlogService.BLOG_FOR_USER,new AccessToken(this.getAccessToken()));
        long id=(Long) json.get("id");
        Assert.assertEquals(blogid, id);
    }
View Full Code Here

    @Test
    public void testGetBlogs(){
        long uid=432801017L;
        int page=1;
        int count=1;
        JSONObject blogs=this.getRenrenApiClient().getBlogService().getBlogs(uid, page, count, BlogService.BLOG_FOR_USER,new AccessToken(this.getAccessToken()));
        long user_id=Long.parseLong((String) blogs.get("uid"));
        Assert.assertEquals(user_id, uid);
    }
View Full Code Here

        long id=790501086L;
        long uid=432801017L;
        String content="测试评论";
        long rid=0;
        int type=0;
        int res=this.getRenrenApiClient().getBlogService().addComment(id, uid, content, rid, type, BlogService.BLOG_FOR_USER,new AccessToken(this.getAccessToken()));
        Assert.assertEquals(1, res);
    }
View Full Code Here

    public void testGetComments(){
        long id=790501086L;
        long uid=432801017L;
        int page=1;
        int count=1;
        JSONArray comments=this.getRenrenApiClient().getBlogService().getComments(uid, id, page, count,0, BlogService.BLOG_FOR_USER,new AccessToken(this.getAccessToken()));
        System.out.println(comments.get(0));
        Assert.assertEquals(1, comments.size());
    }
View Full Code Here

    public void testGetFeed(){
        String type="10";
        long uid=0;
        int page=1;
        int count=10;
        JSONArray feeds=this.getRenrenApiClient().getFeedService().getFeed(type, uid, page, count,new AccessToken(this.getAccessToken()));
        System.out.println(feeds);
        Assert.assertTrue(feeds.size()>0);
    }
View Full Code Here

        String image="http://www.huohu123.com/static/nav/images/firefox-logo_v2.png";
        String caption="测试新鲜事的CAPTION";
        String action_name="新鲜事动作模块文案";
        String action_link="http://wiki.dev.renren.com/wiki/SDK";
        String message="用户自定义的内容 这条新鲜事发布的时间是"+new Date().toString();
        JSONObject res=this.getRenrenApiClient().getFeedService().publicFeed(name, description, url, image, caption, action_name, action_link, message,new AccessToken(this.getAccessToken()));
        Assert.assertTrue((Long)res.get("post_id")>0);
    }
View Full Code Here

    public void testUploadURLImg() {
        long albumId = 544843441;
        String fileName = "http://tx.bdimg.com/sys/portraitn/item/b858696d716970616e940d.jpg";
        String desc = "renren by " + new Date() + " url image";
        JSONObject ret = this.getRenrenApiClient().getPhotoService()
            .uploadURLImg(albumId, fileName, desc,new AccessToken(this.getAccessToken()));
        System.out.println("photo:" + ret);
        Assert.assertEquals(albumId, ret.get("aid"));
    }
View Full Code Here

    public void testUploadLocalImg() {
        long albumId = 544843441;
        String fileName = "D:\\test.jpg";
        String desc = "开放平台 javaSDK 测试" + new Date() + " local image";
        JSONObject ret = this.getRenrenApiClient().getPhotoService()
            .uploadLocalImg(albumId, fileName, desc,new AccessToken(this.getAccessToken()));
        System.out.println("photo:" + ret);
        Assert.assertEquals(albumId, ret.get("aid"));
    }
View Full Code Here

        long uid = 432801017;
        int page = 1;
        int count = 10;
        String aids = "";
        JSONArray albums = this.getRenrenApiClient().getPhotoService()
            .getAlbums(uid, page, count, aids,new AccessToken(this.getAccessToken()));
        System.out.println(albums.size());
        Assert.assertTrue(albums.size() > -1);
    }
View Full Code Here

TOP

Related Classes of com.renren.api.client.param.impl.AccessToken

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.