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

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


    public void testGetPhotos() {
        long uid = 432801017;
        String pids = "5369950424,5369843615";
        String password = "123";
        JSONArray photos = this.getRenrenApiClient().getPhotoService()
            .getPhotos(uid, pids, password,new AccessToken(this.getAccessToken()));
        Assert.assertEquals(2, photos.size());
    }
View Full Code Here


        long uid=432801017;
        long aid=544843441;
        int page=1;
        int count=1;
        String password="123";
        JSONArray photos=this.getRenrenApiClient().getPhotoService().getPhotos(uid, aid, page, count, password,new AccessToken(this.getAccessToken()));
        Assert.assertEquals(1, photos.size());
    }
View Full Code Here

        int type=0;
        long uid=258707479;
        long pid=5361181884L;
        String content="测试评论"+new Date();
        long rid=0;
        int res=this.getRenrenApiClient().getPhotoService().addComment(uid, pid, content, rid, type, PhotoService.IS_PHOTO,new AccessToken(this.getAccessToken()));
        Assert.assertEquals(res, 1);
    }
View Full Code Here

    public void testGetComments(){
        long uid=258707479;
        long pid=5361181884L;
        int count=1;
        int page=1;
        JSONArray comments=this.getRenrenApiClient().getPhotoService().getComments(uid, pid, page, count, PhotoService.IS_PHOTO,new AccessToken(this.getAccessToken()));
        System.out.println(comments.get(0));
        Assert.assertEquals(1, comments.size());
    }
View Full Code Here

    @Test
    public void testAddTagById(){
        long owner_id=432801017;
        long photo_id=5369950424L;
        long tagged_user_id=258707479;
        JSONObject json=this.getRenrenApiClient().getPhotoService().addTag(photo_id, owner_id, 600, 670, 5, 5, 590, 660, tagged_user_id,new AccessToken(this.getAccessToken()));
        long res=(Long)((JSONObject)json.get("tag")).get("id");
        System.out.println(res);
        Assert.assertTrue(res>0);
    }
View Full Code Here

    @Test
    public void testAddTagByName(){
        long owner_id=432801017;
        long photo_id=5369950424L;
        String tagged_user_name="测试";
        JSONObject json=this.getRenrenApiClient().getPhotoService().addTag(photo_id, owner_id, 600, 670, 20, 50, 100, 100, tagged_user_name,new AccessToken(this.getAccessToken()));
        long res=(Long)((JSONObject)json.get("tag")).get("id");
        System.out.println(res);
        Assert.assertTrue(res>0);
    }
View Full Code Here

    public void testGetTag(){
        long owner_id=432801017;
        long photo_id=5369950424L;
        int page=2;
        int count=10;
        JSONObject json=this.getRenrenApiClient().getPhotoService().getTags(photo_id, owner_id, page, count,new AccessToken(this.getAccessToken()));
        long total=(Long)json.get("count");
        System.out.println(total);
        Assert.assertTrue(total>0);
    }
View Full Code Here

*/
public class AdminServiceTest extends AbstractServiceTest {

    @Test
    public void getAllocation() {
        JSONObject obj = this.getRenrenApiClient().getAdminService().getAllocation(new AccessToken(this.getAccessToken()));
        int i = Integer.parseInt(obj.get("notifications_per_day").toString());
        Assert.assertTrue(i > -1);
        i = Integer.parseInt(obj.get("requests_per_day").toString());
        Assert.assertTrue(i > -1);
    }
View Full Code Here

    @Test
    public void testGetStatuses(){
        int uid=0;
        int page=1;
        int count=1;
        JSONArray statuses=this.getRenrenApiClient().getStatusService().getStatuses(uid, page, count,new AccessToken(this.getAccessToken()));
        Assert.assertEquals(1,statuses.size());
    }
View Full Code Here

   
    @Test
    public void testGetStatus(){
        long userid=432801017L;
        long statusId=2844895649L;
        JSONObject status=this.getRenrenApiClient().getStatusService().getStatus(userid, statusId,new AccessToken(this.getAccessToken()));
        long uid=(Long) status.get("uid");
        System.out.println(status.get("status_id"));
        Assert.assertEquals(uid,userid);
    }
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.