API Reference
Class
GitHubNotificationService
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 System.String
- A fine-grained token, GitHub App token, or classic token with the Notifications permission required by the requested operations.
- apiBaseUrl System.String = null
- Optional GitHub-compatible API base URL.
Methods
public async Task<GitHubNotificationSnapshot> FetchAsync(GitHubNotificationQuery query = null, CancellationToken cancellationToken = null) #Returns:
Task<GitHubNotificationSnapshot>Returns notification threads for the authenticated user, reusing a fresh snapshot until GitHub's poll interval expires.
Parameters
- query IntelligenceX.Telemetry.GitHub.GitHubNotificationQuery = null
- cancellationToken System.Threading.CancellationToken = null
public async Task MarkAllReadAsync(CancellationToken cancellationToken = null) #Returns:
TaskMarks every notification in the authenticated user's inbox as read and invalidates cached snapshots.
Parameters
- cancellationToken System.Threading.CancellationToken = null
public async Task MarkDoneAsync(String threadId, CancellationToken cancellationToken = null) #Returns:
TaskMarks one GitHub notification thread as done and invalidates cached inbox snapshots.
Parameters
- threadId System.String
- cancellationToken System.Threading.CancellationToken = null
public async Task MarkReadAsync(String threadId, CancellationToken cancellationToken = null) #Returns:
TaskMarks one GitHub notification thread as read and invalidates cached inbox snapshots.
Parameters
- threadId System.String
- cancellationToken System.Threading.CancellationToken = null