github.com/CyCoreSystems/ari@v4.8.4+incompatible/sound.go (about) 1 package ari 2 3 // Sound represents a communication path to 4 // the asterisk server for Sound resources 5 type Sound interface { 6 7 // List returns available sounds limited by the provided filters. 8 // Valid filters are "lang", "format", and nil (no filter) 9 List(filters map[string]string, keyFilter *Key) ([]*Key, error) 10 11 // Data returns the Sound's data 12 Data(key *Key) (*SoundData, error) 13 } 14 15 // SoundData describes a media file which may be played back 16 type SoundData struct { 17 // Key is the cluster-unique identifier for this sound 18 Key *Key `json:"key"` 19 20 Formats []FormatLangPair `json:"formats"` 21 ID string `json:"id"` 22 Text string `json:"text,omitempty"` 23 } 24 25 // FormatLangPair describes the format and language of a sound file 26 type FormatLangPair struct { 27 Format string `json:"format"` 28 Language string `json:"language"` 29 }