Example #1
0
        public void crossAddFriendsTest()
        {
            String        appkey = "6be9204c30b9473e87bad4dc";
            List <string> users  = new List <string> {
                "jmessage123", "jmessage"
            };
            CrossFriendPayload payload = new CrossFriendPayload(appkey, users);

            ResponseWrapper content = client.crossAddFriends("xiaohuihui", payload);

            Assert.AreEqual(content.responseCode, HttpStatusCode.Forbidden);
        }
Example #2
0
        public static void Main(string[] args)
        {
            CrossFriendClient client = new CrossFriendClient(app_key, master_secret);
            String            appkey = "6be9204c30b9473e87bad4dc";
            List <string>     users  = new List <string> {
                "jmessage123", "jmessage"
            };
            CrossFriendPayload payload = new CrossFriendPayload(appkey, users);

            client.crossAddFriends("xiaohuihui", payload);
            //client.crossDeleteFriends("xiaohuihui", payload);

            //crossUpdateFriends
            CrossFriendInfoPayload        info  = new CrossFriendInfoPayload(app_key, "jmessage", "note", "other");
            List <CrossFriendInfoPayload> infos = new List <CrossFriendInfoPayload> {
            };

            infos.Add(info);
            client.crossUpdateFriends("xiaohuihui", infos);
        }