diff --git a/README.md b/README.md index 43f36ef..fc35abc 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ # restcomm-sdk-java The Java SDK for RestComm REST API + +- To build the Project, after downloading the zip and extracting it from GitHub, navigate to the folder containing the pom.xml +file and buiild the project using the following command in the terminal + +```sh +$ mvn package +``` +- Now when this command is executed, the compilation,validation and testing will be done and after the successful completion of them, a jar file will be generated in the target folder. + +- Include the jar file in your build path to get Started. + +Java version: 1.8.0_131 + +This is an SDK for RestComm REST API, +To know more about Restcomm, please refer to http://documentation.telestax.com/ + +Regarding issues, please refer to https://github.com/RestComm/restcomm-sdk-java/issues + diff --git a/restcomm-connect.java.sdk/src/main/asciidoc/Email.adoc b/restcomm-connect.java.sdk/src/main/asciidoc/Email.adoc new file mode 100644 index 0000000..e69de29 diff --git a/restcomm-connect.java.sdk/src/main/asciidoc/Notifications.adoc b/restcomm-connect.java.sdk/src/main/asciidoc/Notifications.adoc new file mode 100644 index 0000000..b7877d0 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/asciidoc/Notifications.adoc @@ -0,0 +1,283 @@ +<<<<<<< HEAD += Restcomm JAVA Sdk - Notifications + +[[Notifications]] +== Notifications + +A *Notification* resource represents a single log entry made by RestComm while handling your calls or your use of the Restful APIs. It is very useful for debugging purposes. The Notifications list resource represents the set of notifications generated for an account. + + +From here onwards, by a Notification, we refer to a Notification Resource Object + +=== Fetching a Notification + +A Notification with a given Sid can be fetched by the following code snippet +.... + String Sid; + . + . + . + Notification CallNotification = Notification.getNotification(Sid); +.... + +=== Accessing the Fetched Notification + +A Field of a Notification Object can be accessed by using the corresponding getMethod for that Field +.... + String Message; + Message = CallNotification.getMessage_text(). +.... + +==== List of Fields +[cols=",",options="header",] +|=============================================================================================================================================================================================================================== +|Property |Method +|Sid | getSid(). +|DateCreated |getDate_created(). +|DateUpdated |getDate_updated(). +|AccountSid |getAccount_sid(). +|CallSid |getCall_sid(). +|ApiVersion |getApi_version(). +|Log |getLog(). +|ErrorCode |getErrorCode(). +|MoreInfo |getMore_info(). +|MessageText |getMessage_text(). +|MessageDate |getMessage_date(). +|RequestUrl |getRequest_url(). +|RequestMethod |getRequest_method(). +|RequestVariables |getRequest_variables(). +|ResponseHeaders |getResponse_headers(). +|ResponseBody |getResponse_body(). +|Uri |getUri(). +|=============================================================================================================================================================================================================================== + +== Fetching List of Notifications + +=== Fetching the Default List + +The Default Notifications List can be fetched by using the following code + +.... + NotificationList List = NotificationList.getList(); +.... + +=== Fetching a Filtered List + +A Filtered Notifications List can be fetched by using the getFilteredList() method of the class NotificationList + +.... + NotificationList List = NotificationList.getFilteredList().ErrorCode("1").MessageText("Hello World").Filter(); +.... + +The above mentioned code snippet fetches the Notifications with ErrorCode = 1 and MessageText = Hello World + +==== List of FilterParameters +[cols=",",options="header",] +|=============================================================================================================================================================================================================================== +|Parameter |Method +|StartTime |StartTime(). +|EndTime |EndTime(). +|ErrorCode |ErrorCode(). +|MessageText |MessageText(). +|RequestUrl |RequestUrl(). +|=============================================================================================================================================================================================================================== + +In addition to these, the regular Paging paramters can also be used similar to the FilterParameters +.... + NotificationList List = NotificationList.getFilteredList().PageSize("1").Filter(). +.... + +==== List of PagingParameters +[cols=",",options="header",] +|=============================================================================================================================================================================================================================== +|Paramter |Method +|Page |Page(). +|NumPages |NumPages(). +|PageSize |PageSize(). +|Total |Total(). +|Start |Start(). +|End |End(). +|=============================================================================================================================================================================================================================== + +== Accessing the Fetched NotificationList + +The size of the Fetched List can be known by +.... + int size = CallNotification.size(); +.... + +The a Notification from the fetched NotificationList Object can be obtained by +.... + Notification a = CallNotification.get(1); +.... + +== Additional Paging Information +We can also access the Additional Paging Information by using the Methods of NotificationList +.... + String Uri; + Uri = CallNotification.getpreviouspageuri(); +.... + +The API returns URIs to the next, previous, first and last pages of the returned list as shown in the table below: + +=== Request Parameters + +[cols=",",options="header",] +|============================================================ +|Parameter |Method +|Uri |geturi(). +|Firstpageuri |getfirstpageuri(). +|Nextpageuri |getnextpageuri(). +|Previouspageuri |getpreviouspageuri(). +|Lastpageuri |getlastpageuri(). +|============================================================ + +NOTE: The Default Account from which we fetch the Notifications is the Main Account. + +If we want to change the Default Account to any specific SubAccount , use the following method before Fetching the Notification(s) +.... + NotifactionList.SubAccountAccess(SubAccountSid); + NotificationList List = NotificationList.getList(); +.... +======= += Restcomm JAVA Sdk - Notifications + +[[Notifications]] +== Notifications + +A *Notification* resource represents a single log entry made by RestComm while handling your calls or your use of the Restful APIs. It is very useful for debugging purposes. The Notifications list resource represents the set of notifications generated for an account. + + +From here onwards, by a Notification, we refer to a Notification Resource Object + +=== Fetching a Notification + +A Notification with a given Sid can be fetched by the following code snippet +.... + String Sid; + . + . + . + Notification CallNotification = Notification.getNotification(Sid); +.... + +=== Accessing the Fetched Notification + +A Field of a Notification Object can be accessed by using the corresponding getMethod for that Field +.... + String Message; + Message = CallNotification.getMessage_text(). +.... + +==== List of Fields +[cols=",",options="header",] +|=============================================================================================================================================================================================================================== +|Property |Method +|Sid | getSid(). +|DateCreated |getDate_created(). +|DateUpdated |getDate_updated(). +|AccountSid |getAccount_sid(). +|CallSid |getCall_sid(). +|ApiVersion |getApi_version(). +|Log |getLog(). +|ErrorCode |getErrorCode(). +|MoreInfo |getMore_info(). +|MessageText |getMessage_text(). +|MessageDate |getMessage_date(). +|RequestUrl |getRequest_url(). +|RequestMethod |getRequest_method(). +|RequestVariables |getRequest_variables(). +|ResponseHeaders |getResponse_headers(). +|ResponseBody |getResponse_body(). +|Uri |getUri(). +|=============================================================================================================================================================================================================================== + +== Fetching List of Notifications + +=== Fetching the Default List + +The Default Notifications List can be fetched by using the following code + +.... + NotificationList List = NotificationList.getList(); +.... + +=== Fetching a Filtered List + +A Filtered Notifications List can be fetched by using the getFilteredList() method of the class NotificationList + +.... + NotificationList List = NotificationList.getFilteredList().ErrorCode("1").MessageText("Hello World").Filter(); +.... + +The above mentioned code snippet fetches the Notifications with ErrorCode = 1 and MessageText = Hello World + +==== List of FilterParameters +[cols=",",options="header",] +|=============================================================================================================================================================================================================================== +|Parameter |Method +|StartTime |StartTime(). +|EndTime |EndTime(). +|ErrorCode |ErrorCode(). +|MessageText |MessageText(). +|RequestUrl |RequestUrl(). +|=============================================================================================================================================================================================================================== + +In addition to these, the regular Paging paramters can also be used similar to the FilterParameters +.... + NotificationList List = NotificationList.getFilteredList().PageSize("1").Filter(). +.... + +==== List of PagingParameters +[cols=",",options="header",] +|=============================================================================================================================================================================================================================== +|Paramter |Method +|Page |Page(). +|NumPages |NumPages(). +|PageSize |PageSize(). +|Total |Total(). +|Start |Start(). +|End |End(). +|=============================================================================================================================================================================================================================== + +== Accessing the Fetched NotificationList + +The size of the Fetched List can be known by +.... + int size = CallNotification.size(); +.... + +The a Notification from the fetched NotificationList Object can be obtained by +.... + Notification a = CallNotification.get(1); +.... + +== Additional Paging Information +We can also access the Additional Paging Information by using the Methods of NotificationList +.... + String Uri; + Uri = CallNotification.getpreviouspageuri(); +.... + +The API returns URIs to the next, previous, first and last pages of the returned list as shown in the table below: + +=== Request Parameters + +[cols=",",options="header",] +|============================================================ +|Parameter |Method +|Uri |geturi(). +|Firstpageuri |getfirstpageuri(). +|Nextpageuri |getnextpageuri(). +|Previouspageuri |getpreviouspageuri(). +|Lastpageuri |getlastpageuri(). +|============================================================ + +NOTE: The Default Account from which we fetch the Notifications is the Main Account. + +If we want to change the Default Account to any specific SubAccount , use the following method before Fetching the Notification(s) +.... + NotifactionList.SubAccountAccess(SubAccountSid); + NotificationList List = NotificationList.getList(); +.... +>>>>>>> 6f0540ae115c331fea5c5d11c53a855be46eb232 diff --git a/restcomm-connect.java.sdk/src/main/asciidoc/SMS.adoc b/restcomm-connect.java.sdk/src/main/asciidoc/SMS.adoc new file mode 100644 index 0000000..13b67b6 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/asciidoc/SMS.adoc @@ -0,0 +1,155 @@ + += Restcomm JAVA Sdk - SMSMessages + +[[SMSMessages]] +== SMSMessages + +A *SMS Message* resource represents an inbound or outbound SMS message. + +=== Fetching an SMS + +A SMS with a given Sid can be fetched by implementing the following code snippet +.... + String Sid; + . + . + . + SMS newSMS = SMS.getSMS(Sid); +.... + +=== Accessing the Fetched SMS + +A Field of a SMS Object can be accessed by using the corresponding getMethod for that Field +.... + String MessageBody; + MessageBody = CallNotification.getBody(). +.... + +==== List of Fields +[cols=",",options="header",] +|======================================================================================================== +|Field |Method +|Sid |getSid(). +|DateCreated |getDate_created(). +|DateUpdated |getDate_updated(). +|DateSent |getDate_sent(). +|AccountSid |getAccount_sid(). +|From |getFrom(). +|To |getTo(). +|Body |getBody(). +|Status |getStatus(). +|Direction |getDirection(). +|ApiVersion |getApi_version(). +|Uri |getUri(). +|======================================================================================================== + +=== Sending a New SMS + +A new SMS Message can be sent by using the newSMS() method of the SMS class. +.... + String FromUser; + String ToUser; + String MessageBody; + . + . + . + SMS.newSMS().From(FromUser).To(ToUser).Body(MessageBody).sendSMS(); +.... + +In order to capture the new SMS sent, +.... + SMS message = SMS.newSMS().From(FromUser).To(ToUser).Body(MessageBody).sendSMS(); +.... + +== Fetching List of SMSMessages + +=== Fetching the Default List + +The Default SMSMessage List can be fetched by using the following code + +.... + SMSList List = SMSList.getList(); +.... + +=== Fetching a Filtered List + +A Filtered SMS List can be fetched by using the getFilteredList() method of the class SMSList + +.... + SMSList List = SMSList.getFilteredList().From("+1234").Filter(); +.... + +The above mentioned code snippet fetches all the SMSMessages sent from = +1234 + +==== List of FilterParameters +[cols=",",options="header",] +|=========================================================================================================================================================================================================================================================================== +|Parameter |Methods +|To |To(). +|From |From(). +|StartTime |Start_time(). +|EndTime |End_time(). +|Body |Body(). +|=========================================================================================================================================================================================================================================================================== +In addition to these, the regular Paging paramters can also be used similar to the FilterParameters +.... + NotificationList List = NotificationList.getFilteredList().From("+1234").PageSize("1").Filter(). +.... +The above mentioned code snippet fetches all the SMSMessages sent from = +1234 in pages of size 1 + +==== List of PagingParameters +[cols=",",options="header",] +|=============================================================================================================================================================================================================================== +|Paramter |Method +|Page |Page(). +|NumPages |NumPages(). +|PageSize |PageSize(). +|Total |Total(). +|Start |Start(). +|End |End(). +|=============================================================================================================================================================================================================================== + +== Accessing the Fetched SMSList + +The size of the Fetched List can be known by +.... + SMSList MessageList; + . + . + . + int size = MessageList.size(); +.... + +The a SMS from the fetched SMSList Object can be obtained by +.... + SMS a =MessageList.get(1); +.... + +== Additional Paging Information +We can also access the Additional Paging Information +.... + String Uri; + Uri = MessageList.getpreviouspageuri(); +.... + +The API returns URIs to the next, previous, first and last pages of the returned list as shown in the table below: + +=== Request Parameters + +[cols=",",options="header",] +|============================================================ +|Parameter |Method +|Uri |geturi(). +|Firstpageuri |getfirstpageuri(). +|Nextpageuri |getnextpageuri(). +|Previouspageuri |getpreviouspageuri(). +|Lastpageuri |getlastpageuri(). +|============================================================ + +NOTE: The Default Account from which we fetch the SMSList is the Main Account. + +If we want to change the Default Account to any specific SubAccount , use the following method before Fetching the Notification(s) +.... + SMSList.SubAccountAccess(SubAccountSid); + SMSList List = SMSList.getList(); +.... diff --git a/restcomm-connect.java.sdk/src/main/asciidoc/Transcriptions.adoc b/restcomm-connect.java.sdk/src/main/asciidoc/Transcriptions.adoc new file mode 100644 index 0000000..346d259 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/asciidoc/Transcriptions.adoc @@ -0,0 +1,127 @@ += Restcomm JAVA Sdk - Transcriptions + +[[Transcriptions]] +== Transcriptions + +A Transcription resource represents a transcription of a recording. A transcription is a text version of a recording produced using automatic speech recognition. + +=== Fetching a Transcription + +A Transcription with a given Sid can be fetched by the following code snippet +.... + String Sid; + . + . + . + Transcription NewTranscription = Transcription.getTranscription(Sid); +.... + +=== Accessing the Fetched Transcription + +A Field of a Transcription Object can be accessed by using the corresponding getMethod for that Field +.... + String TranscriptionText; + TranscriptionText = NewTranscription.getMessage_text(). +.... + +==== List of Fields +[cols=",",options="header",] +|====================================================================================================================== +|Fields |Method +|Sid |getSid(). +|DateCreated |getDate_created(). +|DateUpdated |getDate_updated(). +|AccountSid |getAccount_sid(). +|Status |getStatus(). +|RecordingSid |getRecording_sid(). +|Duration |getDuration(). +|TranscriptionText |getTranscription_text(). +|Uri |getUri(). +|====================================================================================================================== + +== Fetching List of Transcriptions + +=== Fetching the Default List + +The Default Transcriptions List can be fetched by using the following code + +.... + TranscriptionList List = TranscriptionList.getList(); +.... + +=== Fetching a Filtered List + +A Filtered Transcriptions List can be fetched by using the getFilteredList() method of the class TranscriptionList + +.... + TranscriptionList List = TranscriptionList.getFilteredList().TranscriptionText("Hello World").Filter(); +.... + +The above mentioned code snippet fetches the Transcriptions with TranscriptionText = Hello World + +==== List of FilterParameters +[cols=",",options="header",] +|=========================================================================================================================================================================================================================================================================== +|Parameter |Method +|StartTime |StartTime(). +|EndTime |EndTime(). +|TranscriptionText |TranscriptionText(). +|=========================================================================================================================================================================================================================================================================== + +In addition to these, the regular Paging paramters can also be used similar to the FilterParameters +.... + TranscriptionList List = TranscriptionList.getFilteredList().PageSize("1").Filter(). +.... + +==== List of PagingParameters +[cols=",",options="header",] +|=============================================================================================================================================================================================================================== +|Paramter |Method +|Page |Page(). +|NumPages |NumPages(). +|PageSize |PageSize(). +|Total |Total(). +|Start |Start(). +|End |End(). +|=============================================================================================================================================================================================================================== + +== Accessing the Fetched TranscriptionList + +The size of the Fetched List can be known by +.... + int size = NewTranscription.size(); +.... + +The a Transcription from the fetched TranscriptionList Object can be obtained by +.... + Transcription a = NewTranscription.get(1); +.... + +== Additional Paging Information +We can also access the Additional Paging Information by using the Methods of TranscriptionList +.... + String Uri; + Uri = NewTranscription.getpreviouspageuri(); +.... + +The API returns URIs to the next, previous, first and last pages of the returned list as shown in the table below: + +=== Request Parameters + +[cols=",",options="header",] +|============================================================ +|Parameter |Method +|Uri |geturi(). +|Firstpageuri |getfirstpageuri(). +|Nextpageuri |getnextpageuri(). +|Previouspageuri |getpreviouspageuri(). +|Lastpageuri |getlastpageuri(). +|============================================================ + +NOTE: The Default Account from which we fetch the Transcriptions is the Main Account. + +If we want to change the Default Account to any specific SubAccount , use the following method before Fetching the Transcription(s) +.... + NotifactionList.SubAccountAccess(SubAccountSid); + TranscriptionList List = TranscriptionList.getList(); +.... \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/Email.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/Email.java new file mode 100644 index 0000000..e3d4921 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/Email.java @@ -0,0 +1,116 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Emails; + +import org.apache.http.ParseException; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Restcomm; +import org.restcomm.connect.java.sdk.Utilities; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Exceptions.*; + +public class Email{ + + static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/Email/Messages.json/"; + + static public void SubAccountAccess(String sid) + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/Email/Messages.json/"; + } + + public static EmailCreator newEmail() + { + return new EmailCreator(BASE_URL); + } + + private String to; + + private String body; + + private String subject; + + private String from; + + private String date_sent; + + private String account_sid; + + public String getTo () + { + return to; + } + + private void setTo (String to) + { + this.to = to; + } + + public String getBody () + { + return body; + } + + private void setBody (String body) + { + this.body = body; + } + + public String getSubject () + { + return subject; + } + + private void setSubject (String subject) + { + this.subject = subject; + } + + public String getFrom () + { + return from; + } + + private void setFrom (String from) + { + this.from = from; + } + + public String getDate_sent () + { + return date_sent; + } + + private void setDate_sent (String date_sent) + { + this.date_sent = date_sent; + } + + public String getAccount_sid () + { + return account_sid; + } + + private void setAccount_sid (String account_sid) + { + this.account_sid = account_sid; + } +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/EmailCreator.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/EmailCreator.java new file mode 100644 index 0000000..94ef407 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/EmailCreator.java @@ -0,0 +1,72 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Emails; +import org.restcomm.connect.java.sdk.http.*; +import org.restcomm.connect.java.sdk.Restcomm; +import org.restcomm.connect.java.sdk.Utilities; + + +public class EmailCreator { + + static String BASE_URL; + public Request request; + public EmailCreator(final String BASE_URL) { + + EmailCreator.BASE_URL = BASE_URL; + request = new Request(HttpMethod.POST,BASE_URL); + } + public EmailCreator From(String value) + { + request.addPostParameters("From", value); + return this; + } + public EmailCreator To(String value) + { + request.addPostParameters("To", value); + return this; + } + public EmailCreator Body(String value) + { + request.addPostParameters("Body", value); + return this; + } + public EmailCreator Subject(String value) + { + request.addPostParameters("Subject", value); + return this; + } + public EmailCreator BCC(String value) + { + request.addPostParameters("BCC", value); + return this; + } + public EmailCreator CC(String value) + { + request.addPostParameters("CC", value); + return this; + } + public Email sendEmail() + { + Restcomm.sendRequest(request); + return Utilities.EmailObject(Restcomm.getJSONResponse()); + } + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.java new file mode 100644 index 0000000..baf6580 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.java @@ -0,0 +1,117 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Notifications; + +import java.io.IOException; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Restcomm; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.apache.http.ParseException; +import java.lang.reflect.Type; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; +import org.restcomm.connect.java.sdk.ListUtil; + +import org.apache.http.ParseException; +import com.google.gson.annotations.SerializedName; +import java.net.MalformedURLException; + +public class FilteredNotificationList extends NotificationList { + + private static String BASE_URL; + private static Request request; + + public FilteredNotificationList(final String BASE_URL) + { + this.BASE_URL = BASE_URL; + request = new Request(HttpMethod.GET,BASE_URL); + } + public FilteredNotificationList Page(String value) throws MalformedURLException + { + request.addGetParameters("Page", value); + return this; + } + public FilteredNotificationList NumPages(String value) + { + request.addGetParameters("NumPages", value); + return this; + } + public FilteredNotificationList PageSize(String value) + { + request.addGetParameters("PageSize", value); + return this; + } + public FilteredNotificationList Total(String value) + { + request.addGetParameters("Total", value); + return this; + } + public FilteredNotificationList Start(String value) + { + request.addGetParameters("Start", value); + return this; + } + public FilteredNotificationList End(String value) + { + request.addGetParameters("End", value); + return this; + } + public FilteredNotificationList MessageText(String value) + { + request.addGetParameters("MessageText", value); + return this; + } + public FilteredNotificationList RequestUrl(String value) + { + request.addGetParameters("RequestUrl", value); + return this; + } + public FilteredNotificationList ErrorCode(String value) + { + request.addGetParameters("ErrorCode", value); + return this; + } + public FilteredNotificationList EndTime(String value) + { + request.addGetParameters("EndTime", value); + return this; + } + public FilteredNotificationList StartTime(String value) + { + request.addGetParameters("StartTime", value); + return this; + } + + public NotificationList Filter() + { + Restcomm.sendRequest(request); + Gson gson = new Gson(); + return gson.fromJson(Restcomm.getJSONResponse(),NotificationList.class); + } + + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/Notification.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/Notification.java new file mode 100644 index 0000000..7ef04fd --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/Notification.java @@ -0,0 +1,217 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Notifications; + +import org.apache.http.ParseException; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Restcomm; +import org.restcomm.connect.java.sdk.Utilities; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Exceptions.*; + +public class Notification{ + + static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/Notifications.json/"; + + static public void SubAccountAccess(String sid) + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/Notifications.json/"; + } + public static Notification getNotification(String sid) + { + Restcomm.sendRequest((new Request(HttpMethod.GET,BASE_URL+sid))); + return Utilities.NotificationObject(Restcomm.getJSONResponse()); + } + /*public static NotificationList getNotificationList() + { + return new NotificationList(BASE_URL); + }*/ + + private String request_variables; + + private String sid; + + private String message_date; + + private String message_text; + + private String error_code; + + private String date_created; + + private String uri; + + private String api_version; + + private String log; + + private String request_url; + + private String account_sid; + + private String request_method; + + private String date_updated; + + private String more_info; + + public String getRequest_variables () + { + return request_variables; + } + + private void setRequest_variables (String request_variables) + { + this.request_variables = request_variables; + } + + public String getSid () + { + return sid; + } + + private void setSid (String sid) + { + this.sid = sid; + } + + public String getMessage_date () + { + return message_date; + } + + private void setMessage_date (String message_date) + { + this.message_date = message_date; + } + + public String getMessage_text () + { + return message_text; + } + + private void setMessage_text (String message_text) + { + this.message_text = message_text; + } + + public String getError_code () + { + return error_code; + } + + private void setError_code (String error_code) + { + this.error_code = error_code; + } + + public String getDate_created () + { + return date_created; + } + + private void setDate_created (String date_created) + { + this.date_created = date_created; + } + + public String getUri () + { + return uri; + } + + private void setUri (String uri) + { + this.uri = uri; + } + + public String getApi_version () + { + return api_version; + } + + private void setApi_version (String api_version) + { + this.api_version = api_version; + } + + public String getLog () + { + return log; + } + + private void setLog (String log) + { + this.log = log; + } + + public String getRequest_url () + { + return request_url; + } + + private void setRequest_url (String request_url) + { + this.request_url = request_url; + } + + public String getAccount_sid () + { + return account_sid; + } + + private void setAccount_sid (String account_sid) + { + this.account_sid = account_sid; + } + + public String getRequest_method () + { + return request_method; + } + + private void setRequest_method (String request_method) + { + this.request_method = request_method; + } + + public String getDate_updated () + { + return date_updated; + } + + private void setDate_updated (String date_updated) + { + this.date_updated = date_updated; + } + + public String getMore_info () + { + return more_info; + } + + private void setMore_info (String more_info) + { + this.more_info = more_info; + } + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/NotificationList.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/NotificationList.java new file mode 100644 index 0000000..773bb32 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/NotificationList.java @@ -0,0 +1,79 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Notifications; + +import java.io.IOException; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Restcomm; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.apache.http.ParseException; +import java.lang.reflect.Type; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; +import org.restcomm.connect.java.sdk.ListUtil; +import org.apache.http.ParseException; +import com.google.gson.annotations.SerializedName; + +public class NotificationList extends ListUtil { + + private static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/Notifications.json"; + private static Request request; + + static public void SubAccountAccess(String sid) //To access the Applications connected to SubAccounts + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/Notifications.json"; + } + private List notifications; + + public Notification get(int index) + { + return notifications.get(index); + } + public int size() + { + return notifications.size(); + } + private void setList (List Notifications) + { + this.notifications = Notifications; + } + public static NotificationList getList() + { + request = new Request(HttpMethod.GET,BASE_URL); + Restcomm.sendRequest(request); + Gson gson = new Gson(); + + request = new Request(HttpMethod.GET,BASE_URL); + return gson.fromJson(Restcomm.getJSONResponse(),NotificationList.class); + } + public static FilteredNotificationList getFilteredList() + { + + return new FilteredNotificationList(BASE_URL); + } + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Recordings/FilteredRecordingList.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Recordings/FilteredRecordingList.java new file mode 100644 index 0000000..88150e0 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Recordings/FilteredRecordingList.java @@ -0,0 +1,106 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Recordings; + +import java.io.IOException; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Restcomm; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.apache.http.ParseException; +import java.lang.reflect.Type; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; +import org.restcomm.connect.java.sdk.ListUtil; + +import org.apache.http.ParseException; +import com.google.gson.annotations.SerializedName; +import java.net.MalformedURLException; + +public class FilteredRecordingList extends RecordingList { + + private static String BASE_URL; + private static Request request; + + public FilteredRecordingList(final String BASE_URL) + { + this.BASE_URL = BASE_URL; + request = new Request(HttpMethod.GET,BASE_URL); + } + public FilteredRecordingList Page(String value) throws MalformedURLException + { + request.addGetParameters("Page", value); + return this; + } + public FilteredRecordingList NumPages(String value) + { + request.addGetParameters("NumPages", value); + return this; + } + public FilteredRecordingList PageSize(String value) + { + request.addGetParameters("PageSize", value); + return this; + } + public FilteredRecordingList Total(String value) + { + request.addGetParameters("Total", value); + return this; + } + public FilteredRecordingList Start(String value) + { + request.addGetParameters("Start", value); + return this; + } + public FilteredRecordingList End(String value) + { + request.addGetParameters("End", value); + return this; + } + public FilteredRecordingList CallSid(String value) + { + request.addGetParameters("CallSid", value); + return this; + } + public FilteredRecordingList EndTime(String value) + { + request.addGetParameters("EndTime", value); + return this; + } + public FilteredRecordingList StartTime(String value) + { + request.addGetParameters("StartTime", value); + return this; + } + public RecordingList Filter() + { + Restcomm.sendRequest(request); + Gson gson = new Gson(); + return gson.fromJson(Restcomm.getJSONResponse(),RecordingList.class); + } + + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Recordings/Recording.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Recordings/Recording.java new file mode 100644 index 0000000..b5c7d95 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Recordings/Recording.java @@ -0,0 +1,157 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Recordings; + +import org.apache.http.ParseException; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Restcomm; +import org.restcomm.connect.java.sdk.Utilities; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Exceptions.*; + +public class Recording{ + + static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/Recordings.json/"; + + static public void SubAccountAccess(String sid) + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/Recordings.json/"; + } + public static Recording getRecording(String sid) + { + Restcomm.sendRequest((new Request(HttpMethod.GET,BASE_URL+sid))); + return Utilities.RecordingObject(Restcomm.getJSONResponse()); + } + /*public static RecordingList getRecordingList() + { + return new RecordingList(BASE_URL); + }*/ + + + private String sid; + + private String duration; + + private String date_updated; + + private String call_sid; + + private String date_created; + + private String file_uri; + + private String uri; + + private String api_version; + + private String account_sid; + + public String getSid () + { + return sid; + } + + private void setSid (String sid) + { + this.sid = sid; + } + + public String getDuration () + { + return duration; + } + + private void setDuration (String duration) + { + this.duration = duration; + } + + public String getDate_updated () + { + return date_updated; + } + + private void setDate_updated (String date_updated) + { + this.date_updated = date_updated; + } + + public String getCall_sid () + { + return call_sid; + } + + private void setCall_sid (String call_sid) + { + this.call_sid = call_sid; + } + + public String getDate_created () + { + return date_created; + } + + private void setDate_created (String date_created) + { + this.date_created = date_created; + } + + public String getFile_uri () + { + return file_uri; + } + + private void setFile_uri (String file_uri) + { + this.file_uri = file_uri; + } + + public String getUri () + { + return uri; + } + + private void setUri (String uri) + { + this.uri = uri; + } + + public String getApi_version () + { + return api_version; + } + + private void setApi_version (String api_version) + { + this.api_version = api_version; + } + + public String getAccount_sid () + { + return account_sid; + } + + private void setAccount_sid (String account_sid) + { + this.account_sid = account_sid; + } +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Recordings/RecordingList.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Recordings/RecordingList.java new file mode 100644 index 0000000..d8563da --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Recordings/RecordingList.java @@ -0,0 +1,80 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Recordings; + +import java.io.IOException; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Restcomm; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.apache.http.ParseException; +import java.lang.reflect.Type; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; +import org.restcomm.connect.java.sdk.ListUtil; +import org.apache.http.ParseException; +import com.google.gson.annotations.SerializedName; + +public class RecordingList extends ListUtil { + + private static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/Recordings.json"; + private static Request request; + + static public void SubAccountAccess(String sid) //To access the Applications connected to SubAccounts + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/Recordings.json"; + } + static public void CallSidAccess(String sid) //To access the Applications connected to Calls + { + BASE_URL = Restcomm.COMMON_URL.replaceAll("/Recordings.json","Calls/"+sid+"/Recordings.json"); + } + private List recordings; + + public Recording get(int index) + { + return recordings.get(index); + } + public int size() + { + return recordings.size(); + } + private void setList (List Recordings) + { + this.recordings = Recordings; + } + public static RecordingList getList() + { + request = new Request(HttpMethod.GET,BASE_URL); + Restcomm.sendRequest(request); + Gson gson = new Gson(); + return gson.fromJson(Restcomm.getJSONResponse(),RecordingList.class); + } + public static FilteredRecordingList getFilteredList() + { + return new FilteredRecordingList(BASE_URL); + } + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.java new file mode 100644 index 0000000..8c7cbde --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.java @@ -0,0 +1,117 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.SMS; + +import java.io.IOException; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Restcomm; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.apache.http.ParseException; +import java.lang.reflect.Type; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; +import org.restcomm.connect.java.sdk.ListUtil; + +import org.apache.http.ParseException; +import com.google.gson.annotations.SerializedName; +import java.net.MalformedURLException; + +public class FilteredSMSList extends SMSList { + + private static String BASE_URL; + private static Request request; + + public FilteredSMSList(final String BASE_URL) + { + this.BASE_URL = BASE_URL; + request = new Request(HttpMethod.GET,BASE_URL); + } + public FilteredSMSList Page(String value) throws MalformedURLException + { + request.addGetParameters("Page", value); + return this; + } + public FilteredSMSList NumPages(String value) + { + request.addGetParameters("NumPages", value); + return this; + } + public FilteredSMSList PageSize(String value) + { + request.addGetParameters("PageSize", value); + return this; + } + public FilteredSMSList Total(String value) + { + request.addGetParameters("Total", value); + return this; + } + public FilteredSMSList Start(String value) + { + request.addGetParameters("Start", value); + return this; + } + public FilteredSMSList End(String value) + { + request.addGetParameters("End", value); + return this; + } + public FilteredSMSList To(String value) + { + request.addGetParameters("To", value); + return this; + } + public FilteredSMSList From(String value) + { + request.addGetParameters("From", value); + return this; + } + public FilteredSMSList Body(String value) + { + request.addGetParameters("Body", value); + return this; + } + public FilteredSMSList EndTime(String value) + { + request.addGetParameters("EndTime", value); + return this; + } + public FilteredSMSList StartTime(String value) + { + request.addGetParameters("StartTime", value); + return this; + } + + public SMSList Filter() + { + Restcomm.sendRequest(request); + Gson gson = new Gson(); + return gson.fromJson(Restcomm.getJSONResponse(),SMSList.class); + } + + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMS.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMS.java new file mode 100644 index 0000000..df8e9ae --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMS.java @@ -0,0 +1,219 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.SMS; + +import org.apache.http.ParseException; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Restcomm; +import org.restcomm.connect.java.sdk.Utilities; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Exceptions.*; + +public class SMS{ + + static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json/"; + + static public void SubAccountAccess(String sid) + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/SMS/Messages.json/"; + } + public static SMS getSMS(String sid) + { + Restcomm.sendRequest((new Request(HttpMethod.GET,BASE_URL+sid))); + return Utilities.SMSObject(Restcomm.getJSONResponse()); + } + public static SMSCreator newSMS() + { + return new SMSCreator(BASE_URL); + } + /*public static SMSList getSMSList() + { + return new SMSList(BASE_URL); + }*/ + private String to; + + private String sid; + + private String body; + + private String status; + + private String direction; + + private String date_created; + + private String date_sent; + + private String from; + + private String uri; + + private String api_version; + + private String account_sid; + + private String price; + + private String date_updated; + + private String price_unit; + + public String getTo () + { + return to; + } + + private void setTo (String to) + { + this.to = to; + } + + public String getSid () + { + return sid; + } + + private void setSid (String sid) + { + this.sid = sid; + } + + public String getBody () + { + return body; + } + + private void setBody (String body) + { + this.body = body; + } + + public String getStatus () + { + return status; + } + + private void setStatus (String status) + { + this.status = status; + } + + public String getDirection () + { + return direction; + } + + private void setDirection (String direction) + { + this.direction = direction; + } + + public String getDate_created () + { + return date_created; + } + + private void setDate_created (String date_created) + { + this.date_created = date_created; + } + + public String getDate_sent () + { + return date_sent; + } + + private void setDate_sent (String date_sent) + { + this.date_sent = date_sent; + } + + public String getFrom () + { + return from; + } + + private void setFrom (String from) + { + this.from = from; + } + + public String getUri () + { + return uri; + } + + private void setUri (String uri) + { + this.uri = uri; + } + + public String getApi_version () + { + return api_version; + } + + private void setApi_version (String api_version) + { + this.api_version = api_version; + } + + public String getAccount_sid () + { + return account_sid; + } + + private void setAccount_sid (String account_sid) + { + this.account_sid = account_sid; + } + + public String getPrice () + { + return price; + } + + private void setPrice (String price) + { + this.price = price; + } + + public String getDate_updated () + { + return date_updated; + } + + private void setDate_updated (String date_updated) + { + this.date_updated = date_updated; + } + + public String getPrice_unit () + { + return price_unit; + } + + private void setPrice_unit (String price_unit) + { + this.price_unit = price_unit; + } +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSCreator.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSCreator.java new file mode 100644 index 0000000..4e3d9ad --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSCreator.java @@ -0,0 +1,57 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.SMS; +import org.restcomm.connect.java.sdk.http.*; +import org.restcomm.connect.java.sdk.Restcomm; +import org.restcomm.connect.java.sdk.Utilities; + + +public class SMSCreator { + + static String BASE_URL; + public Request request; + public SMSCreator(final String BASE_URL) { + + SMSCreator.BASE_URL = BASE_URL; + request = new Request(HttpMethod.POST,BASE_URL); + } + public SMSCreator From(String value) + { + request.addPostParameters("From", value); + return this; + } + public SMSCreator To(String value) + { + request.addPostParameters("To", value); + return this; + } + public SMSCreator Body(String value) + { + request.addPostParameters("Body", value); + return this; + } + public SMS sendSMS() + { + Restcomm.sendRequest(request); + return Utilities.SMSObject(Restcomm.getJSONResponse()); + } + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSList.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSList.java new file mode 100644 index 0000000..46851e1 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSList.java @@ -0,0 +1,76 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.SMS; + +import java.io.IOException; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Restcomm; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.apache.http.ParseException; +import java.lang.reflect.Type; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; +import org.restcomm.connect.java.sdk.ListUtil; +import org.apache.http.ParseException; +import com.google.gson.annotations.SerializedName; + +public class SMSList extends ListUtil { + + private static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json"; + private static Request request; + + static public void SubAccountAccess(String sid) //To access the Applications connected to SubAccounts + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/SMS/Messages.json"; + } + private List messages; + + public SMS get(int index) + { + return messages.get(index); + } + public int size() + { + return messages.size(); + } + private void setList (List messages) + { + this.messages = messages; + } + public static SMSList getList() + { + request = new Request(HttpMethod.GET,BASE_URL); + Restcomm.sendRequest(request); + Gson gson = new Gson(); + return gson.fromJson(Restcomm.getJSONResponse(),SMSList.class); + } + public static FilteredSMSList getFilteredList() + { + return new FilteredSMSList(BASE_URL); + } + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Transcriptions/FilteredTranscriptionList.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Transcriptions/FilteredTranscriptionList.java new file mode 100644 index 0000000..44c29f4 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Transcriptions/FilteredTranscriptionList.java @@ -0,0 +1,107 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Transcriptions; + +import java.io.IOException; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Restcomm; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.apache.http.ParseException; +import java.lang.reflect.Type; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; +import org.restcomm.connect.java.sdk.ListUtil; + +import org.apache.http.ParseException; +import com.google.gson.annotations.SerializedName; +import java.net.MalformedURLException; + +public class FilteredTranscriptionList extends TranscriptionList { + + private static String BASE_URL; + private static Request request; + + public FilteredTranscriptionList(final String BASE_URL) + { + this.BASE_URL = BASE_URL; + request = new Request(HttpMethod.GET,BASE_URL); + } + public FilteredTranscriptionList Page(String value) + { + request.addGetParameters("Page", value); + return this; + } + public FilteredTranscriptionList NumPages(String value) + { + request.addGetParameters("NumPages", value); + return this; + } + public FilteredTranscriptionList PageSize(String value) + { + request.addGetParameters("PageSize", value); + return this; + } + public FilteredTranscriptionList Total(String value) + { + request.addGetParameters("Total", value); + return this; + } + public FilteredTranscriptionList Start(String value) + { + request.addGetParameters("Start", value); + return this; + } + public FilteredTranscriptionList End(String value) + { + request.addGetParameters("End", value); + return this; + } + public FilteredTranscriptionList TranscriptionText(String value) + { + request.addGetParameters("TranscriptionText", value); + return this; + } + public FilteredTranscriptionList EndTime(String value) + { + request.addGetParameters("EndTime", value); + return this; + } + public FilteredTranscriptionList StartTime(String value) + { + request.addGetParameters("StartTime", value); + return this; + } + + public TranscriptionList Filter() + { + Restcomm.sendRequest(request); + Gson gson = new Gson(); + return gson.fromJson(Restcomm.getJSONResponse(),TranscriptionList.class); + } + + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Transcriptions/Transcription.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Transcriptions/Transcription.java new file mode 100644 index 0000000..74deb48 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Transcriptions/Transcription.java @@ -0,0 +1,171 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Transcriptions; + +import org.apache.http.ParseException; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Restcomm; +import org.restcomm.connect.java.sdk.Utilities; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Exceptions.*; + +public class Transcription{ + + static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/Transcriptions.json/"; + + static public void SubAccountAccess(String sid) + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/Transcriptions.json/"; + } + public static Transcription getTranscription(String sid) + { + Restcomm.sendRequest((new Request(HttpMethod.GET,BASE_URL+sid))); + return Utilities.TranscriptionObject(Restcomm.getJSONResponse()); + } + public static void deleteTranscription(String sid) + { + Restcomm.sendRequest((new Request(HttpMethod.DELETE,BASE_URL+sid))); + } + /*public static TranscriptionsList getTranscriptionsList() + { + return new TranscriptionsList(BASE_URL); + }*/ + private String sid; + + private String duration; + + private String price; + + private String status; + + private String date_updated; + + private String recording_sid; + + private String date_created; + + private String uri; + + private String transcription_text; + + private String account_sid; + + public String getSid () + { + return sid; + } + + private void setSid (String sid) + { + this.sid = sid; + } + + public String getDuration () + { + return duration; + } + + private void setDuration (String duration) + { + this.duration = duration; + } + + public String getPrice () + { + return price; + } + + private void setPrice (String price) + { + this.price = price; + } + + public String getStatus () + { + return status; + } + + private void setStatus (String status) + { + this.status = status; + } + + public String getDate_updated () + { + return date_updated; + } + + private void setDate_updated (String date_updated) + { + this.date_updated = date_updated; + } + + public String getRecording_sid () + { + return recording_sid; + } + + private void setRecording_sid (String recording_sid) + { + this.recording_sid = recording_sid; + } + + public String getDate_created () + { + return date_created; + } + + private void setDate_created (String date_created) + { + this.date_created = date_created; + } + + public String getUri () + { + return uri; + } + + private void setUri (String uri) + { + this.uri = uri; + } + + public String getTranscription_text () + { + return transcription_text; + } + + private void setTranscription_text (String transcription_text) + { + this.transcription_text = transcription_text; + } + + public String getAccount_sid () + { + return account_sid; + } + + private void setAccount_sid (String account_sid) + { + this.account_sid = account_sid; + } +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionList.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionList.java new file mode 100644 index 0000000..9cd9c18 --- /dev/null +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionList.java @@ -0,0 +1,79 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Transcriptions; + +import java.io.IOException; +import org.restcomm.connect.java.sdk.http.*; + +import org.restcomm.connect.java.sdk.Restcomm; +import org.apache.http.ProtocolException; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.apache.http.ParseException; +import java.lang.reflect.Type; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; +import org.restcomm.connect.java.sdk.ListUtil; +import org.apache.http.ParseException; +import com.google.gson.annotations.SerializedName; + +public class TranscriptionList extends ListUtil { + + private static String BASE_URL = Restcomm.COMMON_URL+"Accounts/"+Restcomm.getAuthID()+"/Transcriptions.json"; + private static Request request; + + static public void SubAccountAccess(String sid) //To access the Applications connected to SubAccounts + { + BASE_URL = Restcomm.COMMON_URL+"Accounts/"+sid+"/Transcriptions.json"; + } + private List transcriptions; + + public Transcription get(int index) + { + return transcriptions.get(index); + } + public int size() + { + return transcriptions.size(); + } + private void setList (List transcriptions) + { + this.transcriptions = transcriptions; + } + public static TranscriptionList getList() + { + request = new Request(HttpMethod.GET,BASE_URL); + Restcomm.sendRequest(request); + Gson gson = new Gson(); + + request = new Request(HttpMethod.GET,BASE_URL); + return gson.fromJson(Restcomm.getJSONResponse(),TranscriptionList.class); + } + public static FilteredTranscriptionList getFilteredList() + { + + return new FilteredTranscriptionList(BASE_URL); + } + +} diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Utilities.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Utilities.java index 5c60414..857be15 100644 --- a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Utilities.java +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Utilities.java @@ -28,6 +28,11 @@ import org.restcomm.connect.java.sdk.Accounts.Account; import org.restcomm.connect.java.sdk.Clients.Client; +import org.restcomm.connect.java.sdk.Recordings.Recording; +import org.restcomm.connect.java.sdk.SMS.SMS; +import org.restcomm.connect.java.sdk.Transcriptions.Transcription; +import org.restcomm.connect.java.sdk.Emails.Email; +import org.restcomm.connect.java.sdk.Notifications.Notification; public class Utilities { @@ -51,4 +56,29 @@ public static Client ClientObject(String jsonResponse) { Gson gson = new Gson(); return gson.fromJson(jsonResponse,Client.class); } + public static Notification NotificationObject(String jsonResponse) { + + Gson gson = new Gson(); + return gson.fromJson(jsonResponse,Notification.class); + } + public static SMS SMSObject(String jsonResponse) { + + Gson gson = new Gson(); + return gson.fromJson(jsonResponse,SMS.class); + } + public static Email EmailObject(String jsonResponse) { + + Gson gson = new Gson(); + return gson.fromJson(jsonResponse,Email.class); + } + public static Recording RecordingObject(String jsonResponse) { + + Gson gson = new Gson(); + return gson.fromJson(jsonResponse,Recording.class); + } + public static Transcription TranscriptionObject(String jsonResponse) { + + Gson gson = new Gson(); + return gson.fromJson(jsonResponse,Transcription.class); + } } diff --git a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/Request.java b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/Request.java index 097db1d..9c02001 100644 --- a/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/Request.java +++ b/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/Request.java @@ -60,13 +60,23 @@ public HttpMethod getMethod() { return method; } - public void addGetParameters(String a,String b) throws MalformedURLException, URISyntaxException + public void addGetParameters(String a,String b) { + try{ URIBuilder urib = new URIBuilder(Url); urib.addParameter(a,b); urib.build(); Url = new URL(urib.toString()).toString(); + } + catch (MalformedURLException e) + { + e.printStackTrace(); + } + catch (URISyntaxException e) + { + e.printStackTrace(); + } } public void addPostParameters(String a,String b) { diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/BasicTest.java b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/BasicTest.java index 38aa5ac..97149f0 100644 --- a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/BasicTest.java +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/BasicTest.java @@ -36,7 +36,7 @@ public class BasicTest { public static void runOnceBeforeClass() { Restcomm.setCommonUrl("http://localhost:8080/"); - Restcomm.init("AC13b4372c92ed5c07d951cf842e2664ff", "cb0936cfee986d3e3ec6d1d77cc57888"); + Restcomm.init("AC13b4372c92ed5c07d951cf842e2664ff", "7bec2769d3b48e9132e596b60a558d65"); //System.out.println("@BeforeClass - runOnceBeforeClass"); } @AfterClass @@ -63,3 +63,5 @@ protected String readFile(String fileName) throws IOException { } } } +/*curl GET -X AC13b4372c92ed5c07d951cf842e2664ff:7bec2769d3b48e9132e596b60a558d65@cloud.restcomm.com/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications.json +*/ \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Clients/ClientTest.java b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Clients/ClientTest.java index 235cc89..ac19aab 100644 --- a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Clients/ClientTest.java +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Clients/ClientTest.java @@ -1,3 +1,23 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ package org.restcomm.connect.java.sdk.Clients; import org.restcomm.connect.java.sdk.BasicTest; diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/EmailTest.java b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/EmailTest.java new file mode 100644 index 0000000..0ebe32c --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/EmailTest.java @@ -0,0 +1,72 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Emails; +import org.restcomm.connect.java.sdk.BasicTest; + +import static org.junit.Assert.*; +import org.apache.http.ProtocolException; + +import java.io.File; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.Test; + +import org.restcomm.connect.java.sdk.Emails.*; +import com.github.tomakehurst.wiremock.client.WireMock; +import com.github.tomakehurst.wiremock.junit.WireMockRule; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.restcomm.connect.java.sdk.Restcomm; + +import org.junit.rules.ExpectedException; +import java.io.IOException; + +public class EmailTest extends BasicTest{ + + private String path = "src/test/java/org/restcomm/connect/java/sdk/Emails/TextFiles/"; + private String EmailSid = "SMade2570e7f554578ac590311085f53e2"; + @Rule + public WireMockRule wireMockRule = new WireMockRule(8080); + + @Test + public void testnewEmail() throws Exception { + + WireMock.stubFor(WireMock.post(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/Email/Messages.json/")) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .withRequestBody(WireMock.containing("From=m%40hmail.com")) + .withRequestBody(WireMock.containing("To=y%40hmail.com")) + .withRequestBody(WireMock.containing("Body=This+is+RestComm")) + .withRequestBody(WireMock.containing("Subject=Test+Email")) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "application/json") + .withBody(readFile(path+"getEmail.txt")))); + + Email b = Email.newEmail().From("m@hmail.com").To("y@hmail.com").Body("This is RestComm").Subject("Test Email").sendEmail(); + + WireMock.verify(WireMock.postRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/Email/Messages.json/"))); + assertEquals(200, Restcomm.getStatusCode()); + assertEquals("m@hmail.com",b.getFrom()); + assertEquals("y@hmail.com",b.getTo()); + + } + +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/TextFiles/getEmail.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/TextFiles/getEmail.txt new file mode 100644 index 0000000..bd4b014 --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/TextFiles/getEmail.txt @@ -0,0 +1,8 @@ +{ + "date_sent": "2017-06-29T05:58:52.324Z", + "account_sid": "AC13b4372c92ed5c07d951cf842e2664ff", + "from": "m@hmail.com", + "to": "y@hmail.com", + "body": "This is a test from RestComm", + "subject": "Test Email" +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/NotificationTest.java b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/NotificationTest.java new file mode 100644 index 0000000..168a96e --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/NotificationTest.java @@ -0,0 +1,85 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Notifications; +import org.restcomm.connect.java.sdk.BasicTest; + +import static org.junit.Assert.*; +import org.apache.http.ProtocolException; + +import java.io.File; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.Test; + +import org.restcomm.connect.java.sdk.Notifications.*; +import com.github.tomakehurst.wiremock.client.WireMock; +import com.github.tomakehurst.wiremock.junit.WireMockRule; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.restcomm.connect.java.sdk.Restcomm; + +import org.junit.rules.ExpectedException; +import java.io.IOException; + +public class NotificationTest extends BasicTest{ + + private String path = "src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/"; + private String NotificationSid = "NO70eddcd2f3424aea94c5d7a638298a6a"; + @Rule + public WireMockRule wireMockRule = new WireMockRule(8080); + + @Test + public void testGetNotification() throws Exception{ + WireMock.stubFor(WireMock.get(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/Notifications.json/"+NotificationSid)) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "Notification/json") + .withBody(readFile(path+"getNotification.txt")))); + + Notification a = Notification.getNotification(NotificationSid); + + WireMock.verify(WireMock.getRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/Notifications.json/"+NotificationSid))); + assertEquals(200, Restcomm.getStatusCode()); + assertEquals(NotificationSid,a.getSid()); + } + + @Test + public void testNotificationList() throws Exception{ + WireMock.stubFor(WireMock.get(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/Notifications.json")) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .withQueryParam("PageSize", WireMock.equalTo("1")) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "Notification/json") + .withBody(readFile(path+"getNotificationList.txt")))); + + NotificationList a = NotificationList.getFilteredList().PageSize("1").Filter(); + + Notification b = a.get(0); + + WireMock.verify(WireMock.getRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/Notifications.json?PageSize=1"))); + assertEquals(200,Restcomm.getStatusCode()); + assertNotNull(a); + assertEquals("NOa6b821987c1e47b4b91d26783abc205b",b.getSid()); + + } +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/getNotification.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/getNotification.txt new file mode 100644 index 0000000..5f2281c --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/getNotification.txt @@ -0,0 +1,16 @@ +{ + "sid": "NO70eddcd2f3424aea94c5d7a638298a6a", + "date_created": "Wed, 21 Jun 2017 10:30:27 +0000", + "date_updated": "Wed, 21 Jun 2017 10:30:27 +0000", + "account_sid": "AC13b4372c92ed5c07d951cf842e2664ff", + "api_version": "2012-04-24", + "log": 0, + "error_code": 11008, + "more_info": "/restcomm/errors/11008.html", + "message_text": "The SIP Client client:client_name is not registered or does not exist", + "message_date": "2017-06-21T10:30:27.000Z", + "request_url": "", + "request_method": "", + "request_variables": "", + "uri": "/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications/NO70eddcd2f3424aea94c5d7a638298a6a.json" +} diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/getNotificationList.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/getNotificationList.txt new file mode 100644 index 0000000..55def49 --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/TextFiles/getNotificationList.txt @@ -0,0 +1,31 @@ +{ + "page": 0, + "num_pages": 19, + "page_size": 1, + "total": 19, + "start": "0", + "end": "0", + "uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications.json", + "first_page_uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications.json?Page\u003d0\u0026PageSize\u003d1", + "previous_page_uri": "null", + "next_page_uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications.json?Page\u003d1\u0026PageSize\u003d1\u0026AfterSid\u003dNOa6b821987c1e47b4b91d26783abc205b", + "last_page_uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications.json?Page\u003d19\u0026PageSize\u003d1", + "notifications": [ + { + "sid": "NOa6b821987c1e47b4b91d26783abc205b", + "date_created": "Wed, 17 May 2017 11:09:40 +0000", + "date_updated": "Wed, 17 May 2017 11:09:40 +0000", + "account_sid": "AC13b4372c92ed5c07d951cf842e2664ff", + "api_version": "2012-04-24", + "log": 0, + "error_code": 11001, + "more_info": "/restcomm/errors/11001.html", + "message_text": "Cannot Connect to Client: bob : Make sure the Client exist or is registered with Restcomm", + "message_date": "2017-05-17T11:09:40.000Z", + "request_url": "", + "request_method": "", + "request_variables": "", + "uri": "/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Notifications/NOa6b821987c1e47b4b91d26783abc205b.json" + } + ] +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Recordings/RecordingTest.java b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Recordings/RecordingTest.java new file mode 100644 index 0000000..a285e0d --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Recordings/RecordingTest.java @@ -0,0 +1,85 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Recordings; +import org.restcomm.connect.java.sdk.BasicTest; + +import static org.junit.Assert.*; +import org.apache.http.ProtocolException; + +import java.io.File; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.Test; + +import org.restcomm.connect.java.sdk.Recordings.*; +import com.github.tomakehurst.wiremock.client.WireMock; +import com.github.tomakehurst.wiremock.junit.WireMockRule; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.restcomm.connect.java.sdk.Restcomm; + +import org.junit.rules.ExpectedException; +import java.io.IOException; + +public class RecordingTest extends BasicTest{ + + private String path = "src/test/java/org/restcomm/connect/java/sdk/Recordings/TextFiles/"; + private String RecordingSid = "RF50675909d9c94acda36f0e119b6cb431"; + @Rule + public WireMockRule wireMockRule = new WireMockRule(8080); + + @Test + public void testGetRecording() throws Exception{ + WireMock.stubFor(WireMock.get(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/Recordings.json/"+RecordingSid)) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "Recording/json") + .withBody(readFile(path+"getRecording.txt")))); + + Recording a = Recording.getRecording(RecordingSid); + + WireMock.verify(WireMock.getRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/Recordings.json/"+RecordingSid))); + assertEquals(200, Restcomm.getStatusCode()); + assertEquals(RecordingSid,a.getSid()); + } + + @Test + public void testRecordingList() throws Exception{ + WireMock.stubFor(WireMock.get(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/Recordings.json")) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .withQueryParam("PageSize", WireMock.equalTo("1")) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "Recording/json") + .withBody(readFile(path+"getRecordingList.txt")))); + + RecordingList a = RecordingList.getFilteredList().PageSize("1").Filter(); + + Recording b = a.get(0); + + WireMock.verify(WireMock.getRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/Recordings.json?PageSize=1"))); + assertEquals(200,Restcomm.getStatusCode()); + assertNotNull(a); + assertEquals("RF50675909d9c94acda36f0e119b6cb431",b.getSid()); + + } +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Recordings/TextFiles/getRecording.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Recordings/TextFiles/getRecording.txt new file mode 100644 index 0000000..4ee8edc --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Recordings/TextFiles/getRecording.txt @@ -0,0 +1,11 @@ +{ + "sid":"RF50675909d9c94acda36f0e119b6cb431", + "date_created":"Mon, 6 Jan 2014 08:51:07 +0900", + "date_updated":"Mon, 6 Jan 2014 08:51:07 +0900", + "account_sid":"ACae6e420f425248d6a26948c17a9e2acf", + "call_sid":"CAfe9ce46f104f4beeb10c83a5ddd2be66", + "duration":"14.70275", + "api_version":"2012-04-24", + "uri":"/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Recordings/RE50675909d9c94acda36f0e119b6cb431.json", + "file_uri":"http://instance1.restcomm.com:8080/restcomm/recordings/RE50675909d9c94acda36f0e119b6cb431.wav" +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Recordings/TextFiles/getRecordingList.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Recordings/TextFiles/getRecordingList.txt new file mode 100644 index 0000000..bcf6ceb --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Recordings/TextFiles/getRecordingList.txt @@ -0,0 +1,26 @@ +{ +"page":0, +"num_pages":34, +"page_size":1, +"total":34, +"start":"0", +"end":"0", +"uri":"/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Recordings.json", +"first_page_uri":"/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Recordings.json?Page=0&PageSize=1", +"previous_page_uri":"null","next_page_uri":"/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Recordings.json?Page=1&PageSize=1&AfterSid=RF50675909d9c94acda36f0e119b6cb431", +"last_page_uri":"/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Recordings.json?Page=34&PageSize=1", +"recordings": + [ + { + "sid":"RF50675909d9c94acda36f0e119b6cb431", + "date_created":"Mon, 6 Jan 2014 08:51:07 +0900", + "date_updated":"Mon, 6 Jan 2014 08:51:07 +0900", + "account_sid":"ACae6e420f425248d6a26948c17a9e2acf", + "call_sid":"CAfe9ce46f104f5beeb10c83a5dad2be66", + "duration":"14.70275", + "api_version":"2012-04-24", + "uri":"/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Recordings/RE50675909d9c94acda36f0e119b6cb431.json", + "file_uri":"http://instance1.restcomm.com:8080/restcomm/recordings/RE50675909d9c94acda36f0e119b6cb431.wav" + } + ] +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/SMSTest.java b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/SMSTest.java new file mode 100644 index 0000000..087ef65 --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/SMSTest.java @@ -0,0 +1,104 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.SMS; +import org.restcomm.connect.java.sdk.BasicTest; + +import static org.junit.Assert.*; +import org.apache.http.ProtocolException; + +import java.io.File; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.Test; + +import org.restcomm.connect.java.sdk.SMS.*; +import com.github.tomakehurst.wiremock.client.WireMock; +import com.github.tomakehurst.wiremock.junit.WireMockRule; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.restcomm.connect.java.sdk.Restcomm; + +import org.junit.rules.ExpectedException; +import java.io.IOException; + +public class SMSTest extends BasicTest{ + + private String path = "src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/"; + private String SMSSid = "SMade2570e7f554578ac590311085f53e2"; + @Rule + public WireMockRule wireMockRule = new WireMockRule(8080); + + @Test + public void testGetSMS() throws Exception{ + WireMock.stubFor(WireMock.get(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json/"+SMSSid)) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "SMS/json") + .withBody(readFile(path+"getSMS.txt")))); + + SMS a = SMS.getSMS(SMSSid); + + WireMock.verify(WireMock.getRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json/"+SMSSid))); + assertEquals(200, Restcomm.getStatusCode()); + assertEquals(SMSSid,a.getSid()); + } + @Test + public void testnewSMS() throws Exception { + + WireMock.stubFor(WireMock.post(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json/")) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .withRequestBody(WireMock.containing("From=%2B1654123987")) + .withRequestBody(WireMock.containing("To=%2B1321654879")) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "application/json") + .withBody(readFile(path+"getSMS.txt")))); + + SMS b = SMS.newSMS().From("+1654123987").To("+1321654879").Body("This is a test from RestComm").sendSMS(); + + WireMock.verify(WireMock.postRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json/"))); + assertEquals(200, Restcomm.getStatusCode()); + assertEquals("+1654123987",b.getFrom()); + assertEquals("+1321654879",b.getTo()); + + } + @Test + public void testSMSList() throws Exception{ + WireMock.stubFor(WireMock.get(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json")) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .withQueryParam("From", WireMock.equalTo("Raj")) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "SMS/json") + .withBody(readFile(path+"getSMSList.txt")))); + + SMSList a = SMSList.getFilteredList().From("Raj").Filter(); + + SMS b = a.get(0); + + WireMock.verify(WireMock.getRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/SMS/Messages.json?From=Raj"))); + assertEquals(200,Restcomm.getStatusCode()); + assertNotNull(a); + assertEquals("Raj",b.getFrom()); + + } +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/getSMS.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/getSMS.txt new file mode 100644 index 0000000..923cb91 --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/getSMS.txt @@ -0,0 +1,15 @@ +{ + "sid": "SMade2570e7f554578ac590311085f53e2", + "date_created": "Wed, 28 Jun 2017 06:30:32 +0000", + "date_updated": "Wed, 28 Jun 2017 06:30:32 +0000", + "account_sid": "AC13b4372c92ed5c07d951cf842e2664ff", + "from": "+1654123987", + "to": "+1321654879", + "body": "This is a test from RestComm", + "status": "sending", + "direction": "outbound-api", + "price": "0", + "price_unit": "USD", + "api_version": "2012-04-24", + "uri": "/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/SMS/Messages/SMade2570e7f554578ac590311085f53e2.json" +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/getSMSList.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/getSMSList.txt new file mode 100644 index 0000000..64f99da --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/TextFiles/getSMSList.txt @@ -0,0 +1,30 @@ +{ + "page": 0, + "num_pages": 0, + "page_size": 50, + "total": 1, + "start": "0", + "end": "1", + "uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/SMS/Messages.json", + "first_page_uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/SMS/Messages.json?Page\u003d0\u0026PageSize\u003d50", + "previous_page_uri": "null", + "next_page_uri": "null", + "last_page_uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/SMS/Messages.json?Page\u003d0\u0026PageSize\u003d50", + "messages": [ + { + "sid": "SMab777e46302441c2b89457b7c0734f4d", + "date_created": "Wed, 28 Jun 2017 06:31:00 +0000", + "date_updated": "Wed, 28 Jun 2017 06:31:00 +0000", + "account_sid": "AC13b4372c92ed5c07d951cf842e2664ff", + "from": "Raj", + "to": "Taj", + "body": "This is a test from RestComm", + "status": "sending", + "direction": "outbound-api", + "price": "0", + "price_unit": "USD", + "api_version": "2012-04-24", + "uri": "/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/SMS/Messages/SMab777e46302441c2b89457b7c0734f4d.json" + } + ] +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Transcriptions/TextFiles/getTranscription.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Transcriptions/TextFiles/getTranscription.txt new file mode 100644 index 0000000..c67c11e --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Transcriptions/TextFiles/getTranscription.txt @@ -0,0 +1,12 @@ +{ + "sid": "RF20000000000000000000000000000001", + "date_created":"Wed, 30 Oct 2013 16:28:33 +0900", + "date_updated":"Wed, 30 Oct 2013 16:28:33 +0900", + "account_sid":"ACae6e420f425248d6a26948c17a9e2acf", + "status":"completed", + "recording_sid":"CA5FB00000000000000000000000000002", + "duration":"14.70275", + "transcription_text":"Hello, Welcome to RestComm Connect", + "price":"0.0", + "uri":"/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Transcriptions/NOb88ccff6c9e04f989de9415a555ad84d.json.json" +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Transcriptions/TextFiles/getTranscriptionList.txt b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Transcriptions/TextFiles/getTranscriptionList.txt new file mode 100644 index 0000000..05a87dd --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Transcriptions/TextFiles/getTranscriptionList.txt @@ -0,0 +1,27 @@ +{ + "page": 0, + "num_pages": 1, + "page_size": 1, + "total": 1, + "start": "0", + "end": "1", + "uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Transcriptions.json", + "first_page_uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Transcriptions.json?Page\u003d0\u0026PageSize\u003d50", + "previous_page_uri": "null", + "next_page_uri": "null", + "last_page_uri": "/restcomm/2012-04-24/Accounts/AC13b4372c92ed5c07d951cf842e2664ff/Transcriptions.json?Page\u003d0\u0026PageSize\u003d50", + "transcriptions": [ + { + "sid": "RF20000000000000000000000000000001", + "date_created":"Wed, 30 Oct 2013 16:28:33 +0900", + "date_updated":"Wed, 30 Oct 2013 16:28:33 +0900", + "account_sid":"ACae6e420f425248d6a26948c17a9e2acf", + "status":"completed", + "recording_sid":"CA5FB00000000000000000000000000002", + "duration":"14.70275", + "transcription_text":"Hello, Welcome to RestComm Connect", + "price":"0.0", + "uri":"/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Transcriptions/NOb88ccff6c9e04f989de9415a555ad84d.json.json" + } + ] +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionTest.java b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionTest.java new file mode 100644 index 0000000..2c40cab --- /dev/null +++ b/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionTest.java @@ -0,0 +1,85 @@ +/* + * TeleStax, Open Source Cloud Communications + * Copyright 2011-2016, Telestax Inc and individual contributors + * by the @authors tag. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.restcomm.connect.java.sdk.Transcriptions; +import org.restcomm.connect.java.sdk.BasicTest; + +import static org.junit.Assert.*; +import org.apache.http.ProtocolException; + +import java.io.File; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.Test; + +import org.restcomm.connect.java.sdk.Transcriptions.*; +import com.github.tomakehurst.wiremock.client.WireMock; +import com.github.tomakehurst.wiremock.junit.WireMockRule; +import org.restcomm.connect.java.sdk.Exceptions.*; +import org.restcomm.connect.java.sdk.Restcomm; + +import org.junit.rules.ExpectedException; +import java.io.IOException; + +public class TranscriptionTest extends BasicTest{ + + private String path = "src/test/java/org/restcomm/connect/java/sdk/Transcriptions/TextFiles/"; + private String TranscriptionSid = "RF20000000000000000000000000000001"; + @Rule + public WireMockRule wireMockRule = new WireMockRule(8080); + + @Test + public void testGetTranscription() throws Exception{ + WireMock.stubFor(WireMock.get(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/Transcriptions.json/"+TranscriptionSid)) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "Transcription/json") + .withBody(readFile(path+"getTranscription.txt")))); + + Transcription a = Transcription.getTranscription(TranscriptionSid); + + WireMock.verify(WireMock.getRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/Transcriptions.json/"+TranscriptionSid))); + assertEquals(200, Restcomm.getStatusCode()); + assertEquals(TranscriptionSid,a.getSid()); + } + + @Test + public void testTranscriptionList() throws Exception{ + WireMock.stubFor(WireMock.get(WireMock.urlPathMatching("/Accounts/"+Restcomm.getAuthID()+"/Transcriptions.json")) + .withBasicAuth(Restcomm.getAuthID(),Restcomm.getPassword()) + .withQueryParam("PageSize", WireMock.equalTo("1")) + .willReturn(WireMock.aResponse() + .withStatus(200) + .withHeader("Content-Type", "Transcription/json") + .withBody(readFile(path+"getTranscriptionList.txt")))); + + TranscriptionList a = TranscriptionList.getFilteredList().PageSize("1").Filter(); + + Transcription b = a.get(0); + + WireMock.verify(WireMock.getRequestedFor(WireMock.urlEqualTo("/Accounts/"+Restcomm.getAuthID()+"/Transcriptions.json?PageSize=1"))); + assertEquals(200,Restcomm.getStatusCode()); + assertNotNull(a); + assertEquals("RF20000000000000000000000000000001",b.getSid()); + + } +} \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Emails/Email.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Emails/Email.class new file mode 100644 index 0000000..490b133 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Emails/Email.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Emails/EmailCreator.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Emails/EmailCreator.class new file mode 100644 index 0000000..fd74fee Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Emails/EmailCreator.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.class new file mode 100644 index 0000000..9accc81 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/Notification.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/Notification.class new file mode 100644 index 0000000..e669181 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/Notification.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/NotificationList.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/NotificationList.class new file mode 100644 index 0000000..8581d88 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Notifications/NotificationList.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Recordings/FilteredRecordingList.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Recordings/FilteredRecordingList.class new file mode 100644 index 0000000..62a39c4 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Recordings/FilteredRecordingList.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Recordings/Recording.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Recordings/Recording.class new file mode 100644 index 0000000..9a1ed9b Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Recordings/Recording.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Recordings/RecordingList.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Recordings/RecordingList.class new file mode 100644 index 0000000..de7acd6 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Recordings/RecordingList.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.class new file mode 100644 index 0000000..055b38b Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMS.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMS.class new file mode 100644 index 0000000..4524873 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMS.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMSCreator.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMSCreator.class new file mode 100644 index 0000000..921cf1f Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMSCreator.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMSList.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMSList.class new file mode 100644 index 0000000..44f496c Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/SMS/SMSList.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Transcriptions/FilteredTranscriptionList.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Transcriptions/FilteredTranscriptionList.class new file mode 100644 index 0000000..b58bbe8 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Transcriptions/FilteredTranscriptionList.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Transcriptions/Transcription.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Transcriptions/Transcription.class new file mode 100644 index 0000000..8048ac1 Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Transcriptions/Transcription.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionList.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionList.class new file mode 100644 index 0000000..cf1fd7d Binary files /dev/null and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionList.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Utilities.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Utilities.class index 8d015f5..75bd972 100644 Binary files a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Utilities.class and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/Utilities.class differ diff --git a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/http/Request.class b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/http/Request.class index 6131d5a..60b7e86 100644 Binary files a/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/http/Request.class and b/restcomm-connect.java.sdk/target/classes/org/restcomm/connect/java/sdk/http/Request.class differ diff --git a/restcomm-connect.java.sdk/target/maven-archiver/pom.properties b/restcomm-connect.java.sdk/target/maven-archiver/pom.properties index f72e5c4..ad573da 100644 --- a/restcomm-connect.java.sdk/target/maven-archiver/pom.properties +++ b/restcomm-connect.java.sdk/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Thu Jun 22 17:43:11 GMT+05:30 2017 +#Thu Jun 29 17:51:14 GMT+05:30 2017 version=0.0.1-SNAPSHOT groupId=org.restcomm artifactId=restcomm-connect.java.sdk diff --git a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst index 3c7186b..f071b8b 100644 --- a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -1,29 +1,44 @@ org/restcomm/connect/java/sdk/ExceptionHandler.class org/restcomm/connect/java/sdk/Applications/ApplicationUpdater.class +org/restcomm/connect/java/sdk/Recordings/FilteredRecordingList.class org/restcomm/connect/java/sdk/http/HttpMethod.class org/restcomm/connect/java/sdk/Calls/Call.class org/restcomm/connect/java/sdk/Clients/ClientCreator.class org/restcomm/connect/java/sdk/Applications/Application.class org/restcomm/connect/java/sdk/Accounts/SubAccount.class +org/restcomm/connect/java/sdk/SMS/SMSList.class +org/restcomm/connect/java/sdk/Transcriptions/FilteredTranscriptionList.class org/restcomm/connect/java/sdk/Calls/CallModifier.class org/restcomm/connect/java/sdk/Clients/ClientList$1.class org/restcomm/connect/java/sdk/Applications/ApplicationCreator.class -org/restcomm/connect/java/sdk/Accounts/SubAccountCreator.class +org/restcomm/connect/java/sdk/Transcriptions/Transcription.class org/restcomm/connect/java/sdk/Accounts/SubAccountList.class +org/restcomm/connect/java/sdk/Accounts/SubAccountCreator.class org/restcomm/connect/java/sdk/Restcomm.class org/restcomm/connect/java/sdk/Calls/CallCreator.class +org/restcomm/connect/java/sdk/SMS/SMS.class org/restcomm/connect/java/sdk/http/HttpClient.class org/restcomm/connect/java/sdk/Applications/ApplicationList.class org/restcomm/connect/java/sdk/Accounts/AccountUpdater.class org/restcomm/connect/java/sdk/Applications/ApplicationList$1.class org/restcomm/connect/java/sdk/Exceptions/ResourceNotFoundException.class -org/restcomm/connect/java/sdk/Accounts/SubAccountList$1.class -org/restcomm/connect/java/sdk/Utilities.class +org/restcomm/connect/java/sdk/Emails/Email.class org/restcomm/connect/java/sdk/http/Request.class +org/restcomm/connect/java/sdk/Utilities.class +org/restcomm/connect/java/sdk/Accounts/SubAccountList$1.class org/restcomm/connect/java/sdk/Accounts/SubAccountUpdater.class org/restcomm/connect/java/sdk/Clients/ClientList.class +org/restcomm/connect/java/sdk/Notifications/NotificationList.class +org/restcomm/connect/java/sdk/Notifications/Notification.class +org/restcomm/connect/java/sdk/SMS/FilteredSMSList.class +org/restcomm/connect/java/sdk/Recordings/Recording.class org/restcomm/connect/java/sdk/Clients/ClientUpdater.class -org/restcomm/connect/java/sdk/Calls/CallsList.class org/restcomm/connect/java/sdk/ListUtil.class +org/restcomm/connect/java/sdk/Calls/CallsList.class +org/restcomm/connect/java/sdk/SMS/SMSCreator.class +org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.class +org/restcomm/connect/java/sdk/Transcriptions/TranscriptionList.class org/restcomm/connect/java/sdk/Clients/Client.class +org/restcomm/connect/java/sdk/Emails/EmailCreator.class org/restcomm/connect/java/sdk/Accounts/Account.class +org/restcomm/connect/java/sdk/Recordings/RecordingList.class diff --git a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst index 1f72faf..618051f 100644 --- a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -1,26 +1,41 @@ +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/NotificationList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Applications/ApplicationCreator.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Accounts/AccountUpdater.java -/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Clients/ClientCreator.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Accounts/SubAccount.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Clients/ClientCreator.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/Email.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Recordings/RecordingList.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Recordings/FilteredRecordingList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Accounts/Account.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Clients/ClientList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Applications/ApplicationList.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/FilteredSMSList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Restcomm.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/FilteredNotificationList.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Transcriptions/FilteredTranscriptionList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Accounts/SubAccountCreator.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Applications/ApplicationUpdater.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Notifications/Notification.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMS.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Calls/Call.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSCreator.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Accounts/SubAccountList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/ExceptionHandler.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Exceptions/ResourceNotFoundException.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Utilities.java -/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Applications/Application.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/HttpMethod.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Applications/Application.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Recordings/Recording.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Emails/EmailCreator.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/Request.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Calls/CallsList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Accounts/SubAccountUpdater.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Calls/CallCreator.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Calls/CallModifier.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Clients/ClientUpdater.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/SMS/SMSList.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Clients/Client.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/ListUtil.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/Transcriptions/Transcription.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/main/java/org/restcomm/connect/java/sdk/http/HttpClient.java diff --git a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst index 6557110..c2b6f51 100644 --- a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +++ b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst @@ -1,6 +1,11 @@ +org/restcomm/connect/java/sdk/SMS/SMSTest.class +org/restcomm/connect/java/sdk/Transcriptions/TranscriptionTest.class +org/restcomm/connect/java/sdk/Clients/ClientTest.class +org/restcomm/connect/java/sdk/Notifications/NotificationTest.class org/restcomm/connect/java/sdk/Accounts/SubAccountTest.class +org/restcomm/connect/java/sdk/Recordings/RecordingTest.class org/restcomm/connect/java/sdk/BasicTest.class org/restcomm/connect/java/sdk/Applications/ApplicationTest.class org/restcomm/connect/java/sdk/Accounts/AccountTest.class -org/restcomm/connect/java/sdk/Clients/ClientTest.class +org/restcomm/connect/java/sdk/Emails/EmailTest.class org/restcomm/connect/java/sdk/Calls/CallTest.class diff --git a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst index a590cfb..f7b47cb 100644 --- a/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +++ b/restcomm-connect.java.sdk/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -1,6 +1,11 @@ /home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Calls/CallTest.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/BasicTest.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Accounts/SubAccountTest.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionTest.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Accounts/AccountTest.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Clients/ClientTest.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/SMS/SMSTest.java /home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Applications/ApplicationTest.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Recordings/RecordingTest.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Notifications/NotificationTest.java +/home/mithilesh/workspace/restcomm-connect.java.sdk/src/test/java/org/restcomm/connect/java/sdk/Emails/EmailTest.java diff --git a/restcomm-connect.java.sdk/target/restcomm-connect.java.sdk-0.0.1-SNAPSHOT.jar b/restcomm-connect.java.sdk/target/restcomm-connect.java.sdk-0.0.1-SNAPSHOT.jar index 84dc16d..4a73a6c 100644 Binary files a/restcomm-connect.java.sdk/target/restcomm-connect.java.sdk-0.0.1-SNAPSHOT.jar and b/restcomm-connect.java.sdk/target/restcomm-connect.java.sdk-0.0.1-SNAPSHOT.jar differ diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.AccountTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.AccountTest.xml index 1992aef..fa6118b 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.AccountTest.xml +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.AccountTest.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ "/> - + @@ -60,6 +60,6 @@ - - + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.SubAccountTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.SubAccountTest.xml index e58b0d8..df58d05 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.SubAccountTest.xml +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Accounts.SubAccountTest.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ "/> - + @@ -60,8 +60,8 @@ - - - - + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Applications.ApplicationTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Applications.ApplicationTest.xml index 7af564c..4d0ef39 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Applications.ApplicationTest.xml +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Applications.ApplicationTest.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ "/> - + @@ -60,9 +60,9 @@ - - - - - + + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Calls.CallTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Calls.CallTest.xml index c6c6fff..aae27ad 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Calls.CallTest.xml +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Calls.CallTest.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ "/> - + @@ -60,8 +60,8 @@ - - - - + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Clients.ClientTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Clients.ClientTest.xml index 49e9ffd..72d8866 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Clients.ClientTest.xml +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Clients.ClientTest.xml @@ -1,5 +1,5 @@ - + @@ -25,7 +25,7 @@ "/> - + @@ -60,8 +60,8 @@ - - - - + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Emails.EmailTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Emails.EmailTest.xml new file mode 100644 index 0000000..2a8227d --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Emails.EmailTest.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Notifications.NotificationTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Notifications.NotificationTest.xml new file mode 100644 index 0000000..412edaf --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Notifications.NotificationTest.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Recordings.RecordingTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Recordings.RecordingTest.xml new file mode 100644 index 0000000..4d0f343 --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Recordings.RecordingTest.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.SMS.SMSTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.SMS.SMSTest.xml new file mode 100644 index 0000000..efaed7b --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.SMS.SMSTest.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Transcriptions.TranscriptionTest.xml b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Transcriptions.TranscriptionTest.xml new file mode 100644 index 0000000..0004ab6 --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/TEST-org.restcomm.connect.java.sdk.Transcriptions.TranscriptionTest.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.AccountTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.AccountTest.txt index ba53dc4..68df6b0 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.AccountTest.txt +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.AccountTest.txt @@ -1,4 +1,4 @@ ------------------------------------------------------------------------------- Test set: org.restcomm.connect.java.sdk.Accounts.AccountTest ------------------------------------------------------------------------------- -Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.177 sec +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.229 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.SubAccountTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.SubAccountTest.txt index 203cd98..723fc2c 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.SubAccountTest.txt +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Accounts.SubAccountTest.txt @@ -1,4 +1,4 @@ ------------------------------------------------------------------------------- Test set: org.restcomm.connect.java.sdk.Accounts.SubAccountTest ------------------------------------------------------------------------------- -Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.678 sec +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.942 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Applications.ApplicationTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Applications.ApplicationTest.txt index d222e24..986abc3 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Applications.ApplicationTest.txt +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Applications.ApplicationTest.txt @@ -1,4 +1,4 @@ ------------------------------------------------------------------------------- Test set: org.restcomm.connect.java.sdk.Applications.ApplicationTest ------------------------------------------------------------------------------- -Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.362 sec +Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.384 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Calls.CallTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Calls.CallTest.txt index 9da2d8a..d960100 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Calls.CallTest.txt +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Calls.CallTest.txt @@ -1,4 +1,4 @@ ------------------------------------------------------------------------------- Test set: org.restcomm.connect.java.sdk.Calls.CallTest ------------------------------------------------------------------------------- -Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.306 sec +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.324 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Clients.ClientTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Clients.ClientTest.txt index a1b9a90..9b61aae 100644 --- a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Clients.ClientTest.txt +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Clients.ClientTest.txt @@ -1,4 +1,4 @@ ------------------------------------------------------------------------------- Test set: org.restcomm.connect.java.sdk.Clients.ClientTest ------------------------------------------------------------------------------- -Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.291 sec +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.361 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Emails.EmailTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Emails.EmailTest.txt new file mode 100644 index 0000000..15665c2 --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Emails.EmailTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: org.restcomm.connect.java.sdk.Emails.EmailTest +------------------------------------------------------------------------------- +Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.082 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Notifications.NotificationTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Notifications.NotificationTest.txt new file mode 100644 index 0000000..e725c5b --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Notifications.NotificationTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: org.restcomm.connect.java.sdk.Notifications.NotificationTest +------------------------------------------------------------------------------- +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.216 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Recordings.RecordingTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Recordings.RecordingTest.txt new file mode 100644 index 0000000..65c439b --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Recordings.RecordingTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: org.restcomm.connect.java.sdk.Recordings.RecordingTest +------------------------------------------------------------------------------- +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.12 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.SMS.SMSTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.SMS.SMSTest.txt new file mode 100644 index 0000000..dee2cd0 --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.SMS.SMSTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: org.restcomm.connect.java.sdk.SMS.SMSTest +------------------------------------------------------------------------------- +Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.205 sec diff --git a/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Transcriptions.TranscriptionTest.txt b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Transcriptions.TranscriptionTest.txt new file mode 100644 index 0000000..eaa2e8c --- /dev/null +++ b/restcomm-connect.java.sdk/target/surefire-reports/org.restcomm.connect.java.sdk.Transcriptions.TranscriptionTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: org.restcomm.connect.java.sdk.Transcriptions.TranscriptionTest +------------------------------------------------------------------------------- +Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.172 sec diff --git a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/BasicTest.class b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/BasicTest.class index 546376e..25a2dc0 100644 Binary files a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/BasicTest.class and b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/BasicTest.class differ diff --git a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Clients/ClientTest.class b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Clients/ClientTest.class index 7946fa7..ba81a7b 100644 Binary files a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Clients/ClientTest.class and b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Clients/ClientTest.class differ diff --git a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Emails/EmailTest.class b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Emails/EmailTest.class new file mode 100644 index 0000000..15f0ede Binary files /dev/null and b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Emails/EmailTest.class differ diff --git a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Notifications/NotificationTest.class b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Notifications/NotificationTest.class new file mode 100644 index 0000000..dcf00e8 Binary files /dev/null and b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Notifications/NotificationTest.class differ diff --git a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Recordings/RecordingTest.class b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Recordings/RecordingTest.class new file mode 100644 index 0000000..2ebecc9 Binary files /dev/null and b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Recordings/RecordingTest.class differ diff --git a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/SMS/SMSTest.class b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/SMS/SMSTest.class new file mode 100644 index 0000000..81be86c Binary files /dev/null and b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/SMS/SMSTest.class differ diff --git a/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionTest.class b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionTest.class new file mode 100644 index 0000000..156694a Binary files /dev/null and b/restcomm-connect.java.sdk/target/test-classes/org/restcomm/connect/java/sdk/Transcriptions/TranscriptionTest.class differ