Exemple #1
0
        public async Task get_following()
        {
            var args = new GetFollowingArgs
            {
                Account = User.Login,
                Limit   = 3,
                Start   = string.Empty,
                Type    = FollowType.Blog
            };
            var resp = await Api.GetFollowingAsync(args, CancellationToken.None).ConfigureAwait(false);

            TestPropetries(resp);
        }
Exemple #2
0
        private bool IsFollow(string autor)
        {
            var args = new GetFollowingArgs()
            {
                Account = User.Login,
                Start   = autor,
                Limit   = 1,
                Type    = FollowType.Blog
            };
            var resp = Api.GetFollowing(args, CancellationToken.None);

            WriteLine(resp);
            Assert.IsFalse(resp.IsError);
            return(resp.Result.Following.Length > 0 && resp.Result.Following[0].Following == autor);
        }
Exemple #3
0
        private async Task <bool> IsFollow(string autor)
        {
            var args = new GetFollowingArgs
            {
                Account = User.Login,
                Start   = autor,
                Limit   = 1,
                Type    = FollowType.Blog
            };
            var resp = await Api.GetFollowingAsync(args, CancellationToken.None).ConfigureAwait(false);

            if (resp.IsError)
            {
                WriteLine(resp);
                Assert.IsFalse(resp.IsError);
            }
            return(resp.Result.Following.Length > 0 && resp.Result.Following[0].Following == autor);
        }
Exemple #4
0
        public void get_following()
        {
            var args = new GetFollowingArgs()
            {
                Account = User.Login,
                Limit   = 3,
                Start   = string.Empty,
                Type    = FollowType.Blog
            };
            var resp = Api.GetFollowing(args, CancellationToken.None);

            WriteLine(resp);
            Assert.IsFalse(resp.IsError);

            var obj = Api.CustomGetRequest <JObject>(KnownApiNames.FollowApi, "get_following", args, CancellationToken.None);

            TestPropetries(resp.Result.GetType(), obj.Result);
            WriteLine("----------------------------------------------------------------------------");
            WriteLine(obj);
        }
 /// <summary>
 /// API name: get_following
 ///
 /// </summary>
 /// <param name="args">API type: get_following_args</param>
 /// <param name="token">Throws a <see cref="T:System.OperationCanceledException" /> if this token has had cancellation requested.</param>
 /// <returns>API type: get_following_return</returns>
 /// <exception cref="T:System.OperationCanceledException">The token has had cancellation requested.</exception>
 public JsonRpcResponse <GetFollowingReturn> GetFollowing(GetFollowingArgs args, CancellationToken token)
 {
     return(CustomGetRequest <GetFollowingReturn>(KnownApiNames.FollowApi, "get_following", args, token));
 }