Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dependencies #143

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading