Closed owenthereal closed 9 years ago
In general it looks good to me. But the API GistService#Raw
seems pretty specific to Hub
's use, since it only returns the raw of the first file. What do you think we actually create a GistFileService#Raw
that returns the raw based on the file URL? That'll make it more generic.
Good point about the #Raw
, but if you think about this being a method that returns to you the same representation that you get when you tackle .txt
onto a gist URL, then it matches because GitHub also only picks the first file when serving the plaintext version of a gist. For most uses, that is good enough.
I don't think we need a GistFileService. Because raw gist files don't require authentication, people can just iterate of the the list of files in a Gist and manually fetch the contents themselves if they need to. What do you think?
Let's go ahead and merge this first. We could revisit if there's request for a more generic service.
This PR is to support https://github.com/github/hub/pull/601.
/cc @mislav