Browse Source

Add DownloadURL field to RepositoryContent struct

The RepositoryContent struct doesn't quite map to the API because it is
missing a download link.  This link is very useful because while the API
doesn't allow large files to be downloaded, the link allows the raw
files to be downloaded outside the API.
Michael Tiller 11 years ago
committed by Will Norris
parent
commit
88853b4d83
1 changed files with 11 additions and 10 deletions
  1. +11
    -10
      github/repos_contents.go

+ 11
- 10
github/repos_contents.go View File

@ -19,16 +19,17 @@ import (
// RepositoryContent represents a file or directory in a github repository.
type RepositoryContent struct {
Type *string `json:"type,omitempty"`
Encoding *string `json:"encoding,omitempty"`
Size *int `json:"size,omitempty"`
Name *string `json:"name,omitempty"`
Path *string `json:"path,omitempty"`
Content *string `json:"content,omitempty"`
SHA *string `json:"sha,omitempty"`
URL *string `json:"url,omitempty"`
GitURL *string `json:"git_url,omitempty"`
HTMLURL *string `json:"html_url,omitempty"`
Type *string `json:"type,omitempty"`
Encoding *string `json:"encoding,omitempty"`
Size *int `json:"size,omitempty"`
Name *string `json:"name,omitempty"`
Path *string `json:"path,omitempty"`
Content *string `json:"content,omitempty"`
SHA *string `json:"sha,omitempty"`
URL *string `json:"url,omitempty"`
GitURL *string `json:"git_url,omitempty"`
HTMLURL *string `json:"html_url,omitempty"`
DownloadURL *string `json:"download_url,omitempty"`
}
// RepositoryContentResponse holds the parsed response from CreateFile, UpdateFile, and DeleteFile.


Loading…
Cancel
Save