C# Class CallfireApiClient.Api.Campaigns.CampaignSoundsApi

Datei anzeigen Open project: CallFire/callfire-api-client-csharp

Public Methods

Method Description
CreateFromTtsAndGetSoundDetails ( TextToSpeech textToSpeech, string fields ) : CampaignSound

Use this API to create a sound file via a supplied string of text.

Delete ( long id ) : void

Delete a single CampaignSound instance for a given campaign sound id.

Find ( FindSoundsRequest request ) : Page

Find all campaign sounds that were created by the user. These are all of the available sounds to be used in campaigns.

Get ( long id, string fields = null ) : CampaignSound

Returns a single CampaignSound instance for a given campaign sound id. This is the meta data to the sounds only.No audio data is returned from this API.

GetMp3 ( long id ) : Stream

Download the MP3 version of the hosted file.

GetWav ( long id ) : Stream

Download the WAV version of the hosted file.

RecordViaPhoneAndGetSoundDetails ( CallCreateSound callCreateSound, string fields ) : CampaignSound

Use this API to create a sound via phone call. Supply the required phone number in the CallCreateSound object inside of the request, and the user will receive a call shortly after with instructions on how to record a sound over the phone.

UploadAndGetSoundDetails ( string pathToFile, string name = null ) : CampaignSound

Upload a MP3 or WAV file to account

Private Methods

Method Description
CampaignSoundsApi ( RestApiClient client ) : System
CreateFromTts ( TextToSpeech textToSpeech ) : ResourceId
RecordViaPhone ( CallCreateSound callCreateSound ) : ResourceId
Upload ( string pathToFile, string name = null ) : ResourceId

Method Details

CreateFromTtsAndGetSoundDetails() public method

Use this API to create a sound file via a supplied string of text.
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 CreateFromTtsAndGetSoundDetails ( TextToSpeech textToSpeech, string fields ) : CampaignSound
textToSpeech TextToSpeech TTS object to create
fields string Limit text fields returned. Example fields=limit,offset,items(id,message)
return CallfireApiClient.Api.Campaigns.Model.CampaignSound

Delete() public method

Delete a single CampaignSound instance for a given campaign sound id.
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 Delete ( long id ) : void
id long id of campaign sound
return void

Find() public method

Find all campaign sounds that were created by the user. These are all of the available sounds to be used in campaigns.
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 Find ( FindSoundsRequest request ) : Page
request CallfireApiClient.Api.CallsTexts.Model.Request.FindSoundsRequest request object with different fields for search
return Page

Get() public method

Returns a single CampaignSound instance for a given campaign sound id. This is the meta data to the sounds only.No audio 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 ) : CampaignSound
id long id of campaign sound
fields string Limit text fields returned. Example fields=limit,offset,items(id,message)
return CallfireApiClient.Api.Campaigns.Model.CampaignSound

GetMp3() public method

Download the MP3 version of the hosted file.
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 GetMp3 ( long id ) : Stream
id long id of sound
return Stream

GetWav() public method

Download the WAV version of the hosted file.
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 GetWav ( long id ) : Stream
id long id id of sound
return Stream

RecordViaPhoneAndGetSoundDetails() public method

Use this API to create a sound via phone call. Supply the required phone number in the CallCreateSound object inside of the request, and the user will receive a call shortly after with instructions on how to record a sound over the phone.
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 RecordViaPhoneAndGetSoundDetails ( CallCreateSound callCreateSound, string fields ) : CampaignSound
callCreateSound CallCreateSound request object to create campaign sound
fields string Limit text fields returned. Example fields=limit,offset,items(id,message)
return CallfireApiClient.Api.Campaigns.Model.CampaignSound

UploadAndGetSoundDetails() public method

Upload a MP3 or WAV 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 UploadAndGetSoundDetails ( string pathToFile, string name = null ) : CampaignSound
pathToFile string path to MP3 or WAV file
name string contact list name
return CallfireApiClient.Api.Campaigns.Model.CampaignSound