Пример #1
0
        public async Task SignedStatusesUpdate2_GotContent()
        {
            var query = new StatusesUpdate()
            {
                Status = TwitterOAuth.NewNonce() + "asd3dd{dd:ggпggg"
            };
            await Api.Send(query, false);

            Assert.IsTrue(!string.IsNullOrEmpty(query.RawContent));
        }
Пример #2
0
        public async Task SignedStatusesUpdate_GotContent()
        {
            var query = new StatusesUpdate()
            {
                Status = String.Format("{0}{2}{1}", "@Mike__Void", TwitterOAuth.NewNonce(), Environment.NewLine), InReplyId = "996346241826131969"
            };
            await Api.Send(query, false);

            Assert.IsTrue(!string.IsNullOrEmpty(query.RawContent));
        }
Пример #3
0
        public async Task PostTweet280Ru_GotContent()
        {
            var query = new StatusesUpdate()
            {
                Status = GenerateText(280, false)
            };
            await Api.Send(query, false);

            Assert.IsTrue(!string.IsNullOrEmpty(query.RawContent));
        }
Пример #4
0
        public async Task PostTweetOver280_Forbidden()
        {
            var query = new StatusesUpdate()
            {
                Status = GenerateText(281, true)
            };
            await Api.Send(query, false);

            Assert.IsTrue(query.Code == System.Net.HttpStatusCode.Forbidden);
        }
Пример #5
0
        /// <summary>
        /// This is a sync request of \statuses\update rest call.
        ///It returns JsonResponse&lt;Stream&gt;
		/// Here comes request Comments:
		///<para>发布一条新微博 </para>
		///<para>URL:</para>
		///<para>	https://api.weibo.com/2/statuses/update.json</para>
		///<para>支持格式:</para>
		///<para>	JSON</para>
		///<para>HTTP请求方式:</para>
		///<para>	POST</para>
		///<para>是否需要登录:</para>
		///<para>	是  关于登录授权,参见 如何登录授权</para>
		///<para>访问授权限制:</para>
		///<para>	访问级别:普通接口  频次限制:是  关于频次限制,参见 接口访问权限说明</para>
		///<para>注意事项:</para>
		///<para>	连续两次发布的微博不可以重复;   非会员发表定向微博,分组成员数最多200。</para>
		///<para></para>
        /// </summary>
        public JsonResponse<Stream> RequestStatusesUpdate(StatusesUpdate.Request request)
        {
            return RequestStatusesUpdateAsync(request).Result;
        }        
Пример #6
0
        /// <summary>
        /// This is a async request of \statuses\update rest call. 
        ///It returns JsonResponse&lt;Stream&gt;
		/// Here comes request Comments:
		///<para>发布一条新微博 </para>
		///<para>URL:</para>
		///<para>	https://api.weibo.com/2/statuses/update.json</para>
		///<para>支持格式:</para>
		///<para>	JSON</para>
		///<para>HTTP请求方式:</para>
		///<para>	POST</para>
		///<para>是否需要登录:</para>
		///<para>	是  关于登录授权,参见 如何登录授权</para>
		///<para>访问授权限制:</para>
		///<para>	访问级别:普通接口  频次限制:是  关于频次限制,参见 接口访问权限说明</para>
		///<para>注意事项:</para>
		///<para>	连续两次发布的微博不可以重复;   非会员发表定向微博,分组成员数最多200。</para>
		///<para></para>
        /// </summary>
        public async Task<JsonResponse<Stream>> RequestStatusesUpdateAsync (
            StatusesUpdate.Request request,
            CancellationToken cancellationToken=default(CancellationToken),
            IProgress<ProgressReport> progress=null)			
        {
            return await _requestStatusesUpdateMethod.GetResponseAsync(request, cancellationToken, progress);
        }
Пример #7
0
        /// <summary>
        /// This is a sync execution of \statuses\update rest call. 
        /// It returns JsonResponse&lt;StatusesUpdate.Response&gt;
		/// Here comes request Comments:
		///<para>发布一条新微博 </para>
		///<para>URL:</para>
		///<para>	https://api.weibo.com/2/statuses/update.json</para>
		///<para>支持格式:</para>
		///<para>	JSON</para>
		///<para>HTTP请求方式:</para>
		///<para>	POST</para>
		///<para>是否需要登录:</para>
		///<para>	是  关于登录授权,参见 如何登录授权</para>
		///<para>访问授权限制:</para>
		///<para>	访问级别:普通接口  频次限制:是  关于频次限制,参见 接口访问权限说明</para>
		///<para>注意事项:</para>
		///<para>	连续两次发布的微博不可以重复;   非会员发表定向微博,分组成员数最多200。</para>
		///<para></para>
        /// </summary>
        public JsonResponse<StatusesUpdate.Response> ExecuteStatusesUpdate(StatusesUpdate.Request request)
        {
            return ExecuteStatusesUpdateAsync(request).Result;
        }