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.

Commit07d3bbf

Browse files
author
Leon Gersing
committed
Incorporate style, grammer changes
These changes seek to more closely honor the spirit of (The GitHub Blog post guide)[https://github.com/github/github/blob/78464a5017a3df68598c9fd0467bb0fd3c83ad50/docs/blog-posts.md] and incorporate the wisdom and feedback from@jasonrudolph
1 parentce6a606 commit07d3bbf

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

‎content/changes/2014-04-22-gist-api-now-truncating-large-files.md‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ created_at: 2014-04-22
55
author_name:leongersing
66
---
77

8-
In order to provide the most robust, fast and accurate API for Gist we recently decided to make a few small changes to the*files*payload.
8+
In order to provide the most robust, fast and accurate API for Gist we recently decided to make a few small changes to the*files*attribute.
99

10-
###Truncating file contentsless than 1MB
11-
Sometimes we need to put some large data into a gist. However, we don't always need to see the full content of that large gist when we're fetching the metadata for gists via the API.This change imposes a sensible (according to our data) limit on the amount of raw file data that is returned in gist fetches via the API.If you're relying on reading the full content of individual files from a gist then you mayneedto update your flow to perform a followup request forthe**raw_url** resource in order to download the entirecontents ofthefile. Which begs the question:*How do I know if thefile's contents have been truncated?*
10+
###Truncating file contentslarger than 1MB
11+
This change imposes a sensible (according to our data) limit on the amount of raw file data that is returned in gist fetches via the API.This means faster response times while eliminating browser timeouts when fetching gists that contains large files. When youneed thefullcontents ofyour gist'sfile, simply make a request to the url specified in theraw_url attribute.
1212

13-
###New files.truncated property
14-
On the packets that have been truncated you will notice a new key in the files segment of the payload.
13+
###"truncated" attribute
1514

1615
{
1716
files: {
@@ -26,9 +25,7 @@ On the packets that have been truncated you will notice a new key in the files s
2625
}
2726
}
2827

29-
In this small example payload, you'll notice the new*truncated* key has been added and the*content* key's value is empty. This would be a case for making a follow up request to the raw_url, if you are looking to get all of the data that would have normally showed up in the content field.
30-
31-
>Please note that in some cases you may have data in the content field but it has also been truncated. In this case, simply make a follow up request to the raw_url in order recieve the full contents of the file.
28+
In this small example payload, you'll notice the new**truncated** attribute has been added to each file's payload. It is a boolean attribute indicating if the content attribute's value has been truncated for this request.
3229

3330
If you have any questions, please[get in touch][contact].
3431

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp