Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit1763119

Browse files
committed
Document the media type param for directories
Seegithub/github#41240 for more details.
1 parent1815ff8 commit1763119

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎content/v3/repos/contents.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ This method returns the contents of a file or directory in a repository.
3636
GET /repos/:owner/:repo/contents/:path
3737

3838
Files and symlinks support[a custom media type](#custom-media-types) for retrieving the raw content or rendered HTML (when supported).
39-
Directories and submodules do_not_ support custom media types.
39+
Directories support[a custom media type](#custom-media-types) for retrieving the content as an object rather than an array of its entries.
40+
Submodules do_not_ support custom media types.
4041

4142
{{#tip}}
4243

@@ -282,6 +283,12 @@ curl -L https://api.github.com/repos/octokit/octokit.rb/tarball > octokit.tar.gz
282283

283284
Use the`.raw` media type to retrieve the contents of the file.
284285

286+
[Directories](#get-contents) support the following custom media type:
287+
288+
application/vnd.github.VERSION.object
289+
290+
Use the`.object` media type to retrieve the directory contents as an object rather than an array of its entries.
291+
285292
For markup files such as Markdown or AsciiDoc, you can retrieve the rendered HTML using the`.html` media type. Markup languages are rendered to HTML using our open-source[Markup library](https://github.com/github/markup).
286293

287294
You can read more about the use of media types in the API[here](/v3/media/).

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp