Skip to content
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
@@ -1,7 +1,7 @@
namespace Fluxer.Net;

/// <inheritdoc />
public class FavouriteGif : Entity, IFavouriteGif
public class FavoriteGif : Entity, IFavoriteGif
{
/// <inheritdoc />
public string Id { get; internal set; }
Expand Down Expand Up @@ -54,19 +54,19 @@ public class FavouriteGif : Entity, IFavouriteGif
/// <inheritdoc />
public string? TenorSlugId { get; internal set; }

internal FavouriteGif(FluxerBaseClient client) : base(client)
internal FavoriteGif(FluxerBaseClient client) : base(client)
{

}

public static FavouriteGif Create(FluxerBaseClient client, FavouriteGifJson json)
public static FavoriteGif Create(FluxerBaseClient client, FavoriteGifJson json)
{
FavouriteGif data = new FavouriteGif(client);
FavoriteGif data = new FavoriteGif(client);
data.Update(client, json);
return data;
}

internal void Update(FluxerBaseClient client, FavouriteGifJson json)
internal void Update(FluxerBaseClient client, FavoriteGifJson json)
{
Id = json.Id;
UserId = json.UserId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Fluxer.Net;

/// <inheritdoc />
public class FavouriteGifJson : IFavouriteGif
public class FavoriteGifJson : IFavoriteGif
{
/// <inheritdoc />
[JsonProperty("id")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Fluxer.Net;

public interface IFavouriteGif
public interface IFavoriteGif
{
/// <summary>
/// Unique identifier for the favorite gif.
Expand Down
4 changes: 2 additions & 2 deletions Fluxer.Net/Data/Guilds/Settings/MuteConfigurationJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace Fluxer.Net;
public class MuteConfigurationJson
{
[JsonProperty("end_time")]
public DateTime? EndTime { get; set; }
public DateTime? EndAt { get; set; }

[JsonProperty("selected_time_window")]
public int? SelectedTimeWindow { get; set; }
public int? SelectedTimeSeconds { get; set; }
}
12 changes: 12 additions & 0 deletions Fluxer.Net/Data/Users/IUserGuildFolder.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Fluxer.Net;

public interface IUserGuildFolder
{
int Id { get; }

string? Name { get; }

int? Color { get; }

List<ulong>? GuildIds { get; }
}
24 changes: 24 additions & 0 deletions Fluxer.Net/Data/Users/IUserGuildSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace Fluxer.Net;

public interface IUserGuildSettings
{
Dictionary<ulong, GuildChannelOverrideJson>? ChannelOverrides { get; }

ulong GuildId { get; }

bool HideMutedChannels { get; }

NotificationType MessageNotifications { get; }

bool MobilePush { get; }

MuteConfigurationJson? MuteConfig { get; }

bool Muted { get; }

bool SuppressEveryone { get; }

bool SuppressRoles { get; }

int Version { get; }
}
2 changes: 1 addition & 1 deletion Fluxer.Net/Data/Users/IUserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public interface IUserSettings
/// <summary>
/// The folder structure for organizing guilds in the sidebar.
/// </summary>
List<UserGuildFolder>? GuildFolders { get; }
List<UserGuildFolderJson>? GuildFolders { get; }

/// <summary>
/// The idle timeout in seconds before going AFK.
Expand Down
9 changes: 9 additions & 0 deletions Fluxer.Net/Data/Users/NotificationType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Fluxer.Net;

public enum NotificationType
{
AllMessages = 0,
MentionsOnly = 1,
NoMessages = 2,
InheritParent = 3,
}
11 changes: 4 additions & 7 deletions Fluxer.Net/Data/Users/RelationshipJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@ namespace Fluxer.Net;

public class RelationshipJson
{
[JsonProperty("source_user_id")]
public ulong SourceUserId { get; set; }

[JsonProperty("target_user_id")]
public ulong TargetUserId { get; set; }
[JsonProperty("id")]
public ulong Id { get; set; }

[JsonProperty("type")]
public int Type { get; set; }
public RelationshipType Type { get; set; }

[JsonProperty("nickname")]
public string? Nickname { get; set; }

[JsonProperty("since")]
public DateTime? Since { get; set; }
public DateTime? SinceAt { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@

namespace Fluxer.Net;

public class UserGuildFolder
/// <inheritdoc />
public class UserGuildFolderJson : IUserGuildFolder
{
[JsonProperty("folder_id")]
public int FolderId { get; set; }
/// <inheritdoc />
[JsonProperty("id")]
public int Id { get; set; }

/// <inheritdoc />
[JsonProperty("name")]
public string? Name { get; set; }

/// <inheritdoc />
[JsonProperty("color")]
public int? Color { get; set; }

/// <inheritdoc />
[JsonProperty("guild_ids")]
public List<ulong>? GuildIds { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,46 @@

namespace Fluxer.Net;

public class UserGuildSettings
/// <inheritdoc />
public class UserGuildSettingsJson : IUserGuildSettings
{
[JsonProperty("user_id")]
public ulong UserId { get; set; }
/// <inheritdoc />
[JsonProperty("channel_overrides")]
public Dictionary<ulong, GuildChannelOverrideJson>? ChannelOverrides { get; set; }

/// <inheritdoc />
[JsonProperty("guild_id")]
public ulong GuildId { get; set; }

/// <inheritdoc />
[JsonProperty("hide_muted_channels")]
public bool HideMutedChannels { get; set; }

/// <inheritdoc />
[JsonProperty("message_notifications")]
public int? MessageNotifications { get; set; }
public NotificationType MessageNotifications { get; set; }

[JsonProperty("muted")]
public bool Muted { get; set; }
/// <inheritdoc />
[JsonProperty("mobile_push")]
public bool MobilePush { get; set; }

/// <inheritdoc />
[JsonProperty("mute_config")]
public MuteConfigurationJson? MuteConfig { get; set; }

[JsonProperty("mobile_push")]
public bool MobilePush { get; set; }
/// <inheritdoc />
[JsonProperty("muted")]
public bool Muted { get; set; }

/// <inheritdoc />
[JsonProperty("suppress_everyone")]
public bool SuppressEveryone { get; set; }

/// <inheritdoc />
[JsonProperty("suppress_roles")]
public bool SuppressRoles { get; set; }

[JsonProperty("hide_muted_channels")]
public bool HideMutedChannels { get; set; }

[JsonProperty("channel_overrides")]
public Dictionary<ulong, GuildChannelOverrideJson>? ChannelOverrides { get; set; }

/// <inheritdoc />
[JsonProperty("version")]
public int Version { get; set; }
}
2 changes: 1 addition & 1 deletion Fluxer.Net/Data/Users/UserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class UserSettings : Entity, IUserSettings
public List<ulong>? GuildPositions { get; set; }

/// <inheritdoc />
public List<UserGuildFolder>? GuildFolders { get; set; }
public List<UserGuildFolderJson>? GuildFolders { get; set; }

/// <inheritdoc />
public int AfkTimeout { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Fluxer.Net/Data/Users/UserSettingsJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public class UserSettingsJson : IUserSettings

/// <inheritdoc />
[JsonProperty("guild_folders")]
public List<UserGuildFolder>? GuildFolders { get; set; }
public List<UserGuildFolderJson>? GuildFolders { get; set; }

/// <inheritdoc />
[JsonProperty("afk_timeout")]
Expand Down
Loading
Loading