C# 클래스 PodioAPI.Services.FileService

파일 보기 프로젝트 열기: podio/podio-dotnet

공개 메소드들

메소드 설명
AttachFile ( int fileId, string refType, int refId ) : System.Threading.Tasks.Task

Attaches the uploaded file to the given object.

Podio API Reference: https://developers.podio.com/doc/files/attach-file-22518

CopyFile ( int fileId ) : Task

Copies the file, which makes it available for attaching to another object.

Podio API Reference: https://developers.podio.com/doc/files/copy-file-89977

DeleteFile ( int fileId ) : System.Threading.Tasks.Task

Deletes the file with the given id

Podio API Reference: https://developers.podio.com/doc/files/delete-file-22453

DownloadFile ( FileAttachment fileAttachment ) : Task

To directly download the file of a FileAttachment

For more information see https://developers.podio.com/examples/files

FileService ( Podio currentInstance ) : System.Collections.Generic
GetFile ( int fileId ) : Task

Returns the file with the given id

Podio API Reference: https://developers.podio.com/doc/files/get-file-22451

GetFiles ( string attachedTo = null, string createdBy = null, string createdOn = null, string filetype = null, string hostedBy = null, int limit = 20, string sortBy = null, bool sortDesc = false ) : Task>

Returns a list of all files matching the given filters and sorted by the specified attribute.

Podio API Reference: https://developers.podio.com/doc/files/get-files-4497983

GetFilesOnApp ( int appId, string attachedTo = null, string createdBy = null, string createdOn = null, string filetype = null, string hostedBy = null, int limit = 20, int offset, string sortBy = null, bool sortDesc = false ) : Task>

Returns all the files related to the items in the application. This includes files both on the item itself and in comments on the item.

Podio API Reference: https://developers.podio.com/doc/files/get-files-on-app-22472

GetFilesOnSpace ( int spaceId, string attachedTo = null, string createdBy = null, string createdOn = null, string filetype = null, string hostedBy = null, int limit = 20, int offset, string sortBy = null, bool sortDesc = false ) : Task>

Returns all the files on the space order by the file name.

Podio API Reference: https://developers.podio.com/doc/files/get-files-on-space-22471

ReplaceFile ( int oldFileId, int fileId ) : System.Threading.Tasks.Task

Marks the current file as an replacement for the old file. Only files with type of "attachment" can be replaced.

Podio API Reference: https://developers.podio.com/doc/files/replace-file-22450

UpdateFile ( int fileId, string description ) : System.Threading.Tasks.Task

Used to update the description of the file.

Podio API Reference: https://developers.podio.com/doc/files/update-file-22454

UploadFile ( string fileName, byte data, string mimeType ) : Task

Uploads a new file

Podio API Reference: https://developers.podio.com/doc/files/upload-file-1004361

UploadFile ( string filePath, string fileName ) : Task

Uploads a new file

Podio API Reference: https://developers.podio.com/doc/files/upload-file-1004361

UploadFileFromUrl ( string fileUrl ) : Task

Upload a new file from URL

메소드 상세

AttachFile() 공개 메소드

Attaches the uploaded file to the given object.

Podio API Reference: https://developers.podio.com/doc/files/attach-file-22518

public AttachFile ( int fileId, string refType, int refId ) : System.Threading.Tasks.Task
fileId int
refType string /// The type of object the file should be attached to. /// Valid objects are "status", "item", "comment", "space", or "task". ///
refId int
리턴 System.Threading.Tasks.Task

CopyFile() 공개 메소드

Copies the file, which makes it available for attaching to another object.

Podio API Reference: https://developers.podio.com/doc/files/copy-file-89977

public CopyFile ( int fileId ) : Task
fileId int
리턴 Task

DeleteFile() 공개 메소드

Deletes the file with the given id

Podio API Reference: https://developers.podio.com/doc/files/delete-file-22453

public DeleteFile ( int fileId ) : System.Threading.Tasks.Task
fileId int
리턴 System.Threading.Tasks.Task

DownloadFile() 공개 메소드

To directly download the file of a FileAttachment

For more information see https://developers.podio.com/examples/files

public DownloadFile ( FileAttachment fileAttachment ) : Task
fileAttachment PodioAPI.Models.FileAttachment
리턴 Task

FileService() 공개 메소드

public FileService ( Podio currentInstance ) : System.Collections.Generic
currentInstance Podio
리턴 System.Collections.Generic

GetFile() 공개 메소드

Returns the file with the given id

Podio API Reference: https://developers.podio.com/doc/files/get-file-22451

public GetFile ( int fileId ) : Task
fileId int
리턴 Task

GetFiles() 공개 메소드

Returns a list of all files matching the given filters and sorted by the specified attribute.

Podio API Reference: https://developers.podio.com/doc/files/get-files-4497983

public GetFiles ( string attachedTo = null, string createdBy = null, string createdOn = null, string filetype = null, string hostedBy = null, int limit = 20, string sortBy = null, bool sortDesc = false ) : Task>
attachedTo string /// The type of the entity the file is attached to. Can be one of {"item", "status", "task" and /// "space"} ///
createdBy string /// The entities that created the file. See auth objects on the view area in Podio API /// documentation for details. ///
createdOn string /// The from and to date the file was created between. For valid operations see date filtering /// under the view area in Podio API documentation. ///
filetype string The type of the file. Can be one of {"image", "application", "video", "text", "audio"}.
hostedBy string /// Which provider actually hosts the files. Currently can be one of {"podio", "google", "boxnet", /// "dropbox", "evernote", "live", "sharefile", "sugarsync", "yousendit"}. ///
limit int The maximum number of files to return Default value: 20
sortBy string How the files should be sorted. Can be one of {"name", "created_on"} Default value: name
sortDesc bool true for to sort in descending order, false in ascending Default value: false
리턴 Task>

GetFilesOnApp() 공개 메소드

Returns all the files related to the items in the application. This includes files both on the item itself and in comments on the item.

Podio API Reference: https://developers.podio.com/doc/files/get-files-on-app-22472

public GetFilesOnApp ( int appId, string attachedTo = null, string createdBy = null, string createdOn = null, string filetype = null, string hostedBy = null, int limit = 20, int offset, string sortBy = null, bool sortDesc = false ) : Task>
appId int App Id
attachedTo string /// The type of the entity the file is attached to. Can be one of {"item", "status", "task" and /// "space"} ///
createdBy string /// The entities that created the file. See auth objects on the view area in Podio API /// documentation for details. ///
createdOn string /// The from and to date the file was created between. For valid operations see date filtering /// under the view area in Podio API documentation. ///
filetype string The type of the file. Can be one of {"image", "application", "video", "text", "audio"}.
hostedBy string /// Which provider actually hosts the files. Currently can be one of {"podio", "google", "boxnet", /// "dropbox", "evernote", "live", "sharefile", "sugarsync", "yousendit"}. ///
limit int The maximum number of files to return Default value: 20
offset int The offset to use when returning files to be used for pagination. Default value: 0
sortBy string How the files should be sorted. Can be one of {"name", "created_on"} Default value: name
sortDesc bool true for to sort in descending order, false in ascending Default value: false
리턴 Task>

GetFilesOnSpace() 공개 메소드

Returns all the files on the space order by the file name.

Podio API Reference: https://developers.podio.com/doc/files/get-files-on-space-22471

public GetFilesOnSpace ( int spaceId, string attachedTo = null, string createdBy = null, string createdOn = null, string filetype = null, string hostedBy = null, int limit = 20, int offset, string sortBy = null, bool sortDesc = false ) : Task>
spaceId int
attachedTo string /// The type of the entity the file is attached to. Can be one of {"item", "status", "task" and /// "space"} ///
createdBy string /// The entities that created the file. See auth objects on the view area in Podio API /// documentation for details. ///
createdOn string /// The from and to date the file was created between. For valid operations see date filtering /// under the view area in Podio API documentation. ///
filetype string The type of the file. Can be one of {"image", "application", "video", "text", "audio"}.
hostedBy string /// Which provider actually hosts the files. Currently can be one of {"podio", "google", "boxnet", /// "dropbox", "evernote", "live", "sharefile", "sugarsync", "yousendit"}. ///
limit int The maximum number of files to return Default value: 20
offset int The offset to use when returning files to be used for pagination. Default value: 0
sortBy string How the files should be sorted. Can be one of {"name", "created_on"} Default value: name
sortDesc bool true for to sort in descending order, false in ascending Default value: false
리턴 Task>

ReplaceFile() 공개 메소드

Marks the current file as an replacement for the old file. Only files with type of "attachment" can be replaced.

Podio API Reference: https://developers.podio.com/doc/files/replace-file-22450

public ReplaceFile ( int oldFileId, int fileId ) : System.Threading.Tasks.Task
oldFileId int The id of the old file that should be replacd with the new file
fileId int
리턴 System.Threading.Tasks.Task

UpdateFile() 공개 메소드

Used to update the description of the file.

Podio API Reference: https://developers.podio.com/doc/files/update-file-22454

public UpdateFile ( int fileId, string description ) : System.Threading.Tasks.Task
fileId int
description string The new description of the file
리턴 System.Threading.Tasks.Task

UploadFile() 공개 메소드

Uploads a new file

Podio API Reference: https://developers.podio.com/doc/files/upload-file-1004361

public UploadFile ( string fileName, byte data, string mimeType ) : Task
fileName string
data byte
mimeType string
리턴 Task

UploadFile() 공개 메소드

Uploads a new file

Podio API Reference: https://developers.podio.com/doc/files/upload-file-1004361

public UploadFile ( string filePath, string fileName ) : Task
filePath string Full physical path to the file
fileName string File Name with extension
리턴 Task

UploadFileFromUrl() 공개 메소드

Upload a new file from URL
public UploadFileFromUrl ( string fileUrl ) : Task
fileUrl string
리턴 Task