C# Class Visual.PhotoService

Inheritance: IPhotoService
Mostra file Open project: 23/23-api-dotnet Class Usage Examples

Public Methods

Method Description
Delete ( int photoId ) : bool

Delete a photo given an id

Get ( int photoId, bool includeUnpublished = false, string token = null ) : Photo
GetList ( ) : List

Returns a list of photos by default parameters

GetList ( PhotoListParameters requestParameters ) : List

Returns a list of photos by specific parameters

GetUploadToken ( string returnUrl, bool backgroundReturn, int userId, int albumId, string title, string description, string tags, bool publish, int validMinutes, int maxUploads ) : PhotoUploadToken
PhotoService ( IApiProvider provider ) : System
RedeemUploadToken ( string filename, string fileContentType, System filestream, string uploadToken ) : bool
Replace ( int photoId, string filename, string fileContentType, System filestream ) : bool

Replace a photo thumbnail given an id

Update ( int photoId, int albumId = null, string title = null, string description = null, string tags = null, bool published = null, string>.Dictionary variables = null ) : bool

Update a photo given the id

Upload ( string filename, string fileContentType, System filestream, int userId = null, int albumId = null, string title = null, string description = null, string tags = null, bool publish = null, string>.Dictionary variables = null ) : int?

Method Details

Delete() public method

Delete a photo given an id
public Delete ( int photoId ) : bool
photoId int
return bool

Get() public method

public Get ( int photoId, bool includeUnpublished = false, string token = null ) : Photo
photoId int
includeUnpublished bool
token string
return Visual.Domain.Photo

GetList() public method

Returns a list of photos by default parameters
public GetList ( ) : List
return List

GetList() public method

Returns a list of photos by specific parameters
public GetList ( PhotoListParameters requestParameters ) : List
requestParameters PhotoListParameters
return List

GetUploadToken() public method

public GetUploadToken ( string returnUrl, bool backgroundReturn, int userId, int albumId, string title, string description, string tags, bool publish, int validMinutes, int maxUploads ) : PhotoUploadToken
returnUrl string
backgroundReturn bool
userId int
albumId int
title string
description string
tags string
publish bool
validMinutes int
maxUploads int
return Visual.Domain.PhotoUploadToken

PhotoService() public method

public PhotoService ( IApiProvider provider ) : System
provider IApiProvider
return System

RedeemUploadToken() public method

public RedeemUploadToken ( string filename, string fileContentType, System filestream, string uploadToken ) : bool
filename string
fileContentType string
filestream System
uploadToken string
return bool

Replace() public method

Replace a photo thumbnail given an id
public Replace ( int photoId, string filename, string fileContentType, System filestream ) : bool
photoId int Id of photo
filename string The original filename
fileContentType string The meta content type of the file
filestream System An input stream for reading the file
return bool

Update() public method

Update a photo given the id
public Update ( int photoId, int albumId = null, string title = null, string description = null, string tags = null, bool published = null, string>.Dictionary variables = null ) : bool
photoId int
albumId int
title string
description string
tags string
published bool
variables string>.Dictionary
return bool

Upload() public method

public Upload ( string filename, string fileContentType, System filestream, int userId = null, int albumId = null, string title = null, string description = null, string tags = null, bool publish = null, string>.Dictionary variables = null ) : int?
filename string
fileContentType string
filestream System
userId int
albumId int
title string
description string
tags string
publish bool
variables string>.Dictionary
return int?