C# Class CallfireApiClient.Api.CallsTexts.MediaApi

ファイルを表示 Open project: CallFire/callfire-api-client-csharp

Public Methods

Method Description
Get ( long id, string fields = null ) : Media

Returns a single Media instance for a given media file id. This is the metadata for the media only.No content data is returned from this API.

GetData ( long id, MediaType type ) : Stream

Returns media file's data as stream, in case there is no appropriate MediaType for your media file pass MediaType.UNKNOWN

GetData ( string key, MediaType type ) : Stream

Returns media file's data as stream

Upload ( string pathToFile, string name = null ) : ResourceId

Upload media file to account

Private Methods

Method Description
MediaApi ( RestApiClient client ) : System.IO

Method Details

Get() public method

Returns a single Media instance for a given media file id. This is the metadata for the media only.No content data is returned from this API.
in case HTTP response code is 400 - Bad request, the request was formatted improperly. in case HTTP response code is 401 - Unauthorized, API Key missing or invalid. in case HTTP response code is 403 - Forbidden, insufficient permissions. in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist. in case HTTP response code is 500 - Internal Server Error. in case HTTP response code is something different from codes listed above. in case error has occurred in client.
public Get ( long id, string fields = null ) : Media
id long id of media file
fields string Limit text fields returned. Example fields=limit,offset,items(id,message)
return CallfireApiClient.Api.CallsTexts.Model.Media

GetData() public method

Returns media file's data as stream, in case there is no appropriate MediaType for your media file pass MediaType.UNKNOWN
in case HTTP response code is 400 - Bad request, the request was formatted improperly. in case HTTP response code is 401 - Unauthorized, API Key missing or invalid. in case HTTP response code is 403 - Forbidden, insufficient permissions. in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist. in case HTTP response code is 500 - Internal Server Error. in case HTTP response code is something different from codes listed above. in case error has occurred in client.
public GetData ( long id, MediaType type ) : Stream
id long id of media file
type MediaType media type: jpeg, png, gif, mp3, mp4, wav
return System.IO.Stream

GetData() public method

Returns media file's data as stream
in case HTTP response code is 400 - Bad request, the request was formatted improperly. in case HTTP response code is 401 - Unauthorized, API Key missing or invalid. in case HTTP response code is 403 - Forbidden, insufficient permissions. in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist. in case HTTP response code is 500 - Internal Server Error. in case HTTP response code is something different from codes listed above. in case error has occurred in client.
public GetData ( string key, MediaType type ) : Stream
key string key of media file
type MediaType media type: jpeg, png, gif, mp3, mp4, wav
return System.IO.Stream

Upload() public method

Upload media file to account
in case HTTP response code is 400 - Bad request, the request was formatted improperly. in case HTTP response code is 401 - Unauthorized, API Key missing or invalid. in case HTTP response code is 403 - Forbidden, insufficient permissions. in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist. in case HTTP response code is 500 - Internal Server Error. in case HTTP response code is something different from codes listed above. in case error has occurred in client.
public Upload ( string pathToFile, string name = null ) : ResourceId
pathToFile string
name string name for file uploaded
return CallfireApiClient.Api.Common.Model.ResourceId