Skip to content

Commit e029eff

Browse files
Merge branch 'master' into DEVED-3017
2 parents d669d9b + d7d00d6 commit e029eff

File tree

127 files changed

+308
-307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+308
-307
lines changed

client/capability-token-incoming/capability-token.6.x.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def get_capability_token():
1515
capability = ClientCapabilityToken(account_sid, auth_token)
1616

1717
capability.allow_client_incoming("joey")
18-
token = capability.generate()
18+
token = capability.to_jwt()
1919

2020
return Response(token, mimetype='application/jwt')
2121

client/response-twiml-client/response-twiml-client.7.x.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import javax.servlet.http.HttpServletResponse;
77

88
import com.twilio.twiml.*;
9-
import com.twilio.twiml.Number;
9+
import com.twilio.twiml.voice.Number;
1010

1111
@WebServlet(name = "TwilioServlet", urlPatterns = {"/voice"})
1212
public class TwilioServlet extends HttpServlet {

client/response-twiml-dial/response-twiml-dial.7.x.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import javax.servlet.http.HttpServletResponse;
77

88
import com.twilio.twiml.*;
9-
import com.twilio.twiml.Number;
9+
import com.twilio.twiml.voice.Number;
1010

1111
@WebServlet(name = "TwilioServlet", urlPatterns = {"/voice"})
1212
public class TwilioServlet extends HttpServlet {

client/response-twiml/response-twiml.7.x.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import javax.servlet.http.HttpServletRequest;
55
import javax.servlet.http.HttpServletResponse;
66

7-
import com.twilio.twiml.Say;
7+
import com.twilio.twiml.voice.Say;
88
import com.twilio.twiml.TwiMLException;
99
import com.twilio.twiml.VoiceResponse;
1010

guides/migration/java-6-to-7/basic-say-twiml/basic-say-twiml.7.x.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import com.twilio.twiml.VoiceResponse;
2-
import com.twilio.twiml.Say;
2+
import com.twilio.twiml.voice.Say;
3+
import com.twilio.twiml.voice.Say.Language;
34
import com.twilio.twiml.TwiMLException;
4-
import com.twilio.twiml.Language;
5+
56

67
public class Example {
78
public static void main(String[] args) {

guides/migration/java-6-to-7/gather-say-twiml/gather-say-twiml.7.x.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
import com.twilio.twiml.Gather;
1+
import com.twilio.twiml.voice.Gather;
2+
import com.twilio.twiml.voice.Gather.Input;
23
import com.twilio.twiml.VoiceResponse;
3-
import com.twilio.twiml.Say;
4+
import com.twilio.twiml.voice.Say;
45
import com.twilio.twiml.TwiMLException;
56

67

78
public class Example {
89
public static void main(String[] args) {
910
Say say = new Say
1011
.Builder("Welcome to Twilio, please tell us why you're calling").build();
11-
Gather gather = new Gather.Builder().input("speech")
12+
Gather gather = new Gather.Builder().input(Input.SPEECH)
1213
.action("/completed").say(say).build();
1314
VoiceResponse response = new VoiceResponse.Builder().gather(gather)
1415
.build();

guides/migration/java-6-to-7/send-mms-twiml/send-mms-twiml.7.x.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import com.twilio.twiml.Body;
2-
import com.twilio.twiml.Media;
3-
import com.twilio.twiml.Message;
1+
import com.twilio.twiml.messaging.Body;
2+
import com.twilio.twiml.messaging.Media;
3+
import com.twilio.twiml.messaging.Message;
44
import com.twilio.twiml.MessagingResponse;
55
import com.twilio.twiml.TwiMLException;
66

77

88
public class Example {
99
public static void main(String[] args) {
10-
Body body = new Body("Hello friend");
11-
Media media = new Media("https://demo.twilio.com/owl.png");
10+
Body body = new Body.Builder("Hello friend").build();
11+
Media media = new Media.Builder("https://demo.twilio.com/owl.png").build();
1212
Message message = new Message.Builder().body(body).media(media).build();
1313
MessagingResponse response = new MessagingResponse.Builder()
1414
.message(message).build();

guides/migration/java-6-to-7/send-sms-twiml/send-sms-twiml.7.x.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import com.twilio.twiml.Body;
2-
import com.twilio.twiml.Message;
1+
import com.twilio.twiml.messaging.Body;
2+
import com.twilio.twiml.messaging.Message;
33
import com.twilio.twiml.MessagingResponse;
44
import com.twilio.twiml.TwiMLException;
55

66

77
public class Example {
88
public static void main(String[] args) {
9-
Body body = new Body("Store Location: 123 Easy St.");
9+
Body body = new Body.Builder("Store Location: 123 Easy St.").build();
1010
Message message = new Message.Builder().body(body).build();
1111
MessagingResponse response = new MessagingResponse.Builder()
1212
.message(message).build();

guides/voice/conference-calls-guide/moderated-conference/moderated-conference.7.x.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import javax.servlet.http.HttpServletRequest;
77
import javax.servlet.http.HttpServletResponse;
88

9-
import com.twilio.twiml.Conference;
10-
import com.twilio.twiml.Dial;
9+
import com.twilio.twiml.voice.Conference;
10+
import com.twilio.twiml.voice.Dial;
1111
import com.twilio.twiml.TwiMLException;
1212
import com.twilio.twiml.VoiceResponse;
1313

guides/voice/gather-dtmf-tones-guide/gather-example-step-0/example.7.x.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import com.twilio.twiml.Gather;
2-
import com.twilio.twiml.Redirect;
3-
import com.twilio.twiml.Say;
1+
import com.twilio.twiml.voice.Gather;
2+
import com.twilio.twiml.voice.Redirect;
3+
import com.twilio.twiml.voice.Say;
44
import com.twilio.twiml.TwiML;
55
import com.twilio.twiml.TwiMLException;
66
import com.twilio.twiml.VoiceResponse;

0 commit comments

Comments
 (0)