-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Application Configuration (#197)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
23b6012
commit f0a2429
Showing
122 changed files
with
6,864 additions
and
5,756 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Ignore Spelling: Css | ||
|
||
namespace TagzApp.Common; | ||
|
||
public interface IApplicationConfigurationRepository | ||
{ | ||
Task SetValues(ApplicationConfiguration config); | ||
} |
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 |
---|---|---|
@@ -1,10 +1,8 @@ | ||
using TagzApp.Common.Models; | ||
|
||
namespace TagzApp.Common; | ||
|
||
public interface IContentSubscriber | ||
{ | ||
|
||
void SubscribeToContent(Hashtag tag, Action<Content> onNewContent); | ||
|
||
} | ||
namespace TagzApp.Common; | ||
|
||
public interface IContentSubscriber | ||
{ | ||
|
||
void SubscribeToContent(Hashtag tag, Action<Content> onNewContent); | ||
|
||
} |
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
namespace TagzApp.Common; | ||
|
||
public interface IHasNewestId { | ||
|
||
string NewestId { get; set; } | ||
|
||
} | ||
namespace TagzApp.Common; | ||
|
||
public interface IHasNewestId | ||
{ | ||
|
||
string NewestId { get; set; } | ||
|
||
} |
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
using Microsoft.Extensions.Hosting; | ||
|
||
namespace TagzApp.Web.Services; | ||
|
||
public interface IMessagingService : IHostedService | ||
{ | ||
IEnumerable<string> TagsTracked { get; } | ||
|
||
Task AddHashtagToWatch(string tag); | ||
|
||
Task<Content?> GetContentByIds(string provider, string providerId); | ||
|
||
Task<IEnumerable<Content>> GetExistingContentForTag(string tag); | ||
// TODO: Needs checking if a non-nullable ModerationAction makes problems! | ||
Task<IEnumerable<(Content, ModerationAction)>> GetContentByTagForModeration(string tag); | ||
|
||
Task<IEnumerable<Content>> GetApprovedContentByTag(string tag); | ||
|
||
IEnumerable<ISocialMediaProvider> Providers { get; } | ||
|
||
string GetLatestProviderIdByTagAndProvider(string tag, string provider); | ||
|
||
} | ||
using Microsoft.Extensions.Hosting; | ||
|
||
namespace TagzApp.Web.Services; | ||
|
||
public interface IMessagingService : IHostedService | ||
{ | ||
IEnumerable<string> TagsTracked { get; } | ||
|
||
Task AddHashtagToWatch(string tag); | ||
|
||
Task<Content?> GetContentByIds(string provider, string providerId); | ||
|
||
Task<IEnumerable<Content>> GetExistingContentForTag(string tag); | ||
// TODO: Needs checking if a non-nullable ModerationAction makes problems! | ||
Task<IEnumerable<(Content, ModerationAction)>> GetContentByTagForModeration(string tag); | ||
|
||
Task<IEnumerable<Content>> GetApprovedContentByTag(string tag); | ||
|
||
IEnumerable<ISocialMediaProvider> Providers { get; } | ||
|
||
string GetLatestProviderIdByTagAndProvider(string tag, string provider); | ||
|
||
} |
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 |
---|---|---|
@@ -1,13 +1,11 @@ | ||
using TagzApp.Common.Models; | ||
|
||
namespace TagzApp.Web.Services; | ||
|
||
public interface INotifyNewMessages | ||
{ | ||
void NotifyNewContent(string hashtag, Content content); | ||
|
||
void NotifyApprovedContent(string hashtag, Content content, ModerationAction action); | ||
|
||
void NotifyRejectedContent(string hashtag, Content content, ModerationAction action); | ||
|
||
} | ||
namespace TagzApp.Web.Services; | ||
|
||
public interface INotifyNewMessages | ||
{ | ||
void NotifyNewContent(string hashtag, Content content); | ||
|
||
void NotifyApprovedContent(string hashtag, Content content, ModerationAction action); | ||
|
||
void NotifyRejectedContent(string hashtag, Content content, ModerationAction action); | ||
|
||
} |
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 |
---|---|---|
@@ -1,34 +1,32 @@ | ||
using TagzApp.Common.Models; | ||
|
||
namespace TagzApp.Common; | ||
|
||
/// <summary> | ||
/// Defines the interface for a Social Media Provider that delivers content to TagzApp | ||
/// </summary> | ||
public interface ISocialMediaProvider | ||
{ | ||
|
||
/// <summary> | ||
/// Unique identifier for the provider | ||
/// </summary> | ||
string Id { get; } | ||
|
||
/// <summary> | ||
/// Display name for the provider | ||
/// </summary> | ||
string DisplayName { get; } | ||
|
||
/// <summary> | ||
/// How frequently new content should be retrieved from the provider | ||
/// </summary> | ||
TimeSpan NewContentRetrievalFrequency { get; } | ||
|
||
/// <summary> | ||
/// Get a collection of content for a given hashtag | ||
/// </summary> | ||
/// <param name="tag">Tag to search for</param> | ||
/// <param name="since">Datestamp to search for content since</param> | ||
/// <returns></returns> | ||
Task<IEnumerable<Content>> GetContentForHashtag(Hashtag tag, DateTimeOffset since); | ||
|
||
} | ||
namespace TagzApp.Common; | ||
|
||
/// <summary> | ||
/// Defines the interface for a Social Media Provider that delivers content to TagzApp | ||
/// </summary> | ||
public interface ISocialMediaProvider | ||
{ | ||
|
||
/// <summary> | ||
/// Unique identifier for the provider | ||
/// </summary> | ||
string Id { get; } | ||
|
||
/// <summary> | ||
/// Display name for the provider | ||
/// </summary> | ||
string DisplayName { get; } | ||
|
||
/// <summary> | ||
/// How frequently new content should be retrieved from the provider | ||
/// </summary> | ||
TimeSpan NewContentRetrievalFrequency { get; } | ||
|
||
/// <summary> | ||
/// Get a collection of content for a given hashtag | ||
/// </summary> | ||
/// <param name="tag">Tag to search for</param> | ||
/// <param name="since">Datestamp to search for content since</param> | ||
/// <returns></returns> | ||
Task<IEnumerable<Content>> GetContentForHashtag(Hashtag tag, DateTimeOffset since); | ||
|
||
} |
Oops, something went wrong.