Skip to content

Commit

Permalink
Bump dependencies (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
drasticactions authored Jan 3, 2025
1 parent b1e255f commit 6b03d7b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ public partial class ModEventTakedown : ATObject
/// <param name="comment"></param>
/// <param name="durationInHours">Indicates how long the takedown should be in effect before automatically expiring.</param>
/// <param name="acknowledgeAccountSubjects">If true, all other reports on content authored by this account will be resolved (acknowledged).</param>
public ModEventTakedown(string? comment = default, long? durationInHours = default, bool? acknowledgeAccountSubjects = default)
/// <param name="policies">Names/Keywords of the policies that drove the decision.</param>
public ModEventTakedown(string? comment = default, long? durationInHours = default, bool? acknowledgeAccountSubjects = default, List<string>? policies = default)
{
this.Comment = comment;
this.DurationInHours = durationInHours;
this.AcknowledgeAccountSubjects = acknowledgeAccountSubjects;
this.Policies = policies;
}


Expand All @@ -42,6 +44,7 @@ public ModEventTakedown(CBORObject obj)
if (obj["comment"] is not null) this.Comment = obj["comment"].AsString();
if (obj["durationInHours"] is not null) this.DurationInHours = obj["durationInHours"].AsInt64Value();
if (obj["acknowledgeAccountSubjects"] is not null) this.AcknowledgeAccountSubjects = obj["acknowledgeAccountSubjects"].AsBoolean();
if (obj["policies"] is not null) this.Policies = obj["policies"].Values.Select(n =>n.AsString()).ToList();
}

/// <summary>
Expand All @@ -64,6 +67,13 @@ public ModEventTakedown(CBORObject obj)
[JsonPropertyName("acknowledgeAccountSubjects")]
public bool? AcknowledgeAccountSubjects { get; set; }

/// <summary>
/// Gets or sets the policies.
/// <br/> Names/Keywords of the policies that drove the decision.
/// </summary>
[JsonPropertyName("policies")]
public List<string>? Policies { get; set; }

/// <summary>
/// Gets the ATRecord Type.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,11 @@ public static class ModerationEndpoints
/// <param name="addedTags"></param>
/// <param name="removedTags"></param>
/// <param name="reportTypes"></param>
/// <param name="policies"></param>
/// <param name="cursor"></param>
/// <param name="cancellationToken"></param>
/// <returns>Result of <see cref="FishyFlip.Lexicon.Tools.Ozone.Moderation.QueryEventsOutput?"/></returns>
public static Task<Result<FishyFlip.Lexicon.Tools.Ozone.Moderation.QueryEventsOutput?>> QueryEventsAsync (this FishyFlip.ATProtocol atp, List<string>? types = default, FishyFlip.Models.ATDid? createdBy = default, string? sortDirection = default, DateTime? createdAfter = default, DateTime? createdBefore = default, string? subject = default, List<string>? collections = default, string? subjectType = default, bool? includeAllUserRecords = default, int? limit = 50, bool? hasComment = default, string? comment = default, List<string>? addedLabels = default, List<string>? removedLabels = default, List<string>? addedTags = default, List<string>? removedTags = default, List<string>? reportTypes = default, string? cursor = default, CancellationToken cancellationToken = default)
public static Task<Result<FishyFlip.Lexicon.Tools.Ozone.Moderation.QueryEventsOutput?>> QueryEventsAsync (this FishyFlip.ATProtocol atp, List<string>? types = default, FishyFlip.Models.ATDid? createdBy = default, string? sortDirection = default, DateTime? createdAfter = default, DateTime? createdBefore = default, string? subject = default, List<string>? collections = default, string? subjectType = default, bool? includeAllUserRecords = default, int? limit = 50, bool? hasComment = default, string? comment = default, List<string>? addedLabels = default, List<string>? removedLabels = default, List<string>? addedTags = default, List<string>? removedTags = default, List<string>? reportTypes = default, List<string>? policies = default, string? cursor = default, CancellationToken cancellationToken = default)
{
var endpointUrl = QueryEvents.ToString();
endpointUrl += "?";
Expand Down Expand Up @@ -285,6 +286,11 @@ public static class ModerationEndpoints
queryStrings.Add(string.Join("&", reportTypes.Select(n => "reportTypes=" + n)));
}

if (policies != null)
{
queryStrings.Add(string.Join("&", policies.Select(n => "policies=" + n)));
}

if (cursor != null)
{
queryStrings.Add("cursor=" + cursor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,12 @@ internal ToolsOzoneModeration(ATProtocol atp)
/// <param name="addedTags"></param>
/// <param name="removedTags"></param>
/// <param name="reportTypes"></param>
/// <param name="policies"></param>
/// <param name="cursor"></param>
/// <param name="cancellationToken"></param>
public Task<Result<FishyFlip.Lexicon.Tools.Ozone.Moderation.QueryEventsOutput?>> QueryEventsAsync (List<string>? types = default, FishyFlip.Models.ATDid? createdBy = default, string? sortDirection = default, DateTime? createdAfter = default, DateTime? createdBefore = default, string? subject = default, List<string>? collections = default, string? subjectType = default, bool? includeAllUserRecords = default, int? limit = 50, bool? hasComment = default, string? comment = default, List<string>? addedLabels = default, List<string>? removedLabels = default, List<string>? addedTags = default, List<string>? removedTags = default, List<string>? reportTypes = default, string? cursor = default, CancellationToken cancellationToken = default)
public Task<Result<FishyFlip.Lexicon.Tools.Ozone.Moderation.QueryEventsOutput?>> QueryEventsAsync (List<string>? types = default, FishyFlip.Models.ATDid? createdBy = default, string? sortDirection = default, DateTime? createdAfter = default, DateTime? createdBefore = default, string? subject = default, List<string>? collections = default, string? subjectType = default, bool? includeAllUserRecords = default, int? limit = 50, bool? hasComment = default, string? comment = default, List<string>? addedLabels = default, List<string>? removedLabels = default, List<string>? addedTags = default, List<string>? removedTags = default, List<string>? reportTypes = default, List<string>? policies = default, string? cursor = default, CancellationToken cancellationToken = default)
{
return atp.QueryEventsAsync(types, createdBy, sortDirection, createdAfter, createdBefore, subject, collections, subjectType, includeAllUserRecords, limit, hasComment, comment, addedLabels, removedLabels, addedTags, removedTags, reportTypes, cursor, cancellationToken);
return atp.QueryEventsAsync(types, createdBy, sortDirection, createdAfter, createdBefore, subject, collections, subjectType, includeAllUserRecords, limit, hasComment, comment, addedLabels, removedLabels, addedTags, removedTags, reportTypes, policies, cursor, cancellationToken);
}


Expand Down

0 comments on commit 6b03d7b

Please sign in to comment.