أرسل صوتًا جماعيًا من القالب باستخدام ruby on rails
أرسل رسائل صوتية مجمعة (تحويل النص إلى كلام) إلى مجموعة من الهواتف الأرضية أو الهواتف المحمولة باستخدام ruby on rails
ruby on rails : وثائق API
- إنشاء مجموعة باستخدام ruby on rails
- الحصول على قائمة حقول المجموعة باستخدام ruby on rails
- إضافة حقل إلى مجموعة بها ruby on rails
- حذف حقل من مجموعة بها ruby on rails
- حذف جهة اتصال من مجموعة
- عيّن البلد إلى مجموعة بها ruby on rails
- الحصول على قائمة جهات اتصال المجموعة باستخدام ruby on rails
- إضافة جهة اتصال إلى مجموعة بها ruby on rails
- تعديل جهة اتصال مجموعة بها ruby on rails
- حذف جهة اتصال لمجموعة بها ruby on rails
- احصل على قائمة بقنوات الدردشة النشطة باستخدام ruby on rails
- إرسال رسالة عبر الدردشة مع ruby on rails
- إرسال ملف عبر الدردشة مع ruby on rails
- احصل على قائمة المحادثات في دردشة مع ruby on rails
- الحصول على قائمة بالرسائل من دردشة مع ruby on rails
- احصل على قائمة بالرسائل غير المقروءة من دردشة مع ruby on rails
أرسل صوتًا جماعيًا من القالب باستخدام ruby on rails
# net/http library is required
require 'net/http'
afilnet_class="voice";
afilnet_method="sendvoicetogroupfromtemplate";
afilnet_user="user";
afilnet_password="password";
afilnet_countrycode="34";
afilnet_idgroup="1";
afilnet_idtemplate="1000";
afilnet_scheduledatetime="";
afilnet_language="en";
afilnet_voice="Joanna";
afilnet_output="";
# Create an URL request
sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&countrycode="+afilnet_countrycode+"&idgroup="+afilnet_idgroup+"&idtemplate="+afilnet_idtemplate+"&scheduledatetime="+afilnet_scheduledatetime+"&language="+afilnet_language+"&voice="+afilnet_voice+"&output="+afilnet_output;
uri = URI(sUrl)
response = Net::HTTP.get(uri)
# net/http library is required
require 'net/http'
afilnet_class="voice";
afilnet_method="sendvoicetogroupfromtemplate";
afilnet_user="user";
afilnet_password="password";
afilnet_countrycode="34";
afilnet_idgroup="1";
afilnet_idtemplate="1000";
afilnet_scheduledatetime="";
afilnet_language="en";
afilnet_voice="Joanna";
afilnet_output="";
# Create an URL request
sUrl = "https://www.afilnet.com/api/http/";
uri = URI(sUrl)
response = Net::HTTP.post_form(uri, "class" => afilnet_class, "method" => afilnet_method, "user" => afilnet_user, "password" => afilnet_password, "countrycode" => afilnet_countrycode, "idgroup" => afilnet_idgroup, "idtemplate" => afilnet_idtemplate, "scheduledatetime" => afilnet_scheduledatetime, "language" => afilnet_language, "voice" => afilnet_voice, "output" => afilnet_output)
puts response.body
# net/http library is required
require 'net/http'
afilnet_class="voice";
afilnet_method="sendvoicetogroupfromtemplate";
afilnet_user="user";
afilnet_password="password";
afilnet_countrycode="34";
afilnet_idgroup="1";
afilnet_idtemplate="1000";
afilnet_scheduledatetime="";
afilnet_language="en";
afilnet_voice="Joanna";
afilnet_output="";
# Create an URL request
sUrl = "https://www.afilnet.com/api/basic/?class="+afilnet_class+"&method="+afilnet_method+"&countrycode="+afilnet_countrycode+"&idgroup="+afilnet_idgroup+"&idtemplate="+afilnet_idtemplate+"&scheduledatetime="+afilnet_scheduledatetime+"&language="+afilnet_language+"&voice="+afilnet_voice+"&output="+afilnet_output;
uri = URI(sUrl)
req = Net::HTTP::Get.new(uri)
req.basic_auth afilnet_user, afilnet_password
res = Net::HTTP.start(uri.hostname) {|http|
http.request(req)
}
puts res.body
# Savon library is required
require 'savon'
# We define vars
afilnet_class="voice";
afilnet_method="sendvoicetogroupfromtemplate";
afilnet_user="user";
afilnet_password="password";
afilnet_countrycode="34";
afilnet_idgroup="1";
afilnet_idtemplate="1000";
afilnet_scheduledatetime="";
afilnet_language="en";
afilnet_voice="Joanna";
afilnet_output="";
# We create the client instance
client = Savon.client(wsdl: 'https://www.afilnet.com/api/soap/index.php?wsdl', ssl_verify_mode: :none)
# We call to the service
res = client.call(:call, message: {
user: afilnet_user,
password: afilnet_password,
class: afilnet_class,
method: afilnet_method,
petition: "{\"countrycode\":\""+afilnet_countrycode+"\",\"idgroup\":\""+afilnet_idgroup+"\",\"idtemplate\":\""+afilnet_idtemplate+"\",\"scheduledatetime\":\""+afilnet_scheduledatetime+"\",\"language\":\""+afilnet_language+"\",\"voice\":\""+afilnet_voice+"\",\"output\":\""+afilnet_output+"\"}"
})
puts res.body
معامل | وصف | إجباري / اختياري |
---|---|---|
class=voice | الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها | إلزامي |
method=sendvoicetogroupfromtemplate | طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه | إلزامي |
user | المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك | إلزامي |
password | كلمة المرور لحساب Afilnet الخاص بك | إلزامي |
countrycode | voice.sendvoicetogroupfromtemplate_countrycode | إلزامي |
idgroup | معرّف المجموعة الذي يحتوي على جهات الاتصال التي سيتم إرسال المكالمة الصوتية إليها | إلزامي |
idtemplate | معرّف القالب الذي يحتوي على الرسالة التي سيتم تشغيل المكالمة الصوتية | إلزامي |
scheduledatetime | تاريخ ووقت الشحن بالتنسيق yyyy-mm-dd hh:mm:ss | اختياري |
language | اللغة التي سيتم تشغيل المكالمة الصوتية بها ، تحقق من الجدول المرفق لمعرفة القيم المتاحة | اختياري |
voice | الصوت الذي سيتم تشغيل المكالمة الصوتية به ، تحقق من الجدول المرفق لمعرفة القيم المتاحة | اختياري |
output | تنسيق الإخراج من النتيجة | اختياري |
عند تقديم طلبات ، ستتلقى الحقول التالية:
- status
-
النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
- id
- count
- credits
-
destinations
- messageid
- destination
- خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ
يتم سرد رموز الأخطاء المحتملة أدناه
الشفرة | وصف |
---|---|
MISSING_USER | المستخدم أو البريد الإلكتروني غير المدرجة |
MISSING_PASSWORD | كلمة المرور غير المدرجة |
MISSING_CLASS | الطبقة غير المدرجة |
MISSING_METHOD | طريقة غير المدرجة |
MISSING_COMPULSORY_PARAM | المعلمة الإجبارية غير المدرجة |
INCORRECT_USER_PASSWORD | مستخدم غير صحيح أو كلمة المرور |
INCORRECT_CLASS | فئة غير صحيحة |
INCORRECT_METHOD | طريقة غير صحيحة |
NOT_ACCESS_TO_GROUP | غير مسموح لك بالدخول إلى المجموعة المشار إليها |
NO_CREDITS | رصيدك غير كافٍ |
المعلمات:
- class : voice
- method : sendvoicetogroupfromtemplate
- user : user
- password : password
- countrycode : 34
- idgroup : 1
- idtemplate : 1000
- scheduledatetime :
- language : en
- voice : Joanna
- output :
طلب:
https://www.afilnet.com/api/http/?class=voice&method=sendvoicetogroupfromtemplate&user=user&password=password&countrycode=34&idgroup=1&idtemplate=1000&scheduledatetime=&language=en&voice=Joanna&output=
الملحق: قائمة اللغات والأصوات للمكالمات الصوتية المتاحة
ستجد في هذا الملحق كل التركيبات الممكنة للغات والأصوات التي يمكنك استخدامها عند إرسال رسائل مكالمات صوتية
لغة (language) | جنس | اسم (voice) |
---|---|---|
ar | female | Hoda |
ar | male | Naayf |
ar | male | Tarik |
ar | female | Zeina |
ar | female | Aisha |
ar | male | Farooq |
ar | male | Hussein |
ar | female | Amal |
bg | male | Ivan |
bn | female | Sushmita |
bn | male | Sayan |
ca | female | Conchita |
ca | female | Herena |
ca | female | Montserrat |
cs | male | Jakub |
da | female | Naja |
da | female | Helle |
da | male | Mads |
de | male | Hans |
de | female | Hedda |
de | female | Marlene |
de | male | Stefan |
de | female | Angela |
de | female | Vicki |
de-at | male | Michael |
de-ch | male | Karsten |
el | male | Stefanos |
el | female | Afroditi |
el | female | Sophia |
en | female | Jessica |
en | male | Joey |
en | female | Joanna |
en | female | Jane |
en | female | Ivy |
en | male | Guy |
en | male | Benjamin |
en | female | Kimberly |
en | male | Matthew |
en | female | Kendra |
en | female | Salli |
en | female | Zira |
en | male | Justin |
en-au | male | Russell |
en-au | female | Catherine |
en-au | female | Hayley |
en-au | female | Nicole |
en-ca | female | Alice |
en-ca | female | Heather |
en-gb | female | Rosie |
en-gb | female | Hazel |
en-gb | male | George |
en-gb | male | Brian |
en-gb | female | Amy |
en-gb | female | Emma |
en-gb-wls | male | Geraint |
en-ie | male | Sean |
en-in | female | Heera |
en-in | male | Ravi |
en-in | female | Raveena |
en-in | female | Priya |
en-in | female | Aditi |
es | male | Miguel |
es | female | Penelope |
es | female | Lupe |
es | male | Pablo |
es | male | Enrique |
es | female | Laura |
es | female | Linda |
es-ar | male | Diego |
es-cl | female | Francisca |
es-es | female | Lola |
es-mx | male | Raul |
es-mx | female | Mia |
es-mx | female | Hilda |
fi | female | Heidi |
fi | female | Milla |
fi | female | Evelin |
fr | female | Juliette |
fr | female | Celine |
fr | male | Mathieu |
fr | female | Lea |
fr | female | Hortense |
fr | male | Picart |
fr-ca | female | Chantal |
fr-ca | female | Harmonie |
fr-ca | female | Caroline |
fr-ch | male | Guillaume |
gu | male | Dinesh |
gu | female | Leela |
he | male | Asaf |
hi | female | Aadita |
hi | female | Kalpana |
hi | male | Hemant |
hr | male | Matej |
hu | male | Szabolcs |
id | male | Andika |
id | male | Arif |
id | female | Indah |
id | male | Reza |
id | female | Nurul |
is | male | Karl |
is | female | Dora |
it | male | Giorgio |
it | male | Cosimo |
it | male | Carla |
it | female | Bianca |
it | female | Lucia |
it | female | Gianna |
ja | female | Mizuki |
ja | male | Ichiro |
ja | female | Ayumi |
ja | male | Takumi |
ja | female | Haruka |
kn | female | Namratha |
kn | male | Shashank |
ko | female | Jina |
ko | female | Sumi |
ko | female | Yumi |
ko | female | Seoyeon |
ko | female | Heami |
ko | male | Himchan |
ko | male | Minho |
ml | female | Kirti |
ml | male | Vishnu |
ms | male | Rizwan |
nl | male | Ruben |
nl | female | Lotte |
nl | female | Hanna |
no | female | Hulda |
no | female | Liv |
pl | female | Paulina |
pl | female | Maja |
pl | male | Jan |
pl | male | Jacek |
pl | female | Ewa |
pt-br | female | Vitoria |
pt-br | male | Ricardo |
pt-br | female | Heloisa |
pt-br | male | Daniel |
pt-br | female | Camila |
pt-pt | male | Jeraldo |
pt-pt | female | Jacinda |
pt-pt | male | Henriques |
pt-pt | female | Amalia |
pt-pt | female | Abrielle |
pt-pt | female | Ines |
pt-pt | female | Helia |
pt-pt | male | Cristiano |
ro | female | Carmen |
ro | male | Andrei |
ru | female | Irina |
ru | female | Ekaterina |
ru | male | Maxim |
ru | male | Pavel |
ru | female | Tatyana |
sk | male | Filip |
sl | male | Lado |
sv | female | Astrid |
sv | female | Hedvig |
ta | male | Valluvar |
ta | male | Ganesh |
ta | female | Shruti |
te | male | Vijay |
te | female | Samantha |
te | female | Chitra |
th | male | Pattara |
th | female | Somsi |
tr | female | Filiz |
tr | female | Seda |
vi | female | Lien |
vi | male | Quan |
vi | male | Thao |
vi | female | Mai |
vi | male | An |
wls | female | Gwyneth |
zh-cn | female | Akemi |
zh-cn | male | Wang |
zh-cn | female | Lin |
zh-cn | female | Huihui |
zh-cn | male | Zhang |
zh-cn | female | Liu |
zh-cn | male | Huang |
zh-cn | male | Chen |
zh-cn | female | Zhiyu |
zh-cn | female | Yaoyao |
zh-cn | female | Lily |
zh-cn | male | Kangkang |
zh-tw | female | Hanhan |
zh-tw | female | Yating |
zh-tw | male | Zhiwei |