Activity

Activity APIs provide access to notifications, subscriptions, and timelines.

Operations

MethodEndpointDescription
GET/eventsList public events
GET/feedsGet feeds
GET/networks/{owner}/{repo}/eventsList public events for a network of repositories
GET/notificationsList notifications for the authenticated user
PUT/notificationsMark notifications as read
GET/notifications/threads/{thread_id}Get a thread
PATCH/notifications/threads/{thread_id}Mark a thread as read
DELETE/notifications/threads/{thread_id}Mark a thread as done
GET/notifications/threads/{thread_id}/subscriptionGet a thread subscription for the authenticated user
PUT/notifications/threads/{thread_id}/subscriptionSet a thread subscription
DELETE/notifications/threads/{thread_id}/subscriptionDelete a thread subscription
GET/orgs/{org}/eventsList public organization events
GET/repos/{owner}/{repo}/eventsList repository events
GET/repos/{owner}/{repo}/notificationsList repository notifications for the authenticated user
PUT/repos/{owner}/{repo}/notificationsMark repository notifications as read
GET/repos/{owner}/{repo}/stargazersList stargazers
GET/repos/{owner}/{repo}/subscribersList watchers
GET/repos/{owner}/{repo}/subscriptionGet a repository subscription
PUT/repos/{owner}/{repo}/subscriptionSet a repository subscription
DELETE/repos/{owner}/{repo}/subscriptionDelete a repository subscription
GET/user/starredList repositories starred by the authenticated user
GET/user/starred/{owner}/{repo}Check if a repository is starred by the authenticated user
PUT/user/starred/{owner}/{repo}Star a repository for the authenticated user
DELETE/user/starred/{owner}/{repo}Unstar a repository for the authenticated user
GET/user/subscriptionsList repositories watched by the authenticated user
GET/users/{username}/eventsList events for the authenticated user
GET/users/{username}/events/orgs/{org}List organization events for the authenticated user
GET/users/{username}/events/publicList public events for a user
GET/users/{username}/received_eventsList events received by the authenticated user
GET/users/{username}/received_events/publicList public events received by a user
GET/users/{username}/starredList repositories starred by a user
GET/users/{username}/subscriptionsList repositories watched by a user

Example

List public events, with the TypeScript SDK:

ts
import { GitHubV3REST } from "github";

const client = new GitHubV3REST({
  baseUrl: "https://api.github.com",
});

const result = await client.activity.listPublicEvents();
console.log(result);
Nine more languages

The same call exists in every SDK. See SDKs for the other nine.