Ejemplo n.º 1
0
 /// <summary>
 /// <para>Upload a media attachment.</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>Stream</c> / <c>IEnumerable&lt;byte&gt;</c> file (required)</para>
 /// <para>- <c>string</c> description (optional)</para>
 /// <para>- <c>string</c> focus (focal point: two floating points, comma-delimited) (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 attachment object.</para>
 /// </returns>
 public Task <Attachment> PostAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <Attachment>(MethodType.Post, "media", parameters));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// <para>Removes current push subscription.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 empty object.</para>
 /// </returns>
 public Task DeletePushSubscriptionAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync(MethodType.Delete, "push/subscription", parameters));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// <para>Returns notification objects related current account.</para>
 /// <para>allowed values of exclude_types: "follow", "favourite", "reblog", "mention"</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>long</c> max_id (optional)</para>
 /// <para>- <c>long</c> since_id (optional)</para>
 /// <para>- <c>int</c> limit (optional)</para>
 /// <para>- <c>IEnumerable&lt;string&gt;</c> exclude_types (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 list of notification object.</para>
 /// </returns>
 public Task <Linked <Notification> > GetAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <Linked <Notification> >(MethodType.Get, "notifications", parameters));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// <para>Accounts the user chose to endorse.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 list of account object.</para>
 /// </returns>
 public Task <Linked <Account> > GetAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <Linked <Account> >(MethodType.Get, "endorsements", parameters));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// <para>Updates push subscription.</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>string</c> subscription[endpoint] (required)</para>
 /// <para>- <c>string</c> subscription[keys][p256dh] (required)</para>
 /// <para>- <c>string</c> subscription[keys][auth] (required)</para>
 /// <para>- <c>bool</c> data[alerts][follow] (optional)</para>
 /// <para>- <c>bool</c> data[alerts][favourite] (optional)</para>
 /// <para>- <c>bool</c> data[alerts][reblog] (optional)</para>
 /// <para>- <c>bool</c> data[alerts][follow] (mention)</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 pushsubscription object.</para>
 /// </returns>
 public Task <PushSubscription> UpdatePushSubscriptionAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <PushSubscription>(MethodType.Put, "push/subscription", parameters));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// <para>Updating the current user credentials.</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>string</c> display_name (optional)</para>
 /// <para>- <c>string</c> note (optional)</para>
 /// <para>- <c>string</c> avatar (base64Encoded image string) (optional)</para>
 /// <para>- <c>string</c> header (base64Encoded image string) (optional)</para>
 /// <para>- <c>bool</c> locked (optional)</para>
 /// <para>- <c>string</c> fields_attributes[0][name] ([0]-[3] is allowed) (optional)</para>
 /// <para>- <c>string</c> fields_attributes[0][value] ([0]-[3] is allowed) (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 account object.</para>
 /// </returns>
 public Task <Account> UpdateCredentialsAsync(params Expression <Func <string, object> >[] parameters)
 {
     return(Tokens.AccessApiAsync <Account>(MethodType.Patch, "accounts/update_credentials", Utils.ExpressionToDictionary(parameters)));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// <para>Post a new status.</para>
 /// <para>format of scheduled_at: "2019-01-01 12:00:00" (ISO 8601)</para>
 /// <para>format of language: "jpn" (ISO 639-2)"</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>string</c> status (required)</para>
 /// <para>- <c>long</c> in_reply_to_id (optional)</para>
 /// <para>- <c>IEnumerable&lt;long&gt;</c> media_ids (optional)</para>
 /// <para>- <c>bool</c> sensitive (optional)</para>
 /// <para>- <c>bool</c> spoiler_text (optional)</para>
 /// <para>- <c>string</c> visibility (optional)</para>
 /// <para>- <c>string</c> scheduled_at (optional)</para>
 /// <para>- <c>string</c> language (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 status object.</para>
 /// </returns>
 public Task<Status> PostAsync(IDictionary<string, object> parameters)
 {
     return Tokens.AccessApiAsync<Status>(MethodType.Post, "statuses", parameters);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// <para>Returns a list of reports made by the authenticated user.</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>long</c> account_id (required)</para>
 /// <para>- <c>IEnumerable&lt;long&gt;</c> status_ids (required)</para>
 /// <para>- <c>string</c> comment (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 list of report object.</para>
 /// </returns>
 public Task <Report> PostAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <Report>(MethodType.Post, "reports", parameters));
 }
Ejemplo n.º 9
0
 /// <summary>
 /// <para>Returns current account's favorites.</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>long</c> max_id (optional)</para>
 /// <para>- <c>long</c> since_id (optional)</para>
 /// <para>- <c>int</c> limit (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 list of status object.</para>
 /// </returns>
 public Task <Linked <Status> > GetAsync(params Expression <Func <string, object> >[] parameters)
 {
     return(Tokens.AccessApiAsync <Linked <Status> >(MethodType.Get, "favourites", Utils.ExpressionToDictionary(parameters)));
 }
Ejemplo n.º 10
0
 /// <summary>
 /// <para>Returns a list of reports made by the authenticated user.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 list of report object.</para>
 /// </returns>
 public Task <Linked <Report> > GetAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <Linked <Report> >(MethodType.Get, "reports", parameters));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// <para>Returns a list of reports made by the authenticated user.</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>long</c> account_id (required)</para>
 /// <para>- <c>IEnumerable&lt;long&gt;</c> status_ids (required)</para>
 /// <para>- <c>string</c> comment (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 list of report object.</para>
 /// </returns>
 public Task <Report> PostAsync(params Expression <Func <string, object> >[] parameters)
 {
     return(Tokens.AccessApiAsync <Report>(MethodType.Post, "reports", Utils.ExpressionToDictionary(parameters)));
 }
Ejemplo n.º 12
0
 /// <summary>
 /// <para>Returns information about instance.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 instance object.</para>
 /// </returns>
 public Task <Instance> GetAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <Instance>(MethodType.Get, "instance", parameters));
 }
Ejemplo n.º 13
0
 /// <summary>
 /// <para>Returns information about instance.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 instance object.</para>
 /// </returns>
 public Task <Instance> GetAsync(params Expression <Func <string, object> >[] parameters)
 {
     return(Tokens.AccessApiAsync <Instance>(MethodType.Get, "instance", Utils.ExpressionToDictionary(parameters)));
 }
Ejemplo n.º 14
0
 /// <summary>
 /// <para>Create new account.</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>string</c> username (required)</para>
 /// <para>- <c>string</c> email (required)</para>
 /// <para>- <c>string</c> password (required)</para>
 /// <para>- <c>bool</c> agreement (required)</para>
 /// <para>- <c>string</c> locale (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 token object.</para>
 /// </returns>
 public Task <Token> PostAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <Token>(MethodType.Post, "accounts", parameters));
 }
Ejemplo n.º 15
0
 /// <summary>
 /// <para>Returns a representation of the requesting user if authentication was successful.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 account object.</para>
 /// </returns>
 public Task <Account> VerifyCredentialsAsync(params Expression <Func <string, object> >[] parameters)
 {
     return(Tokens.AccessApiAsync <Account>(MethodType.Get, "accounts/verify_credentials", Utils.ExpressionToDictionary(parameters)));
 }
Ejemplo n.º 16
0
 /// <summary>
 /// <para>Returns current account's favorites.</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>long</c> max_id (optional)</para>
 /// <para>- <c>long</c> since_id (optional)</para>
 /// <para>- <c>int</c> limit (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 list of status object.</para>
 /// </returns>
 public Task <Linked <Status> > GetAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <Linked <Status> >(MethodType.Get, "favourites", parameters));
 }
Ejemplo n.º 17
0
 /// <summary>
 /// <para>Returns a representation of the requesting user if authentication was successful.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 account object.</para>
 /// </returns>
 public Task <Account> VerifyCredentialsAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <Account>(MethodType.Get, "accounts/verify_credentials", parameters));
 }
Ejemplo n.º 18
0
 /// <summary>
 /// <para>Get scheduled statuses.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 list of scheduledstatus object.</para>
 /// </returns>
 public Task <IEnumerable <ScheduledStatus> > GetAsync(params Expression <Func <string, object> >[] parameters)
 {
     return(Tokens.AccessApiAsync <IEnumerable <ScheduledStatus> >(MethodType.Get, "scheduled_statuses", Utils.ExpressionToDictionary(parameters)));
 }
Ejemplo n.º 19
0
 /// <summary>
 /// <para>Post a new status.</para>
 /// <para>format of scheduled_at: "2019-01-01 12:00:00" (ISO 8601)</para>
 /// <para>format of language: "jpn" (ISO 639-2)"</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>string</c> status (required)</para>
 /// <para>- <c>long</c> in_reply_to_id (optional)</para>
 /// <para>- <c>IEnumerable&lt;long&gt;</c> media_ids (optional)</para>
 /// <para>- <c>bool</c> sensitive (optional)</para>
 /// <para>- <c>bool</c> spoiler_text (optional)</para>
 /// <para>- <c>string</c> visibility (optional)</para>
 /// <para>- <c>string</c> scheduled_at (optional)</para>
 /// <para>- <c>string</c> language (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 status object.</para>
 /// </returns>
 public Task<Status> PostAsync(params Expression<Func<string, object>>[] parameters)
 {
     return Tokens.AccessApiAsync<Status>(MethodType.Post, "statuses", Utils.ExpressionToDictionary(parameters));
 }
Ejemplo n.º 20
0
 /// <summary>
 /// <para>Get scheduled statuses.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 list of scheduledstatus object.</para>
 /// </returns>
 public Task <IEnumerable <ScheduledStatus> > GetAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <IEnumerable <ScheduledStatus> >(MethodType.Get, "scheduled_statuses", parameters));
 }
Ejemplo n.º 21
0
 /// <summary>
 /// <para>Accounts the user chose to endorse.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 list of account object.</para>
 /// </returns>
 public Task <Linked <Account> > GetAsync(params Expression <Func <string, object> >[] parameters)
 {
     return(Tokens.AccessApiAsync <Linked <Account> >(MethodType.Get, "endorsements", Utils.ExpressionToDictionary(parameters)));
 }
Ejemplo n.º 22
0
 /// <summary>
 /// <para>Updating the current user credentials.</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>string</c> display_name (optional)</para>
 /// <para>- <c>string</c> note (optional)</para>
 /// <para>- <c>string</c> avatar (base64Encoded image string) (optional)</para>
 /// <para>- <c>string</c> header (base64Encoded image string) (optional)</para>
 /// <para>- <c>bool</c> locked (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 account object.</para>
 /// </returns>
 public Task <Account> UpdateCredentialsAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <Account>(MethodType.Patch, "accounts/update_credentials", parameters));
 }
Ejemplo n.º 23
0
 /// <summary>
 /// <para>Deletes a single notification from the Mastodon server for the authenticated user.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 empty object.</para>
 /// </returns>
 public Task DismissAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync(MethodType.Post, "notifications/dismiss", parameters));
 }
Ejemplo n.º 24
0
 /// <summary>
 /// <para>Returns relationship between current user and user specified by the required id parameter.</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>IEnumerable&lt;long&gt;</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 list of relationship object.</para>
 /// </returns>
 public Task <Linked <Relationship> > RelationshipsAsync(params Expression <Func <string, object> >[] parameters)
 {
     return(Tokens.AccessApiAsync <Linked <Relationship> >(MethodType.Get, "accounts/relationships", Utils.ExpressionToDictionary(parameters)));
 }
Ejemplo n.º 25
0
 /// <summary>
 /// <para>Removes current push subscription.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 empty object.</para>
 /// </returns>
 public Task DeletePushSubscriptionAsync(params Expression <Func <string, object> >[] parameters)
 {
     return(Tokens.AccessApiAsync(MethodType.Delete, "push/subscription", Utils.ExpressionToDictionary(parameters)));
 }
Ejemplo n.º 26
0
 /// <summary>
 /// <para>Returns relationship between current user and user specified by the required id parameter.</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>IEnumerable&lt;long&gt;</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 list of relationship object.</para>
 /// </returns>
 public Task <Linked <Relationship> > RelationshipsAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <Linked <Relationship> >(MethodType.Get, "accounts/relationships", parameters));
 }
Ejemplo n.º 27
0
 /// <summary>
 /// <para>Returns notification objects related current account.</para>
 /// <para>allowed values of exclude_types: "follow", "favourite", "reblog", "mention"</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>long</c> max_id (optional)</para>
 /// <para>- <c>long</c> since_id (optional)</para>
 /// <para>- <c>int</c> limit (optional)</para>
 /// <para>- <c>IEnumerable&lt;string&gt;</c> exclude_types (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 list of notification object.</para>
 /// </returns>
 public Task <Linked <Notification> > GetAsync(params Expression <Func <string, object> >[] parameters)
 {
     return(Tokens.AccessApiAsync <Linked <Notification> >(MethodType.Get, "notifications", Utils.ExpressionToDictionary(parameters)));
 }
Ejemplo n.º 28
0
 /// <summary>
 /// <para>Search account specified by the required q parameter.</para>
 /// <para>Available parameters:</para>
 /// <para>- <c>string</c> q (required)</para>
 /// <para>- <c>int</c> limit (optional)</para>
 /// <para>- <c>bool</c> following (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 list of account object.</para>
 /// </returns>
 public Task <Linked <Account> > SearchAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <Linked <Account> >(MethodType.Get, "accounts/search", parameters));
 }
Ejemplo n.º 29
0
 /// <summary>
 /// <para>Deletes all notifications from the Mastodon server for the authenticated user.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 empty object.</para>
 /// </returns>
 public Task ClearAsync(params Expression <Func <string, object> >[] parameters)
 {
     return(Tokens.AccessApiAsync(MethodType.Post, "notifications/clear", Utils.ExpressionToDictionary(parameters)));
 }
Ejemplo n.º 30
0
 /// <summary>
 /// <para>Returns a list of follow suggestions.</para>
 /// <para>Available parameters:</para>
 /// <para>- No parameters available in this method.</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 list of account object.</para>
 /// </returns>
 public Task <IEnumerable <Account> > GetAsync(IDictionary <string, object> parameters)
 {
     return(Tokens.AccessApiAsync <IEnumerable <Account> >(MethodType.Get, "suggestions", parameters));
 }