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

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


    @Test
    public void testGetFriendIds() {
        int page = 1;
        int count = 10;
        List<Integer> friendIds = this.getRenrenApiClient().getFriendsService().getFriendIds(page,
                count,new AccessToken(this.getAccessToken()));
        Assert.assertTrue(friendIds.size() > 0);
    }
View Full Code Here


    @Test
    public void testGetFriends() {
        int page = 1;
        int count = 10;
        JSONArray friends = this.getRenrenApiClient().getFriendsService().getFriends(page, count,new AccessToken(this.getAccessToken()));
        Assert.assertTrue(friends.size() > 0);
    }
View Full Code Here

    }

    @Test
    public void testGetAppFriends() {
        String fields = "name,tinyurl";
        JSONArray friends = this.getRenrenApiClient().getFriendsService().getAppUsers(fields,new AccessToken(this.getAccessToken()));
        Assert.assertTrue(friends.size() > 0);
    }
View Full Code Here

   
    @Test
    public void testGetSameFriends(){
        long uid1=328150390;
        long uid2=258707479;
        JSONObject json=this.getRenrenApiClient().getFriendsService().getSameFriends(uid1, uid2,new AccessToken(this.getAccessToken()));
        JSONArray friends=(JSONArray) json.get("friends");
        System.out.println(friends.size());
        Assert.assertTrue(friends.size()>0);
    }
View Full Code Here

        String name="宝";
        long uid=0;
        String email="";
        int page=1;
        int count=10;
        JSONObject json=this.getRenrenApiClient().getFriendsService().searchFriends(name, uid, email, page, count, "",new AccessToken(this.getAccessToken()));
        long total=(Long)json.get("total");
        System.out.println(total);
        Assert.assertTrue(total>-1);
    }
View Full Code Here

    @Test
    public void testGetInfo() {
        String userIds = "226009681,252090984,252089313";
        String fields = "name,email_hash, sex,star,birthday,tinyurl,headurl,mainurl,hometown_location,hs_history,university_history,work_history,contact_info";
        JSONArray users = this.getRenrenApiClient().getUserService().getInfo(userIds, fields,new AccessToken(this.getAccessToken()));
        JSONObject u = JsonUtils.getIndexJSONObject(users, 0);
        String name = JsonUtils.getValue(u, "name", String.class);
        Assert.assertNotNull(name);
        Assert.assertEquals(3, users.size());
    }
View Full Code Here

    }

    @Test
    public void testHasAppPermission() {
        String extPerm = "emial";
        boolean b = this.getRenrenApiClient().getUserService().hasAppPermission(extPerm, 0,new AccessToken(this.getAccessToken()));
        Assert.assertFalse(b);
    }
View Full Code Here

        Assert.assertFalse(b);
    }

    @Test
    public void testGetLoggedInUser() {
        int userId = this.getRenrenApiClient().getUserService().getLoggedInUser(new AccessToken(this.getAccessToken()));
        Assert.assertTrue(userId > 0);
    }
View Full Code Here

    @Test
    public void testSend() {
        String toIds = "432801017";
        String notification = "hello,<xn:name uid=\"258707480\" linked=\"true\"/>";
        int i = this.getRenrenApiClient().getNotificationsService().send(toIds, notification,new AccessToken(this.getAccessToken()));
        Assert.assertEquals(1, i);
    }
View Full Code Here


    @Test
    public void testCreateLink() {
        String link = this.getRenrenApiClient().getInvitationsService().createLink(
                InvitationsService.DOMAIN_RENREN,new AccessToken(this.getAccessToken()));
        Assert.assertTrue(link.indexOf("renren") > -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.