-
Notifications
You must be signed in to change notification settings - Fork 0
Home
A channel is a means for uni- or bidirectional communication with an audience. Each channel is an interface which defines a set of operations. Together, these operations determine the capabilities of the channel.
interface SmsChannel
{
void sendSms(Audience recipients, Content message);
}
Features are configurable units of functionality that can be added to radio campaigns. Channels are the communication link between the audience and a campaign feature. Multiple channels may be available for one feature.
Interactive radio campaigns are schedulable and automated activities of audience interaction to exchange information.
Information available to campaigns for exchange over a channel is know as content. Content is available in different formats and languages. Examples of formats are text, audio, and video. Instances of data which renders content in a specific format and in a specific language are referred to as representations of that content.
class ContentRep
{
// ...
private ContentFormat format;
private Language lang;
}
class Content
{
// ...
private ContentRep[] representations;
}
Content formats conform to the RFC 6838 Media Type (also know as MIME type) specification.
enum MediaType
{
AudioMpeg,
TextPlain,
TextHtml,
// ...
}
interface ContentFormat
{
static pure MediaType mediaType();
}
class TextFormat : ContentFormat
{
static pure MediaType mediaType()
{
return MediaType.TextPlain;
}
}
class Mp3Format : ContentFormat
{
static pure MediaType mediaType()
{
return MediaType.AudioMpeg;
}
}
An adapter implements a channel interface against a specific backend, service or platform.
module nexmo_sms;
class NexmoSmsAdapter : SmsChannel
{
void sendSms(Audience recipients, Content message)
{
// code that talks to Nexmo's API
}
}
An audience is a group of people who have been engaged to participate in a campaign. The audience interacts with the features of a campaign over a channel.