Skip to content

Commit

Permalink
Bump dependencies (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
drasticactions authored Dec 17, 2024
1 parent 41eba96 commit 524b1cc
Show file tree
Hide file tree
Showing 8 changed files with 219 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/FishyFlip/FishyFlip.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>Access the ATProtocol and Bluesky through .NET: Alpha Version, built with Source Generation.</Description>
<Description>Access the ATProtocol and Bluesky through .NET: built with Source Generation.</Description>
<PackageTags>atproto atprotocol bluesky</PackageTags>
<RepositoryUrl>https://github.com/drasticactions/FishyFlip</RepositoryUrl>
<PackageProjectUrl>https://drasticactions.github.io/FishyFlip</PackageProjectUrl>
Expand Down
2 changes: 2 additions & 0 deletions src/FishyFlip/Lexicon/ATObject.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ namespace FishyFlip.Lexicon
[JsonDerivedType(typeof(App.Bsky.Unspecced.GetSuggestionsSkeletonOutput), typeDiscriminator: "app.bsky.unspecced.getSuggestionsSkeleton#GetSuggestionsSkeletonOutput")]
[JsonDerivedType(typeof(App.Bsky.Unspecced.GetTaggedSuggestionsOutput), typeDiscriminator: "app.bsky.unspecced.getTaggedSuggestions#GetTaggedSuggestionsOutput")]
[JsonDerivedType(typeof(App.Bsky.Feed.GetTimelineOutput), typeDiscriminator: "app.bsky.feed.getTimeline#GetTimelineOutput")]
[JsonDerivedType(typeof(App.Bsky.Unspecced.GetTrendingTopicsOutput), typeDiscriminator: "app.bsky.unspecced.getTrendingTopics#GetTrendingTopicsOutput")]
[JsonDerivedType(typeof(App.Bsky.Notification.GetUnreadCountOutput), typeDiscriminator: "app.bsky.notification.getUnreadCount#GetUnreadCountOutput")]
[JsonDerivedType(typeof(App.Bsky.Video.GetUploadLimitsOutput), typeDiscriminator: "app.bsky.video.getUploadLimits#GetUploadLimitsOutput")]
[JsonDerivedType(typeof(Tools.Ozone.Set.GetValuesOutput), typeDiscriminator: "tools.ozone.set.getValues#GetValuesOutput")]
Expand Down Expand Up @@ -383,6 +384,7 @@ namespace FishyFlip.Lexicon
[JsonDerivedType(typeof(App.Bsky.Feed.ThreadViewPost), typeDiscriminator: "app.bsky.feed.defs#threadViewPost")]
[JsonDerivedType(typeof(App.Bsky.Actor.ThreadViewPref), typeDiscriminator: "app.bsky.actor.defs#threadViewPref")]
[JsonDerivedType(typeof(Com.Atproto.Admin.ThreatSignature), typeDiscriminator: "com.atproto.admin.defs#threatSignature")]
[JsonDerivedType(typeof(App.Bsky.Unspecced.TrendingTopic), typeDiscriminator: "app.bsky.unspecced.defs#trendingTopic")]
[JsonDerivedType(typeof(Blue.Zio.Atfile.Unknown), typeDiscriminator: "blue.zio.atfile.meta#unknown")]
[JsonDerivedType(typeof(App.Bsky.Graph.UnmuteActorInput), typeDiscriminator: "app.bsky.graph.unmuteActor#UnmuteActorInput")]
[JsonDerivedType(typeof(App.Bsky.Graph.UnmuteActorListInput), typeDiscriminator: "app.bsky.graph.unmuteActorList#UnmuteActorListInput")]
Expand Down
12 changes: 12 additions & 0 deletions src/FishyFlip/Lexicon/App/Bsky/Unspecced/BlueskyUnspecced.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ internal BlueskyUnspecced(ATProtocol atp)
}


/// <summary>
/// Get a list of trending topics
/// </summary>
/// <param name="viewer"></param>
/// <param name="limit"></param>
/// <param name="cancellationToken"></param>
public Task<Result<FishyFlip.Lexicon.App.Bsky.Unspecced.GetTrendingTopicsOutput?>> GetTrendingTopicsAsync (FishyFlip.Models.ATDid? viewer = default, int? limit = 10, CancellationToken cancellationToken = default)
{
return atp.GetTrendingTopicsAsync(viewer, limit, cancellationToken);
}


/// <summary>
/// Backend Actors (profile) search, returns only skeleton.
/// <br/> Possible Errors: <br/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// <auto-generated />
// This file was generated by FFSourceGen.
// Do not modify this file.

#nullable enable

namespace FishyFlip.Lexicon.App.Bsky.Unspecced
{
public partial class GetTrendingTopicsOutput : ATObject
{

/// <summary>
/// Initializes a new instance of the <see cref="GetTrendingTopicsOutput"/> class.
/// </summary>
/// <param name="topics"></param>
/// <param name="suggested"></param>
public GetTrendingTopicsOutput(List<App.Bsky.Unspecced.TrendingTopic>? topics = default, List<App.Bsky.Unspecced.TrendingTopic>? suggested = default)
{
this.Topics = topics;
this.Suggested = suggested;
}


/// <summary>
/// Initializes a new instance of the <see cref="GetTrendingTopicsOutput"/> class.
/// </summary>
public GetTrendingTopicsOutput()
{
}


/// <summary>
/// Initializes a new instance of the <see cref="GetTrendingTopicsOutput"/> class.
/// </summary>
public GetTrendingTopicsOutput(CBORObject obj)
{
if (obj["topics"] is not null) this.Topics = obj["topics"].Values.Select(n =>new App.Bsky.Unspecced.TrendingTopic(n)).ToList();
if (obj["suggested"] is not null) this.Suggested = obj["suggested"].Values.Select(n =>new App.Bsky.Unspecced.TrendingTopic(n)).ToList();
}

/// <summary>
/// Gets or sets the topics.
/// </summary>
[JsonPropertyName("topics")]
[JsonRequired]
public List<App.Bsky.Unspecced.TrendingTopic>? Topics { get; set; }

/// <summary>
/// Gets or sets the suggested.
/// </summary>
[JsonPropertyName("suggested")]
[JsonRequired]
public List<App.Bsky.Unspecced.TrendingTopic>? Suggested { get; set; }

/// <summary>
/// Gets the ATRecord Type.
/// </summary>
[JsonPropertyName("$type")]
public override string Type => "app.bsky.unspecced.getTrendingTopics#GetTrendingTopicsOutput";

public const string RecordType = "app.bsky.unspecced.getTrendingTopics#GetTrendingTopicsOutput";

public override string ToJson()
{
return JsonSerializer.Serialize<App.Bsky.Unspecced.GetTrendingTopicsOutput>(this, (JsonTypeInfo<App.Bsky.Unspecced.GetTrendingTopicsOutput>)SourceGenerationContext.Default.AppBskyUnspeccedGetTrendingTopicsOutput)!;
}

public static GetTrendingTopicsOutput FromJson(string json)
{
return JsonSerializer.Deserialize<App.Bsky.Unspecced.GetTrendingTopicsOutput>(json, (JsonTypeInfo<App.Bsky.Unspecced.GetTrendingTopicsOutput>)SourceGenerationContext.Default.AppBskyUnspeccedGetTrendingTopicsOutput)!;
}
}
}

92 changes: 92 additions & 0 deletions src/FishyFlip/Lexicon/App/Bsky/Unspecced/TrendingTopic.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// <auto-generated />
// This file was generated by FFSourceGen.
// Do not modify this file.

#nullable enable

namespace FishyFlip.Lexicon.App.Bsky.Unspecced
{
public partial class TrendingTopic : ATObject
{

/// <summary>
/// Initializes a new instance of the <see cref="TrendingTopic"/> class.
/// </summary>
/// <param name="topic"></param>
/// <param name="displayName"></param>
/// <param name="description"></param>
/// <param name="link"></param>
public TrendingTopic(string? topic = default, string? displayName = default, string? description = default, string? link = default)
{
this.Topic = topic;
this.DisplayName = displayName;
this.Description = description;
this.Link = link;
}


/// <summary>
/// Initializes a new instance of the <see cref="TrendingTopic"/> class.
/// </summary>
public TrendingTopic()
{
}


/// <summary>
/// Initializes a new instance of the <see cref="TrendingTopic"/> class.
/// </summary>
public TrendingTopic(CBORObject obj)
{
if (obj["topic"] is not null) this.Topic = obj["topic"].AsString();
if (obj["displayName"] is not null) this.DisplayName = obj["displayName"].AsString();
if (obj["description"] is not null) this.Description = obj["description"].AsString();
if (obj["link"] is not null) this.Link = obj["link"].AsString();
}

/// <summary>
/// Gets or sets the topic.
/// </summary>
[JsonPropertyName("topic")]
[JsonRequired]
public string? Topic { get; set; }

/// <summary>
/// Gets or sets the displayName.
/// </summary>
[JsonPropertyName("displayName")]
public string? DisplayName { get; set; }

/// <summary>
/// Gets or sets the description.
/// </summary>
[JsonPropertyName("description")]
public string? Description { get; set; }

/// <summary>
/// Gets or sets the link.
/// </summary>
[JsonPropertyName("link")]
[JsonRequired]
public string? Link { get; set; }

/// <summary>
/// Gets the ATRecord Type.
/// </summary>
[JsonPropertyName("$type")]
public override string Type => "app.bsky.unspecced.defs#trendingTopic";

public const string RecordType = "app.bsky.unspecced.defs#trendingTopic";

public override string ToJson()
{
return JsonSerializer.Serialize<App.Bsky.Unspecced.TrendingTopic>(this, (JsonTypeInfo<App.Bsky.Unspecced.TrendingTopic>)SourceGenerationContext.Default.AppBskyUnspeccedTrendingTopic)!;
}

public static TrendingTopic FromJson(string json)
{
return JsonSerializer.Deserialize<App.Bsky.Unspecced.TrendingTopic>(json, (JsonTypeInfo<App.Bsky.Unspecced.TrendingTopic>)SourceGenerationContext.Default.AppBskyUnspeccedTrendingTopic)!;
}
}
}

30 changes: 30 additions & 0 deletions src/FishyFlip/Lexicon/App/Bsky/Unspecced/UnspeccedEndpoints.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public static class UnspeccedEndpoints

public const string GetTaggedSuggestions = "/xrpc/app.bsky.unspecced.getTaggedSuggestions";

public const string GetTrendingTopics = "/xrpc/app.bsky.unspecced.getTrendingTopics";

public const string SearchActorsSkeleton = "/xrpc/app.bsky.unspecced.searchActorsSkeleton";

public const string SearchPostsSkeleton = "/xrpc/app.bsky.unspecced.searchPostsSkeleton";
Expand Down Expand Up @@ -128,6 +130,34 @@ public static class UnspeccedEndpoints
}


/// <summary>
/// Get a list of trending topics
/// </summary>
/// <param name="atp"></param>
/// <param name="viewer"></param>
/// <param name="limit"></param>
/// <param name="cancellationToken"></param>
/// <returns>Result of <see cref="FishyFlip.Lexicon.App.Bsky.Unspecced.GetTrendingTopicsOutput?"/></returns>
public static Task<Result<FishyFlip.Lexicon.App.Bsky.Unspecced.GetTrendingTopicsOutput?>> GetTrendingTopicsAsync (this FishyFlip.ATProtocol atp, FishyFlip.Models.ATDid? viewer = default, int? limit = 10, CancellationToken cancellationToken = default)
{
var endpointUrl = GetTrendingTopics.ToString();
endpointUrl += "?";
List<string> queryStrings = new();
if (viewer != null)
{
queryStrings.Add("viewer=" + viewer);
}

if (limit != null)
{
queryStrings.Add("limit=" + limit);
}

endpointUrl += string.Join("&", queryStrings);
return atp.Get<FishyFlip.Lexicon.App.Bsky.Unspecced.GetTrendingTopicsOutput>(endpointUrl, atp.Options.SourceGenerationContext.AppBskyUnspeccedGetTrendingTopicsOutput!, cancellationToken);
}


/// <summary>
/// Backend Actors (profile) search, returns only skeleton.
/// <br/> Possible Errors: <br/>
Expand Down
4 changes: 4 additions & 0 deletions src/FishyFlip/Lexicon/CborExtensions.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ public static ATObject ToATObject(this CBORObject obj)
return new App.Bsky.Unspecced.GetTaggedSuggestionsOutput(obj);
case "app.bsky.feed.getTimeline#GetTimelineOutput":
return new App.Bsky.Feed.GetTimelineOutput(obj);
case "app.bsky.unspecced.getTrendingTopics#GetTrendingTopicsOutput":
return new App.Bsky.Unspecced.GetTrendingTopicsOutput(obj);
case "app.bsky.notification.getUnreadCount#GetUnreadCountOutput":
return new App.Bsky.Notification.GetUnreadCountOutput(obj);
case "app.bsky.video.getUploadLimits#GetUploadLimitsOutput":
Expand Down Expand Up @@ -781,6 +783,8 @@ public static ATObject ToATObject(this CBORObject obj)
return new App.Bsky.Actor.ThreadViewPref(obj);
case "com.atproto.admin.defs#threatSignature":
return new Com.Atproto.Admin.ThreatSignature(obj);
case "app.bsky.unspecced.defs#trendingTopic":
return new App.Bsky.Unspecced.TrendingTopic(obj);
case "blue.zio.atfile.meta#unknown":
return new Blue.Zio.Atfile.Unknown(obj);
case "app.bsky.graph.unmuteActor#UnmuteActorInput":
Expand Down
4 changes: 4 additions & 0 deletions src/FishyFlip/Lexicon/SourceGenerationContext.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ namespace FishyFlip.Lexicon
[JsonSerializable(typeof(List<FishyFlip.Lexicon.App.Bsky.Unspecced.GetTaggedSuggestionsOutput>), TypeInfoPropertyName = "ListAppBskyUnspeccedGetTaggedSuggestionsOutput")]
[JsonSerializable(typeof(FishyFlip.Lexicon.App.Bsky.Feed.GetTimelineOutput), TypeInfoPropertyName = "AppBskyFeedGetTimelineOutput")]
[JsonSerializable(typeof(List<FishyFlip.Lexicon.App.Bsky.Feed.GetTimelineOutput>), TypeInfoPropertyName = "ListAppBskyFeedGetTimelineOutput")]
[JsonSerializable(typeof(FishyFlip.Lexicon.App.Bsky.Unspecced.GetTrendingTopicsOutput), TypeInfoPropertyName = "AppBskyUnspeccedGetTrendingTopicsOutput")]
[JsonSerializable(typeof(List<FishyFlip.Lexicon.App.Bsky.Unspecced.GetTrendingTopicsOutput>), TypeInfoPropertyName = "ListAppBskyUnspeccedGetTrendingTopicsOutput")]
[JsonSerializable(typeof(FishyFlip.Lexicon.App.Bsky.Notification.GetUnreadCountOutput), TypeInfoPropertyName = "AppBskyNotificationGetUnreadCountOutput")]
[JsonSerializable(typeof(List<FishyFlip.Lexicon.App.Bsky.Notification.GetUnreadCountOutput>), TypeInfoPropertyName = "ListAppBskyNotificationGetUnreadCountOutput")]
[JsonSerializable(typeof(FishyFlip.Lexicon.App.Bsky.Video.GetUploadLimitsOutput), TypeInfoPropertyName = "AppBskyVideoGetUploadLimitsOutput")]
Expand Down Expand Up @@ -777,6 +779,8 @@ namespace FishyFlip.Lexicon
[JsonSerializable(typeof(List<FishyFlip.Lexicon.App.Bsky.Actor.ThreadViewPref>), TypeInfoPropertyName = "ListAppBskyActorThreadViewPref")]
[JsonSerializable(typeof(FishyFlip.Lexicon.Com.Atproto.Admin.ThreatSignature), TypeInfoPropertyName = "ComAtprotoAdminThreatSignature")]
[JsonSerializable(typeof(List<FishyFlip.Lexicon.Com.Atproto.Admin.ThreatSignature>), TypeInfoPropertyName = "ListComAtprotoAdminThreatSignature")]
[JsonSerializable(typeof(FishyFlip.Lexicon.App.Bsky.Unspecced.TrendingTopic), TypeInfoPropertyName = "AppBskyUnspeccedTrendingTopic")]
[JsonSerializable(typeof(List<FishyFlip.Lexicon.App.Bsky.Unspecced.TrendingTopic>), TypeInfoPropertyName = "ListAppBskyUnspeccedTrendingTopic")]
[JsonSerializable(typeof(FishyFlip.Lexicon.Blue.Zio.Atfile.Unknown), TypeInfoPropertyName = "BlueZioAtfileUnknown")]
[JsonSerializable(typeof(List<FishyFlip.Lexicon.Blue.Zio.Atfile.Unknown>), TypeInfoPropertyName = "ListBlueZioAtfileUnknown")]
[JsonSerializable(typeof(FishyFlip.Lexicon.App.Bsky.Graph.UnmuteActorInput), TypeInfoPropertyName = "AppBskyGraphUnmuteActorInput")]
Expand Down

0 comments on commit 524b1cc

Please sign in to comment.