Skip to content

Commit cb9d3e4

Browse files
feat: renamed methods to mirror latest documentation updates (#59)
Co-authored-by: Octokit Bot <[email protected]>
1 parent 5d141ac commit cb9d3e4

34 files changed

+1940
-125
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Check if a repository is starred by the authenticated user
2+
3+
```js
4+
octokit.activity.checkRepoIsStarredByAuthenticatedUser({
5+
owner,
6+
repo,
7+
});
8+
```
9+
10+
## Parameters
11+
12+
<table>
13+
<thead>
14+
<tr>
15+
<th>name</th>
16+
<th>required</th>
17+
<th>description</th>
18+
</tr>
19+
</thead>
20+
<tbody>
21+
<tr><td>owner</td><td>yes</td><td>
22+
23+
owner parameter
24+
25+
</td></tr>
26+
<tr><td>repo</td><td>yes</td><td>
27+
28+
repo parameter
29+
30+
</td></tr>
31+
</tbody>
32+
</table>
33+
34+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/starring/#check-if-a-repository-is-starred-by-the-authenticated-user).

docs/activity/checkStarringRepo.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Check if you are starring a repository
1+
# Check if a repository is starred by the authenticated user
22

3-
Requires for the user to be authenticated.
3+
**Deprecated:** This method has been renamed to activity.checkRepoIsStarredByAuthenticatedUser
44

55
```js
66
octokit.activity.checkStarringRepo({
@@ -33,4 +33,4 @@ repo parameter
3333
</tbody>
3434
</table>
3535

36-
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/starring/#check-if-you-are-starring-a-repository).
36+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/starring/#check-if-a-repository-is-starred-by-the-authenticated-user).

docs/activity/deleteThreadSubscription.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Delete a thread subscription
22

3-
Mutes all future notifications for a conversation until you comment on the thread or get **@mention**ed.
3+
Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://developer.github.com/v3/activity/notifications/#set-a-thread-subscription) endpoint and set `ignore` to `true`.
44

55
```js
66
octokit.activity.deleteThreadSubscription({

docs/activity/getFeeds.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Get feeds
2+
3+
GitHub provides several timeline resources in [Atom](<http://en.wikipedia.org/wiki/Atom_(standard)>) format. The Feeds API lists all the feeds available to the authenticated user:
4+
5+
- **Timeline**: The GitHub global public timeline
6+
- **User**: The public timeline for any user, using [URI template](https://developer.github.com/v3/#hypermedia)
7+
- **Current user public**: The public timeline for the authenticated user
8+
- **Current user**: The private timeline for the authenticated user
9+
- **Current user actor**: The private timeline for activity created by the authenticated user
10+
- **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.
11+
- **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.
12+
13+
**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://developer.github.com/v3/#basic-authentication) since current feed URIs use the older, non revocable auth tokens.
14+
15+
```js
16+
octokit.activity.getFeeds();
17+
```
18+
19+
## Parameters
20+
21+
This endpoint has no parameters
22+
23+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/feeds/#get-feeds).

docs/activity/getThread.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# View a single thread
1+
# Get a thread
22

33
```js
44
octokit.activity.getThread({
@@ -25,4 +25,4 @@ thread_id parameter
2525
</tbody>
2626
</table>
2727

28-
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/notifications/#view-a-single-thread).
28+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/notifications/#get-a-thread).
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
# Get a thread subscription
1+
# Mark notifications as read
22

3-
This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://developer.github.com/v3/activity/watching/#get-a-repository-subscription).
3+
**Deprecated:** This method has been renamed to activity.getThreadSubscriptionForAuthenticatedUser
44

5-
Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread.
5+
Marks all notifications as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://developer.github.com/v3/activity/notifications/#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`.
66

77
```js
8-
octokit.activity.getThreadSubscription({
9-
thread_id,
10-
});
8+
octokit.activity.getThreadSubscription();
119
```
1210

1311
## Parameters
@@ -21,12 +19,12 @@ octokit.activity.getThreadSubscription({
2119
</tr>
2220
</thead>
2321
<tbody>
24-
<tr><td>thread_id</td><td>yes</td><td>
22+
<tr><td>last_read_at</td><td>no</td><td>
2523

26-
thread_id parameter
24+
Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp.
2725

2826
</td></tr>
2927
</tbody>
3028
</table>
3129

32-
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/notifications/#get-a-thread-subscription).
30+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/notifications/#mark-notifications-as-read).
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Get a thread subscription for the authenticated user
2+
3+
This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://developer.github.com/v3/activity/watching/#get-a-repository-subscription).
4+
5+
Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread.
6+
7+
```js
8+
octokit.activity.getThreadSubscriptionForAuthenticatedUser({
9+
thread_id,
10+
});
11+
```
12+
13+
## Parameters
14+
15+
<table>
16+
<thead>
17+
<tr>
18+
<th>name</th>
19+
<th>required</th>
20+
<th>description</th>
21+
</tr>
22+
</thead>
23+
<tbody>
24+
<tr><td>thread_id</td><td>yes</td><td>
25+
26+
thread_id parameter
27+
28+
</td></tr>
29+
</tbody>
30+
</table>
31+
32+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/notifications/#get-a-thread-subscription-for-the-authenticated-user).
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# List events for the authenticated user
2+
3+
If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.
4+
5+
```js
6+
octokit.activity.listEventsForAuthenticatedUser({
7+
username,
8+
});
9+
```
10+
11+
## Parameters
12+
13+
<table>
14+
<thead>
15+
<tr>
16+
<th>name</th>
17+
<th>required</th>
18+
<th>description</th>
19+
</tr>
20+
</thead>
21+
<tbody>
22+
<tr><td>username</td><td>yes</td><td>
23+
24+
username parameter
25+
26+
</td></tr>
27+
<tr><td>per_page</td><td>no</td><td>
28+
29+
Results per page (max 100)
30+
31+
</td></tr>
32+
<tr><td>page</td><td>no</td><td>
33+
34+
Page number of the results to fetch.
35+
36+
</td></tr>
37+
</tbody>
38+
</table>
39+
40+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/events/#list-events-for-the-authenticated-user).

docs/activity/listEventsForOrg.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# List events for an organization
1+
# List organization events for the authenticated user
2+
3+
**Deprecated:** This method has been renamed to activity.listOrgEventsForAuthenticatedUser
24

35
This is the user's organization dashboard. You must be authenticated as the user to view this.
46

@@ -43,4 +45,4 @@ Page number of the results to fetch.
4345
</tbody>
4446
</table>
4547

46-
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/events/#list-events-for-an-organization).
48+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/events/#list-organization-events-for-the-authenticated-user).

docs/activity/listEventsForUser.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# List events performed by a user
1+
# List events for the authenticated user
2+
3+
**Deprecated:** This method has been renamed to activity.listEventsForAuthenticatedUser
24

35
If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.
46

@@ -37,4 +39,4 @@ Page number of the results to fetch.
3739
</tbody>
3840
</table>
3941

40-
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user).
42+
See also: [GitHub Developer Guide documentation](https://developer.github.com/v3/activity/events/#list-events-for-the-authenticated-user).

0 commit comments

Comments
 (0)