IntelligenceX
Class

GitHubNotificationService

IntelligenceX.Telemetry.GitHub

Namespace
IntelligenceX.Telemetry.GitHub
Assembly
IntelligenceX
Implements
IDisposable
Modifiers
sealed

Reads and manages the authenticated user's GitHub notification inbox while respecting GitHub polling guidance.

Inheritance

  • object
  • GitHubNotificationService

Constructors

public GitHubNotificationService(string token, string? apiBaseUrl = null) #

Initializes a notification service using a GitHub token with Notifications access.

Parameters

token string required
A fine-grained token, GitHub App token, or classic token with the Notifications permission required by the requested operations.
apiBaseUrl string? = null optional
Optional GitHub-compatible API base URL.

Methods

public void Dispose() #

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public async Task<GitHubNotificationSnapshot> FetchAsync(GitHubNotificationQuery? query = null, CancellationToken cancellationToken = default) #

Returns notification threads for the authenticated user, reusing a fresh snapshot until GitHub's poll interval expires.

Parameters

query IntelligenceX.Telemetry.GitHub.GitHubNotificationQuery? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public async Task MarkAllReadAsync(CancellationToken cancellationToken = default) #

Marks every notification in the authenticated user's inbox as read and invalidates cached snapshots.

Parameters

cancellationToken System.Threading.CancellationToken = default optional

Returns

Task
public async Task MarkDoneAsync(string threadId, CancellationToken cancellationToken = default) #

Marks one GitHub notification thread as done and invalidates cached inbox snapshots.

Parameters

threadId string required
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task
public async Task MarkReadAsync(string threadId, CancellationToken cancellationToken = default) #

Marks one GitHub notification thread as read and invalidates cached inbox snapshots.

Parameters

threadId string required
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task