-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ec6fb0
commit cd18d25
Showing
7 changed files
with
327 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
132 changes: 132 additions & 0 deletions
132
src/FishyFlip/Lexicon/App/Netlify/Aniblue/ATProtoAniblueExtensions.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
// <auto-generated /> | ||
// This file was generated by FFSourceGen. | ||
// Do not modify this file. | ||
|
||
#nullable enable | ||
|
||
using FishyFlip.Lexicon.Com.Atproto.Repo; | ||
|
||
namespace FishyFlip.Lexicon.App.Netlify.Aniblue | ||
{ | ||
|
||
/// <summary> | ||
/// Extension methods for app.netlify.aniblue. | ||
/// </summary> | ||
public static class ATProtoAniblueExtensions | ||
{ | ||
|
||
/// <summary> | ||
/// Create a Status record. | ||
/// </summary> | ||
/// <param name="atp"></param> | ||
/// <param name="record"></param> | ||
/// <param name="rkey"></param> | ||
/// <param name="validate"></param> | ||
/// <param name="swapCommit"></param> | ||
/// <param name="cancellationToken"></param> | ||
public static Task<Result<CreateRecordOutput?>> CreateStatusAsync(this FishyFlip.ATProtocol atp, App.Netlify.Aniblue.Status record, string? rkey = default, bool? validate = default, string? swapCommit = default, CancellationToken cancellationToken = default) | ||
{ | ||
return atp.CreateRecordAsync(atp.SessionManager.Session?.Did ?? throw new InvalidOperationException("Session did is required."), "app.netlify.aniblue.status", record, rkey, validate, swapCommit, cancellationToken); | ||
} | ||
|
||
/// <summary> | ||
/// Create a Status record. | ||
/// </summary> | ||
/// <param name="repo"></param> | ||
/// <param name="collection"></param> | ||
/// <param name="record"></param> | ||
/// <param name="rkey"></param> | ||
/// <param name="validate"></param> | ||
/// <param name="swapCommit"></param> | ||
/// <param name="cancellationToken"></param> | ||
public static Task<Result<CreateRecordOutput?>> CreateStatusAsync(this FishyFlip.ATProtocol atp, List<App.Netlify.Aniblue.StatusDef>? status, string? rkey = default, bool? validate = default, string? swapCommit = default, CancellationToken cancellationToken = default) | ||
{ | ||
var record = new FishyFlip.Lexicon.App.Netlify.Aniblue.Status(); | ||
record.StatusValue = status; | ||
return atp.CreateRecordAsync(atp.SessionManager.Session?.Did ?? throw new InvalidOperationException("Session did is required."), "app.netlify.aniblue.status", record, rkey, validate, swapCommit, cancellationToken); | ||
} | ||
|
||
/// <summary> | ||
/// Delete a Status record. | ||
/// </summary> | ||
/// <param name="atp"></param> | ||
/// <param name="repo"></param> | ||
/// <param name="rkey"></param> | ||
/// <param name="swapRecord"></param> | ||
/// <param name="swapCommit"></param> | ||
/// <param name="cancellationToken"></param> | ||
public static Task<Result<DeleteRecordOutput?>> DeleteStatusAsync(this FishyFlip.ATProtocol atp, FishyFlip.Models.ATIdentifier repo, string rkey, string? swapRecord = default, string? swapCommit = default, CancellationToken cancellationToken = default) | ||
{ | ||
return atp.DeleteRecordAsync(repo, "app.netlify.aniblue.status", rkey, swapRecord, swapCommit, cancellationToken); | ||
} | ||
|
||
/// <summary> | ||
/// Put a Status record. | ||
/// </summary> | ||
/// <param name="atp"></param> | ||
/// <param name="repo"></param> | ||
/// <param name="rkey"></param> | ||
/// <param name="record"></param> | ||
/// <param name="validate"></param> | ||
/// <param name="swapRecord"></param> | ||
/// <param name="swapCommit"></param> | ||
/// <param name="cancellationToken"></param> | ||
public static Task<Result<PutRecordOutput?>> PutStatusAsync(this FishyFlip.ATProtocol atp, FishyFlip.Models.ATIdentifier repo, string rkey, App.Netlify.Aniblue.Status record, bool? validate = default, string? swapRecord = default, string? swapCommit = default, CancellationToken cancellationToken = default) | ||
{ | ||
return atp.PutRecordAsync(repo, "app.netlify.aniblue.status", rkey, record, validate, swapRecord, swapCommit, cancellationToken); | ||
} | ||
|
||
/// <summary> | ||
/// List Status records. | ||
/// </summary> | ||
/// <param name="atp"></param> | ||
/// <param name="repo"></param> | ||
/// <param name="limit"></param> | ||
/// <param name="cursor"></param> | ||
/// <param name="reverse"></param> | ||
/// <param name="cancellationToken"></param> | ||
public static Task<Result<ListRecordsOutput?>> ListStatusAsync(this FishyFlip.ATProtocol atp, FishyFlip.Models.ATIdentifier repo, int? limit = 50, string? cursor = default, bool? reverse = default, CancellationToken cancellationToken = default) | ||
{ | ||
return atp.ListRecordsAsync(repo, "app.netlify.aniblue.status", limit, cursor, reverse, cancellationToken); | ||
} | ||
|
||
/// <summary> | ||
/// List Status records. | ||
/// </summary> | ||
/// <param name="atp"></param> | ||
/// <param name="limit"></param> | ||
/// <param name="cursor"></param> | ||
/// <param name="reverse"></param> | ||
/// <param name="cancellationToken"></param> | ||
public static Task<Result<ListRecordsOutput?>> ListStatusAsync(this FishyFlip.ATProtocol atp, int? limit = 50, string? cursor = default, bool? reverse = default, CancellationToken cancellationToken = default) | ||
{ | ||
return atp.ListRecordsAsync(atp.SessionManager.Session?.Did ?? throw new InvalidOperationException("Session did is required."), "app.netlify.aniblue.status", limit, cursor, reverse, cancellationToken); | ||
} | ||
|
||
/// <summary> | ||
/// Get Status records. | ||
/// </summary> | ||
/// <param name="atp"></param> | ||
/// <param name="repo"></param> | ||
/// <param name="rkey"></param> | ||
/// <param name="cid"></param> | ||
/// <param name="cancellationToken"></param> | ||
public static Task<Result<GetRecordOutput?>> GetStatusAsync(this FishyFlip.ATProtocol atp, FishyFlip.Models.ATIdentifier repo, string rkey, string? cid = default, CancellationToken cancellationToken = default) | ||
{ | ||
return atp.GetRecordAsync(repo, "app.netlify.aniblue.status", rkey, cid, cancellationToken); | ||
} | ||
|
||
/// <summary> | ||
/// Get Status records. | ||
/// </summary> | ||
/// <param name="atp"></param> | ||
/// <param name="rkey"></param> | ||
/// <param name="cid"></param> | ||
/// <param name="cancellationToken"></param> | ||
public static Task<Result<GetRecordOutput?>> GetStatusAsync(this FishyFlip.ATProtocol atp, string rkey, string? cid = default, CancellationToken cancellationToken = default) | ||
{ | ||
return atp.GetRecordAsync(atp.SessionManager.Session?.Did ?? throw new InvalidOperationException("Session did is required."), "app.netlify.aniblue.status", rkey, cid, cancellationToken); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// <auto-generated /> | ||
// This file was generated by FFSourceGen. | ||
// Do not modify this file. | ||
|
||
#nullable enable | ||
|
||
namespace FishyFlip.Lexicon.App.Netlify.Aniblue | ||
{ | ||
/// <summary> | ||
/// A record that stores the status of the anime. | ||
/// </summary> | ||
public partial class Status : ATObject | ||
{ | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Status"/> class. | ||
/// </summary> | ||
/// <param name="status"></param> | ||
public Status(List<App.Netlify.Aniblue.StatusDef>? status) | ||
{ | ||
this.StatusValue = status; | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Status"/> class. | ||
/// </summary> | ||
public Status() | ||
{ | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Status"/> class. | ||
/// </summary> | ||
public Status(CBORObject obj) | ||
{ | ||
if (obj["status"] is not null) this.StatusValue = obj["status"].Values.Select(n =>new App.Netlify.Aniblue.StatusDef(n)).ToList(); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the status. | ||
/// </summary> | ||
[JsonPropertyName("status")] | ||
public List<App.Netlify.Aniblue.StatusDef>? StatusValue { get; set; } | ||
|
||
/// <summary> | ||
/// Gets the ATRecord Type. | ||
/// </summary> | ||
[JsonPropertyName("$type")] | ||
public override string Type => "app.netlify.aniblue.status"; | ||
|
||
public const string RecordType = "app.netlify.aniblue.status"; | ||
|
||
public override string ToJson() | ||
{ | ||
return JsonSerializer.Serialize<App.Netlify.Aniblue.Status>(this, (JsonTypeInfo<App.Netlify.Aniblue.Status>)SourceGenerationContext.Default.AppNetlifyAniblueStatus)!; | ||
} | ||
|
||
public static Status FromJson(string json) | ||
{ | ||
return JsonSerializer.Deserialize<App.Netlify.Aniblue.Status>(json, (JsonTypeInfo<App.Netlify.Aniblue.Status>)SourceGenerationContext.Default.AppNetlifyAniblueStatus)!; | ||
} | ||
} | ||
} | ||
|
118 changes: 118 additions & 0 deletions
118
src/FishyFlip/Lexicon/App/Netlify/Aniblue/StatusDef.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
// <auto-generated /> | ||
// This file was generated by FFSourceGen. | ||
// Do not modify this file. | ||
|
||
#nullable enable | ||
|
||
namespace FishyFlip.Lexicon.App.Netlify.Aniblue | ||
{ | ||
public partial class StatusDef : ATObject | ||
{ | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="StatusDef"/> class. | ||
/// </summary> | ||
/// <param name="id">Annict API ID for the anime</param> | ||
/// <param name="title">Title of the anime</param> | ||
/// <param name="thumbnail">URL of the anime thumbnail image</param> | ||
/// <param name="status">Current watching status of the anime</param> | ||
/// <param name="episode_text">Current number text of episode</param> | ||
/// <param name="favorite">Favorite flag of the anime</param> | ||
public StatusDef(long? id = default, string? title = default, string? thumbnail = default, string? status = default, string? episode_text = default, bool? favorite = default) | ||
{ | ||
this.Id = id; | ||
this.Title = title; | ||
this.Thumbnail = thumbnail; | ||
this.Status = status; | ||
this.EpisodeText = episode_text; | ||
this.Favorite = favorite; | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="StatusDef"/> class. | ||
/// </summary> | ||
public StatusDef() | ||
{ | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="StatusDef"/> class. | ||
/// </summary> | ||
public StatusDef(CBORObject obj) | ||
{ | ||
if (obj["id"] is not null) this.Id = obj["id"].AsInt64Value(); | ||
if (obj["title"] is not null) this.Title = obj["title"].AsString(); | ||
if (obj["thumbnail"] is not null) this.Thumbnail = obj["thumbnail"].AsString(); | ||
if (obj["status"] is not null) this.Status = obj["status"].AsString(); | ||
if (obj["episode_text"] is not null) this.EpisodeText = obj["episode_text"].AsString(); | ||
if (obj["favorite"] is not null) this.Favorite = obj["favorite"].AsBoolean(); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the id. | ||
/// <br/> Annict API ID for the anime | ||
/// </summary> | ||
[JsonPropertyName("id")] | ||
[JsonRequired] | ||
public long? Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the title. | ||
/// <br/> Title of the anime | ||
/// </summary> | ||
[JsonPropertyName("title")] | ||
[JsonRequired] | ||
public string? Title { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the thumbnail. | ||
/// <br/> URL of the anime thumbnail image | ||
/// </summary> | ||
[JsonPropertyName("thumbnail")] | ||
public string? Thumbnail { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the status. | ||
/// <br/> Current watching status of the anime | ||
/// </summary> | ||
[JsonPropertyName("status")] | ||
[JsonRequired] | ||
public string? Status { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the episode_text. | ||
/// <br/> Current number text of episode | ||
/// </summary> | ||
[JsonPropertyName("episode_text")] | ||
[JsonRequired] | ||
public string? EpisodeText { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the favorite. | ||
/// <br/> Favorite flag of the anime | ||
/// </summary> | ||
[JsonPropertyName("favorite")] | ||
public bool? Favorite { get; set; } | ||
|
||
/// <summary> | ||
/// Gets the ATRecord Type. | ||
/// </summary> | ||
[JsonPropertyName("$type")] | ||
public override string Type => "app.netlify.aniblue.status#status"; | ||
|
||
public const string RecordType = "app.netlify.aniblue.status#status"; | ||
|
||
public override string ToJson() | ||
{ | ||
return JsonSerializer.Serialize<App.Netlify.Aniblue.StatusDef>(this, (JsonTypeInfo<App.Netlify.Aniblue.StatusDef>)SourceGenerationContext.Default.AppNetlifyAniblueStatusDef)!; | ||
} | ||
|
||
public static StatusDef FromJson(string json) | ||
{ | ||
return JsonSerializer.Deserialize<App.Netlify.Aniblue.StatusDef>(json, (JsonTypeInfo<App.Netlify.Aniblue.StatusDef>)SourceGenerationContext.Default.AppNetlifyAniblueStatusDef)!; | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters