Skip to content

Commit e633068

Browse files
authored
docs: remove previews (#2372)
1 parent ba566fc commit e633068

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

README.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ The `octokit` package integrates the three main Octokit libraries
1717
- [`Octokit` API Client](#octokit-api-client)
1818
- [Constructor options](#constructor-options)
1919
- [Authentication](#authentication)
20-
- [Proxy Servers](#proxy-servers-nodejs-only)
20+
- [Proxy Servers (Node.js only)](#proxy-servers-nodejs-only)
2121
- [REST API](#rest-api)
2222
- [`octokit.rest` endpoint methods](#octokitrest-endpoint-methods)
2323
- [`octokit.request()`](#octokitrequest)
2424
- [Pagination](#pagination)
25-
- [Media Type previews and formats](#media-type-previews-and-formats)
25+
- [Media Type formats](#media-type-formats)
2626
- [GraphQL API queries](#graphql-api-queries)
2727
- [Schema previews](#schema-previews)
2828
- [App client](#app-client)
@@ -514,11 +514,9 @@ const issues = await octokit.paginate(octokit.rest.issues.listForRepo, {
514514
});
515515
```
516516

517-
#### Media Type previews and formats
517+
#### Media Type formats
518518

519-
**Note**: The concept of _preview headers_ has been deprecated from REST API endpoints hosted via `api.github.com` but it still exists in GHES (GitHub Enterprise Server) version 3.2 and below. Instead of using _preview headers_ going forward, new features are now being tested using beta previews that users will have to opt-in to.
520-
521-
Media type previews and formats can be set using `mediaType: { format, previews }` on every request. Required API previews are set automatically on the respective REST API endpoint methods.
519+
Media type formats can be set using `mediaType: { format }` on every request.
522520

523521
Example: retrieve the raw content of a `package.json` file
524522

@@ -534,20 +532,7 @@ const { data } = await octokit.rest.repos.getContent({
534532
console.log("package name: %s", JSON.parse(data).name);
535533
```
536534

537-
Example: retrieve a repository with topics
538-
539-
```js
540-
const { data } = await octokit.rest.repos.getContent({
541-
mediaType: {
542-
previews: ["mercy"],
543-
},
544-
owner: "octocat",
545-
repo: "hello-world",
546-
});
547-
console.log("topics on octocat/hello-world: %j", data.topics);
548-
```
549-
550-
Learn more about [Media type formats](https://docs.github.com/en/rest/overview/media-types) and [previews](https://docs.github.com/en/[email protected]/rest/overview/api-previews) used on GitHub Enterprise Server.
535+
Learn more about [Media type formats](https://docs.github.com/en/rest/overview/media-types).
551536

552537
### GraphQL API queries
553538

0 commit comments

Comments
 (0)