C# Класс CallfireApiClient.Api.Campaigns.CampaignSoundsApi

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
CampaignSoundsApi ( RestApiClient client ) : System
CreateFromTts ( TextToSpeech textToSpeech ) : ResourceId
RecordViaPhone ( CallCreateSound callCreateSound ) : ResourceId
Upload ( string pathToFile, string name = null ) : ResourceId

Описание методов

CreateFromTtsAndGetSoundDetails() публичный Метод

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)
Результат CallfireApiClient.Api.Campaigns.Model.CampaignSound

Delete() публичный Метод

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
Результат void

Find() публичный Метод

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
Результат Page

Get() публичный Метод

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)
Результат CallfireApiClient.Api.Campaigns.Model.CampaignSound

GetMp3() публичный Метод

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
Результат Stream

GetWav() публичный Метод

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
Результат Stream

RecordViaPhoneAndGetSoundDetails() публичный Метод

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)
Результат CallfireApiClient.Api.Campaigns.Model.CampaignSound

UploadAndGetSoundDetails() публичный Метод

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
Результат CallfireApiClient.Api.Campaigns.Model.CampaignSound