You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2017. It is now read-only.
Copy file name to clipboardExpand all lines: content/changes/2014-04-22-gist-api-now-truncating-large-files.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,6 @@ The [Gist API response][gist-json-representation] includes data for every file i
13
13
14
14
To eliminate those timeouts, the API now limits the amount of content returned for each file. If a file is larger than one megabyte in size, the API response will include the first megabyte of content for that file. (Few Gists have files this large. As a result, most API clients won't notice any impact from this change.)
15
15
16
-
When you need the full contents of the file, simply make a request to the URL specified in the`raw_url` attribute.
17
-
18
16
###New "truncated" attribute
19
17
20
18
The JSON snippet below illustrates the attributes provided for each file in the Gist API response. In it, you'll notice a new**truncated** attribute included as part of the file metadata. This Boolean attribute indicates whether the`content` value is truncated for this request.
@@ -32,6 +30,10 @@ The JSON snippet below illustrates the attributes provided for each file in the
32
30
}
33
31
}
34
32
33
+
###Getting the full content for truncated files
34
+
35
+
We recognize that sometimes you'll still want the full content for a file, even if it's too large to get returned in the standard Gist API response. In those cases, simply make a request to the URL specified in the`raw_url` attribute, and you'll receive the complete content for that file.
36
+
35
37
If you have any questions, please[get in touch][contact].