private IObservable <StreamingMessage> AccessStreamingApiAsObservable(StreamingType type, Expression <Func <string, object> >[] parameters) { return(AccessStreamingApiAsObservableImpl(type, InternalUtils.ExpressionsToDictionary(parameters))); }
/// <summary> /// <para>Initializes a new instance of the <see cref="StreamingParameters"/> class with a specified option.</para> /// <para>Available parameters: </para> /// <para>*Note: In filter stream, at least one predicate parameter (follow, locations, or track) must be specified.</para> /// <para><c>bool</c> stall_warnings (optional)" : Specifies whether stall warnings should be delivered.</para> /// <para><c>string / IEnumerable<long></c> follow (optional*, required in site stream, ignored in user stream)</para> /// <para><c>string / IEnumerable<string></c> track (optional*)</para> /// <para><c>string / IEnumerable<string></c> location (optional*)</para> /// <para><c>string</c> with (optional)</para> /// </summary> /// <param name="streamingParameters">The streaming parameters.</param> public StreamingParameters(params Expression <Func <string, object> >[] streamingParameters) : this(InternalUtils.ExpressionsToDictionary(streamingParameters)) { }
/// <summary> /// <para>Returns a single Tweet, specified by the id parameter. The Tweet's author will also be embedded within the tweet.</para> /// <para>Avaliable parameters: </para> /// <para><paramref name="long id (required)"/> : The numerical ID of the desired Tweet.</para> /// <para><paramref name="bool trim_user (optional)"/> : When set to true, each tweet returned in a timeline will include a user object including only the status authors numerical ID. Omit this parameter to receive the complete user object.</para> /// <para><paramref name="bool include_entities (optional)"/> : The entities node will be disincluded when set to false.</para> /// </summary> /// <returns>The status.</returns> /// <param name='parameters'> /// Parameters. /// </param> public Status Show(params Expression <Func <string, object> >[] parameters) { return(this.Show(InternalUtils.ExpressionsToDictionary(parameters))); }
/// <summary> /// <para>Retrieve the information for the saved search represented by the given id.</para> /// <para>The authenticating user must be the owner of saved search ID being requested.</para> /// <para>Available parameters:</para> /// <para>- <c>long</c> id (required)</para> /// </summary> /// <param name="parameters">The Parameters.</param> /// <returns>The saved search.</returns> public SearchQueryResponse Show(params Expression <Func <string, object> >[] parameters) { return(this.Tokens.AccessParameterReservedApi <SearchQueryResponse>(MethodType.Get, "saved_searches/show/{id}", "id", InternalUtils.ExpressionsToDictionary(parameters))); }
/// <summary> /// <para>Uploads videos or chunked images to Twitter for use in a Tweet or Twitter-hosted Card.</para> /// <para>Available parameters:</para> /// <para>- <c>string</c> media_category (optional)</para> /// <para>- <c>IEnumerbale<long></c> additional_owners (optional)</para> /// </summary> /// <param name="media">The raw binary file content being uploaded.</param> /// <param name="totalBytes">The size of the media being uploaded in bytes.</param> /// <param name="mediaType">The type of the media being uploaded.</param> /// <param name="parameters">The parameters.</param> /// <returns>The result for the uploaded media.</returns> public MediaUploadResult UploadChunked(Stream media, long totalBytes, UploadMediaType mediaType, params Expression <Func <string, object> >[] parameters) { return(this.UploadChunkedImpl(media, totalBytes, mediaType, InternalUtils.ExpressionsToDictionary(parameters), null, null)); }
/// <summary> /// <para>Updates the authenticating user's current status, uploading an image.</para> /// <para>For each parameters attempt, the parameters text is compared with the authenticating user's recent tweets.</para> /// <para>Any attempt that would result in duplication will be blocked, resulting in a 403 error.</para> /// <para>Therefore, a user cannot submit the same status twice in a row.</para> /// <para>While not rate limited by the API a user is limited in the number of tweets they can create at a time.</para> /// <para>If the number of updates posted by the user reaches the current allowed limit this method will return an HTTP 403 error.</para> /// <para>Available parameters:</para> /// <para>- <c>string</c> status (required)</para> /// <para>- <c>Stream</c> / <c>IEnumerable<byte></c> / <c>FileInfo</c> media (required)</para> /// <para>- <c>bool</c> possibly_sensitive (optional)</para> /// <para>- <c>long</c> in_reply_to_status_id (optional)</para> /// <para>- <c>double</c> lat (optional)</para> /// <para>- <c>double</c> long (optional)</para> /// <para>- <c>string</c> place_id (optional)</para> /// <para>- <c>bool</c> display_coordinates (optional)</para> /// <para>- <c>bool</c> trim_user (optional)</para> /// </summary> /// <param name="parameters">The parameters.</param> /// <returns>The updated status.</returns> public StatusResponse UpdateWithMedia(params Expression <Func <string, object> >[] parameters) { return(this.UpdateWithMediaImpl(InternalUtils.ExpressionsToDictionary(parameters))); }
/// <summary> /// <para>Retrieve the information for the saved search represented by the given id as an asynchronous operation.</para> /// <para>The authenticating user must be the owner of saved search ID being requested.</para> /// <para>Available parameters:</para> /// <para>- <c>long</c> id (required)</para> /// </summary> /// <param name="parameters">The parameters.</param> /// <returns> /// <para>The task object representing the asynchronous operation.</para> /// <para>The Result property on the task object returns the saved search.</para> /// </returns> public Task <SearchQueryResponse> ShowAsync(params Expression <Func <string, object> >[] parameters) { return(this.Tokens.AccessParameterReservedApiAsync <SearchQueryResponse>(MethodType.Get, "saved_searches/destroy/{0}", "id", InternalUtils.ExpressionsToDictionary(parameters), CancellationToken.None)); }
/// <summary> /// <para>Access the users in a given category of the Twitter suggested user list as an asynchronous operation.</para> /// <para>It is recommended that applications cache this data for no more than one hour.</para> /// <para>- <c>string</c> slug (required)</para> /// <para>- <c>string</c> lang (optional)</para> /// </summary> /// <param name="parameters">The parameters.</param> /// <returns> /// <para>The task object representing the asynchronous operation.</para> /// <para>The Result property on the task object returns the category.</para> /// </returns> public Task <CategoryResponse> SuggestionAsync(params Expression <Func <string, object> >[] parameters) { return(this.Tokens.AccessParameterReservedApiAsync <CategoryResponse>(MethodType.Get, "users/suggestions/{slug}", "slug", InternalUtils.ExpressionsToDictionary(parameters), CancellationToken.None)); }
/// <summary> /// <para>Provides additional information about the uploaded media_id.</para> /// <para>Available parameters:</para> /// <para>- <c>long</c> media_id</para> /// <para>- JSON-Object alt_text</para> /// </summary> /// <param name="parameters">The parameters.</param> public void Create(params Expression <Func <string, object> >[] parameters) { this.Create(InternalUtils.ExpressionsToDictionary(parameters)); }
/// <summary> /// <para>Destroys a saved search for the authenticating user. The authenticating user must be the owner of saved search id being destroyed.</para> /// <para>Avaliable parameters: </para> /// <para><paramref name="long id (required)"/> : The ID of the saved search.</para> /// </summary> /// <returns>The saved search.</returns> /// <param name='tokens'> /// Tokens. /// </param> /// <param name='parameters'> /// Parameters. /// </param> public SearchQuery Destroy(params Expression <Func <string, object> >[] parameters) { return(this.Destroy(InternalUtils.ExpressionsToDictionary(parameters))); }
/// <summary> /// <para>Access the users in a given category of the Twitter suggested user list.</para> /// <para>It is recommended that applications cache this data for no more than one hour.</para> /// <para>- <c>string</c> slug (required)</para> /// <para>- <c>string</c> lang (optional)</para> /// </summary> /// <param name="parameters">The parameters.</param> /// <returns>The category.</returns> public CategoryResponse Suggestion(params Expression <Func <string, object> >[] parameters) { return(this.Tokens.AccessParameterReservedApi <CategoryResponse>(MethodType.Get, "users/suggestions/{slug}", "slug", InternalUtils.ExpressionsToDictionary(parameters))); }
private IEnumerable <StreamingMessage> AccessStreamingApi(StreamingType type, Expression <Func <string, object> >[] parameters) { return(this.AccessStreamingApiImpl(type, InternalUtils.ExpressionsToDictionary(parameters))); }
//FIXME: The format of "attribute:street_address" isn't known. Needed to check the format by "OAuth tool". #if !(PCL || WIN_RT || WP) //GET Methods /// <summary> /// <para>Returns all the information about a known place.</para> /// <para>Available parameters: </para> /// <para>- <c>string</c> place_id (required)</para> /// </summary> /// <param name="parameters">The parameters.</param> /// <returns>The geo.</returns> public PlaceResponse Id(params Expression <Func <string, object> >[] parameters) { return(this.Tokens.AccessParameterReservedApi <PlaceResponse>(MethodType.Get, "geo/id/{place_id}", "place_id", InternalUtils.ExpressionsToDictionary(parameters))); }
//GET Methods /// <summary> /// <para>Returns all the information about a known place as an asynchronous operation.</para> /// <para>Available parameters: </para> /// <para>- <c>string</c> place_id (required)</para> /// </summary> /// <param name="parameters">The parameters.</param> /// <returns> /// <para>The task object representing the asynchronous operation.</para> /// <para>The Result property on the task object returns the geo.</para> /// </returns> public Task <PlaceResponse> IdAsync(params Expression <Func <string, object> >[] parameters) { return(this.Tokens.AccessParameterReservedApiAsync <PlaceResponse>(MethodType.Get, "geo/id/{place_id}", "place_id", InternalUtils.ExpressionsToDictionary(parameters), CancellationToken.None)); }
/// <summary> /// <para>Uploads an image and gets the media_id attached with a status as an asynchronous operation.</para> /// <para>Available parameters:</para> /// <para>- <c>Stream</c> / <c>IEnumerable<byte></c> / FileInfo media (required)</para> /// </summary> /// <param name="parameters">The parameters.</param> /// <returns> /// <para>The task object representing the asynchronous operation.</para> /// <para>The Result property on the task object returns the result for the uploaded media.</para> /// </returns> public Task <MediaUploadResult> UploadAsync(params Expression <Func <string, object> >[] parameters) { return(this.UploadAsyncImpl(InternalUtils.ExpressionsToDictionary(parameters), CancellationToken.None)); }
internal static IEnumerable <T> Enumerate(TokensBase tokens, string apiName, EnumerateMode mode, params Expression <Func <string, object> >[] parameters) { var p = InternalUtils.ExpressionsToDictionary(parameters); return(EnumerateImpl(tokens, apiName, mode, p)); }
/// <summary> /// <para>Provides additional information about the uploaded media_id.</para> /// <para>Available parameters:</para> /// <para>- <c>long</c> media_id</para> /// <para>- JSON-Object alt_text</para> /// </summary> /// <param name="parameters">The parameters.</param> public Task CreateAsync(params Expression <Func <string, object> >[] parameters) { return(this.CreateAsync(InternalUtils.ExpressionsToDictionary(parameters))); }
/// <summary> /// <para>Access the users in a given category of the Twitter suggested user list and return their most recent status if they are not a protected user as an asynchronous operation.</para> /// <para>Available parameters:</para> /// <para>- <c>string</c> slug (required)</para> /// </summary> /// <param name="parameters">The parameters.</param> /// <returns> /// <para>The task object representing the asynchronous operation.</para> /// <para>The Result property on the task object returns the category.</para> /// </returns> public Task <ListedResponse <User> > SuggestedMembersAsync(params Expression <Func <string, object> >[] parameters) { return(this.Tokens.AccessParameterReservedApiArrayAsync <User>(MethodType.Get, "users/suggestions/{slug}/members", "slug", InternalUtils.ExpressionsToDictionary(parameters), CancellationToken.None)); }
/// <summary> /// Upload media (images) to Twitter for use in a Tweet or Twitter-hosted Card. /// <para>Available parameters:</para> /// <para>- <c>Stream</c> / <c>IEnumerable<byte></c> / <c>FileInfo</c> media (required)</para> /// <para>- <c>string</c> media_data (required)</para> /// <para>- <c>IEnumerbale<long></c> additional_owners (optional)</para> /// </summary> /// <param name="parameters">The parameters.</param> /// <returns>The result for the uploaded media.</returns> public MediaUploadResult Upload(params Expression <Func <string, object> >[] parameters) { return(this.UploadImpl(InternalUtils.ExpressionsToDictionary(parameters))); }
/// <summary> /// <para>Returns up to 100 of the first retweets of a given tweet.</para> /// <para>Available parameters:</para> /// <para>- <c>long</c> id (required)</para> /// <para>- <c>bool</c> trim_user (optional)</para> /// <para>- <c>int</c> count (optional)</para> /// </summary> /// <param name="parameters">The parameters.</param> /// <returns>The statuses.</returns> public ListedResponse <Status> Retweets(params Expression <Func <string, object> >[] parameters) { return(this.Tokens.AccessParameterReservedApiArray <Status>(MethodType.Get, "statuses/retweets/{id}", "id", InternalUtils.ExpressionsToDictionary(parameters))); }
/// <summary> /// <para>Uploads videos or chunked images to Twitter for use in a Tweet or Twitter-hosted Card as an asynchronous operation.</para> /// <para>Available parameters:</para> /// <para>- <c>string</c> media_category (optional)</para> /// <para>- <c>IEnumerbale<long></c> additional_owners (optional)</para> /// </summary> /// <param name="media">The raw binary file content being uploaded.</param> /// <param name="totalBytes">The size of the media being uploaded in bytes.</param> /// <param name="mediaType">The type of the media being uploaded.</param> /// <param name="parameters">The parameters.</param> /// <returns> /// <para>The task object representing the asynchronous operation.</para> /// <para>The Result property on the task object returns the result for the uploaded media.</para> /// </returns> public Task <MediaUploadResult> UploadChunkedAsync(Stream media, long totalBytes, UploadMediaType mediaType, params Expression <Func <string, object> >[] parameters) { return(this.UploadChunkedAsyncImpl(media, totalBytes, mediaType, InternalUtils.ExpressionsToDictionary(parameters), 0, 0, CancellationToken.None)); }
/// <summary> /// <para>Retweets a tweet. Returns the original tweet with retweet details embedded.</para> /// <para>Available parameters:</para> /// <para>- <c>long</c> id (required)</para> /// <para>- <c>bool</c> trim_user (optional)</para> /// </summary> /// <param name="parameters">The parameters.</param> /// <returns>The retweeted status.</returns> public StatusResponse Retweet(params Expression <Func <string, object> >[] parameters) { return(this.Tokens.AccessParameterReservedApi <StatusResponse>(MethodType.Post, "statuses/retweet/{id}", "id", InternalUtils.ExpressionsToDictionary(parameters))); }
/// <summary> /// <para>Uploads videos or chunked images to Twitter for use in a Tweet or Twitter-hosted Card as an asynchronous operation.</para> /// <para>Available parameters:</para> /// <para>- <c>string</c> media_category (optional)</para> /// <para>- <c>IEnumerbale<long></c> additional_owners (optional)</para> /// </summary> /// <param name="media">The raw binary file content being uploaded.</param> /// <param name="totalBytes">The size of the media being uploaded in bytes.</param> /// <param name="mediaType">The type of the media being uploaded.</param> /// <param name="parameters">The parameters.</param> /// <returns> /// <para>The task object representing the asynchronous operation.</para> /// <para>The Result property on the task object returns the result for the uploaded media.</para> /// </returns> public Task <MediaUploadResult> UploadChunkedWithRetryAsync(Stream media, long totalBytes, UploadMediaType mediaType, int retryCount, int retryDelayInMilliseconds, params Expression <Func <string, object> >[] parameters) { return(this.UploadChunkedAsyncImpl(media, totalBytes, mediaType, InternalUtils.ExpressionsToDictionary(parameters), retryCount, retryDelayInMilliseconds, CancellationToken.None)); }
/// <summary> /// <para>Returns up to 100 of the first retweets of a given tweet.</para> /// <para>Avaliable parameters: </para> /// <para><paramref name="long id (required)"/> : The numerical ID of the desired Tweet.</para> /// <para><paramref name="bool trim_user (optional)"/> : When set to true, each tweet returned in a timeline will include a user object including only the status authors numerical ID. Omit this parameter to receive the complete user object.</para> /// <para><paramref name="int count (optional)"/> : Specifies the number of records to retrieve. Must be less than or equal to 100.</para> /// </summary> /// <returns>Statuses.</returns> /// <param name='parameters'> /// Parameters. /// </param> public IEnumerable <Status> Retweets(params Expression <Func <string, object> >[] parameters) { return(this.Retweets(InternalUtils.ExpressionsToDictionary(parameters))); }
//FIXME: The format of "attribute:street_address" isn't known. Needed to check the format by "OAuth tool". //GET Methods /// <summary> /// <para>Returns all the information about a known place.</para> /// <para>Avaliable parameters: </para> /// <para><paramref name="string place_id (required)"/> : A place in the world. These IDs can be retrieved from geo/reverse_geocode.</para> /// </summary> /// <returns>The geo.</returns> /// <param name='parameters'> /// Parameters. /// </param> public Place ID(params Expression <Func <string, object> >[] parameters) { return(this.ID(InternalUtils.ExpressionsToDictionary(parameters))); }