Skip to content

Commit

Permalink
Add missing fields (#75)
Browse files Browse the repository at this point in the history
* Add pinned posts

* Clean up docs
  • Loading branch information
drasticactions authored Oct 31, 2024
1 parent 8b14057 commit cbde50b
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 4 deletions.
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
<PackageVersion Include="Drastic.Utilities" Version="1.0.10" />
<PackageVersion Include="PublishSPAforGitHubPages.Build" Version="2.1.0" />
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.6.133" />
<PackageVersion Include="MSTest" Version="3.3.1" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="17.12.4" />
<PackageVersion Include="GitVersion.MSBuild" Version="6.0.2" />
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For documentation, check out https://drasticactions.github.io/FishyFlip

### Third-Party Libraries

- [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning)
- [GitVersion](https://github.com/GitTools/GitVersion)

FishyFlip

Expand Down
1 change: 1 addition & 0 deletions src/FishyFlip/Models/FeedProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public record FeedProfile(ATDid Did,
int FollowsCount,
int FollowersCount,
int PostsCount,
PinnedPost? PinnedPost,
DateTime IndexedAt,
Viewer Viewer,
IReadOnlyList<Label> Labels);
33 changes: 33 additions & 0 deletions src/FishyFlip/Models/PinnedPost.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// <copyright file="PinnedPost.cs" company="Drastic Actions">
// Copyright (c) Drastic Actions. All rights reserved.
// </copyright>

namespace FishyFlip.Models;

/// <summary>
/// Represents a pinned post.
/// </summary>
public class PinnedPost
{
/// <summary>
/// Initializes a new instance of the <see cref="PinnedPost"/> class.
/// </summary>
/// <param name="uri">The Post URI.</param>
/// <param name="cid">The reference to the post.</param>
[JsonConstructor]
public PinnedPost(ATUri? uri, ATCid? cid)
{
this.Cid = cid;
this.Uri = uri;
}

/// <summary>
/// Gets the ATCid of the created post.
/// </summary>
public ATCid? Cid { get; }

/// <summary>
/// Gets the Uri of the created post.
/// </summary>
public ATUri? Uri { get; }
}
2 changes: 1 addition & 1 deletion src/FishyFlip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For documentation, check out https://drasticactions.github.io/FishyFlip

### Third-Party Libraries

- [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning)
- [GitVersion](https://github.com/GitTools/GitVersion)

FishyFlip

Expand Down
1 change: 1 addition & 0 deletions src/FishyFlip/SourceGenerationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ namespace FishyFlip;
[JsonSerializable(typeof(ActorRecord))]
[JsonSerializable(typeof(ActorIdentity))]
[JsonSerializable(typeof(PostViewer))]
[JsonSerializable(typeof(PinnedPost))]
[JsonSerializable(typeof(Microsoft.IdentityModel.Tokens.JsonWebKey), TypeInfoPropertyName = nameof(Microsoft.IdentityModel.Tokens.JsonWebKey) + "_A")]
internal partial class SourceGenerationContext : JsonSerializerContext
{
Expand Down
2 changes: 1 addition & 1 deletion website/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This site is under construction.

## Third-Party Libraries

- [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning)
- [GitVersion](https://github.com/GitTools/GitVersion)

FishyFlip

Expand Down

0 comments on commit cbde50b

Please sign in to comment.