google-api-go-client: code.google.com/p/google-api-go-client/drive/v1 Index | Files

package drive

import "code.google.com/p/google-api-go-client/drive/v1"

Package drive provides access to the Drive API.

See https://developers.google.com/drive/

Usage example:

import "code.google.com/p/google-api-go-client/drive/v1"
...
driveService, err := drive.New(oauthHttpClient)

Index

Package Files

drive-gen.go

Constants

const (
    // View and manage Google Drive files that you have opened or created
    // with this app
    DriveFileScope = "https://www.googleapis.com/auth/drive.file"
)

OAuth2 scopes used by this API.

type File

type File struct {
    // CreatedDate: Create time for this file (formatted ISO8601 timestamp).
    CreatedDate string `json:"createdDate,omitempty"`

    // Description: A short description of the file
    Description string `json:"description,omitempty"`

    // DownloadUrl: Short term download URL for the file. This will only be
    // populated on files with content stored in Drive.
    DownloadUrl string `json:"downloadUrl,omitempty"`

    // Etag: ETag of the file.
    Etag string `json:"etag,omitempty"`

    // FileExtension: The file extension used when downloading this file.
    // This field is read only. To set the extension, include it on title
    // when creating the file. This will only be populated on files with
    // content stored in Drive.
    FileExtension string `json:"fileExtension,omitempty"`

    // FileSize: The size of the file in bytes. This will only be populated
    // on files with content stored in Drive.
    FileSize int64 `json:"fileSize,omitempty,string"`

    // Id: The id of the file.
    Id  string `json:"id,omitempty"`

    // IndexableText: Indexable text attributes for the file (can only be
    // written)
    IndexableText *FileIndexableText `json:"indexableText,omitempty"`

    // Kind: The type of file. This is always drive#file
    Kind string `json:"kind,omitempty"`

    // Labels: Labels for the file.
    Labels *FileLabels `json:"labels,omitempty"`

    // LastViewedDate: Last time this file was viewed by the user (formatted
    // RFC 3339 timestamp).
    LastViewedDate string `json:"lastViewedDate,omitempty"`

    // Md5Checksum: An MD5 checksum for the content of this file. This will
    // only be populated on files with content stored in Drive.
    Md5Checksum string `json:"md5Checksum,omitempty"`

    // MimeType: The mimetype of the file
    MimeType string `json:"mimeType,omitempty"`

    // ModifiedByMeDate: Last time this file was modified by the user
    // (formatted RFC 3339 timestamp).
    ModifiedByMeDate string `json:"modifiedByMeDate,omitempty"`

    // ModifiedDate: Last time this file was modified by anyone (formatted
    // RFC 3339 timestamp).
    ModifiedDate string `json:"modifiedDate,omitempty"`

    // ParentsCollection: Collection of parent folders which contain this
    // file.
    // On insert, setting this field will put the file in all of the
    // provided folders. If no folders are provided, the file will be placed
    // in the default root folder. On update, this field is ignored.
    ParentsCollection []*FileParentsCollection `json:"parentsCollection,omitempty"`

    // SelfLink: A link back to this file.
    SelfLink string `json:"selfLink,omitempty"`

    // Title: The title of this file.
    Title string `json:"title,omitempty"`

    // UserPermission: The permissions for the authenticated user on this
    // file.
    UserPermission *Permission `json:"userPermission,omitempty"`
}

type FileIndexableText

type FileIndexableText struct {
    // Text: The text to be indexed for this file
    Text string `json:"text,omitempty"`
}

type FileLabels

type FileLabels struct {
    // Hidden: Whether this file is hidden from the user
    Hidden bool `json:"hidden,omitempty"`

    // Starred: Whether this file is starred by the user.
    Starred bool `json:"starred,omitempty"`

    // Trashed: Whether this file has been trashed.
    Trashed bool `json:"trashed,omitempty"`
}

type FileParentsCollection

type FileParentsCollection struct {
    // Id: The id of this parent
    Id  string `json:"id,omitempty"`

    // ParentLink: A link to get the metadata for this parent
    ParentLink string `json:"parentLink,omitempty"`
}

type FilesGetCall

type FilesGetCall struct {
    // contains filtered or unexported fields
}

func (*FilesGetCall) Do

func (c *FilesGetCall) Do() (*File, error)

func (*FilesGetCall) Projection

func (c *FilesGetCall) Projection(projection string) *FilesGetCall

Projection sets the optional parameter "projection": This parameter is deprecated and has no function.

func (*FilesGetCall) UpdateViewedDate

func (c *FilesGetCall) UpdateViewedDate(updateViewedDate bool) *FilesGetCall

UpdateViewedDate sets the optional parameter "updateViewedDate": Whether to update the view date after successfully retrieving the file.

type FilesInsertCall

type FilesInsertCall struct {
    // contains filtered or unexported fields
}

func (*FilesInsertCall) Do

func (c *FilesInsertCall) Do() (*File, error)

func (*FilesInsertCall) Media

func (c *FilesInsertCall) Media(r io.Reader) *FilesInsertCall

type FilesPatchCall

type FilesPatchCall struct {
    // contains filtered or unexported fields
}

func (*FilesPatchCall) Do

func (c *FilesPatchCall) Do() (*File, error)

func (*FilesPatchCall) NewRevision

func (c *FilesPatchCall) NewRevision(newRevision bool) *FilesPatchCall

NewRevision sets the optional parameter "newRevision": Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If not set or true, a new blob is created as head revision, and previous revisions are preserved (causing increased use of the user's data storage quota).

func (*FilesPatchCall) UpdateModifiedDate

func (c *FilesPatchCall) UpdateModifiedDate(updateModifiedDate bool) *FilesPatchCall

UpdateModifiedDate sets the optional parameter "updateModifiedDate": Controls updating the modified date of the file. If true, the modified date will be updated to the current time, regardless of whether other changes are being made. If false, the modified date will only be updated to the current time if other changes are also being made (changing the title, for example).

func (*FilesPatchCall) UpdateViewedDate

func (c *FilesPatchCall) UpdateViewedDate(updateViewedDate bool) *FilesPatchCall

UpdateViewedDate sets the optional parameter "updateViewedDate": Whether to update the view date after successfully updating the file.

type FilesService

type FilesService struct {
    // contains filtered or unexported fields
}

func NewFilesService

func NewFilesService(s *Service) *FilesService

func (*FilesService) Get

func (r *FilesService) Get(id string) *FilesGetCall

Get: Gets a file's metadata by id.

func (*FilesService) Insert

func (r *FilesService) Insert(file *File) *FilesInsertCall

Insert: Inserts a file, and any settable metadata or blob content sent with the request.

func (*FilesService) Patch

func (r *FilesService) Patch(id string, file *File) *FilesPatchCall

Patch: Updates file metadata and/or content. This method supports patch semantics.

func (*FilesService) Update

func (r *FilesService) Update(id string, file *File) *FilesUpdateCall

Update: Updates file metadata and/or content

type FilesUpdateCall

type FilesUpdateCall struct {
    // contains filtered or unexported fields
}

func (*FilesUpdateCall) Do

func (c *FilesUpdateCall) Do() (*File, error)

func (*FilesUpdateCall) Media

func (c *FilesUpdateCall) Media(r io.Reader) *FilesUpdateCall

func (*FilesUpdateCall) NewRevision

func (c *FilesUpdateCall) NewRevision(newRevision bool) *FilesUpdateCall

NewRevision sets the optional parameter "newRevision": Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If not set or true, a new blob is created as head revision, and previous revisions are preserved (causing increased use of the user's data storage quota).

func (*FilesUpdateCall) UpdateModifiedDate

func (c *FilesUpdateCall) UpdateModifiedDate(updateModifiedDate bool) *FilesUpdateCall

UpdateModifiedDate sets the optional parameter "updateModifiedDate": Controls updating the modified date of the file. If true, the modified date will be updated to the current time, regardless of whether other changes are being made. If false, the modified date will only be updated to the current time if other changes are also being made (changing the title, for example).

func (*FilesUpdateCall) UpdateViewedDate

func (c *FilesUpdateCall) UpdateViewedDate(updateViewedDate bool) *FilesUpdateCall

UpdateViewedDate sets the optional parameter "updateViewedDate": Whether to update the view date after successfully updating the file.

type Permission

type Permission struct {
    // AdditionalRoles: Any additional roles that this permission describes.
    AdditionalRoles []string `json:"additionalRoles,omitempty"`

    // Etag: An etag for this permission.
    Etag string `json:"etag,omitempty"`

    // Kind: The kind of this permission. This is always drive#permission
    Kind string `json:"kind,omitempty"`

    // Role: The role that this permission describes. (For example: reader,
    // writer, owner)
    Role string `json:"role,omitempty"`

    // Type: The type of permission (For example: user, group etc).
    Type string `json:"type,omitempty"`
}

type Service

type Service struct {
    BasePath string // API endpoint base URL

    Files *FilesService
    // contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

Package drive imports 10 packages (graph). Updated 2014-04-24. Refresh now. Tools for package owners.