Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download (-g) doesn't work #16

Closed
npat-efault opened this issue Jan 6, 2014 · 1 comment
Closed

Download (-g) doesn't work #16

npat-efault opened this issue Jan 6, 2014 · 1 comment
Labels

Comments

@npat-efault
Copy link

It seems (?) the JSON served by github.com has changed. I had to modify a field-tag in gist_json.go, type FileDetails, to make download work again. See patch below:

diff --git a/json/gist_json.go b/json/gist_json.go
index f1d66d9..5c77a0c 100644
--- a/json/gist_json.go
+++ b/json/gist_json.go
@@ -48,7 +48,7 @@ type File struct {
 }

 type FileDetails struct {
-   FileName string `json:"file_name"`
+   FileName string `json:"filename"`
    Type     string `json:"type"`
    Language string `json:"language"`
    RawUrl   string `json:"raw_url"`
MaximeD added a commit that referenced this issue Jan 6, 2014
The json key use for files name was `file_name` whereas gist API uses
`filename` (without underscore) as a key. As a consequence download was
not working.
Change to use the right key.

REF #16

Details:
* CHANGE `file_name` to `filename`
@MaximeD
Copy link
Owner

MaximeD commented Jan 6, 2014

Thanks for spotting this bug, this is fix now.

@MaximeD MaximeD closed this as completed Jan 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants