File tree Expand file tree Collapse file tree 6 files changed +105
-4
lines changed
deployed-devices/rest/devices/retrieve-device Expand file tree Collapse file tree 6 files changed +105
-4
lines changed Original file line number Diff line number Diff line change 1
- const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
2
- const authToken = 'your_auth_token' ;
1
+ // Get the Node helper library from https://twilio.com/docs/libraries/node
2
+ const fs = require ( 'fs' ) ;
3
3
const Twilio = require ( 'twilio' ) . Twilio ;
4
4
5
+ // Get your Account SID and Auth Token from https://twilio.com/console
6
+ const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
7
+ const authToken = 'your_auth_token' ;
5
8
const client = new Twilio ( accountSid , authToken ) ;
6
- const fleet = client . preview . deployed_devices . fleets ( 'FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ) ;
7
9
8
- fleet
10
+ const fleetSid = 'FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
11
+ const fleetService = client . preview . deployed_devices . fleets ( fleetSid ) ;
12
+
13
+ fleetService
9
14
. devices ( 'THXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' )
10
15
. fetch ( )
11
16
. then ( response => {
Original file line number Diff line number Diff line change
1
+ // Get the Node helper library from https://twilio.com/docs/libraries/csharp
2
+ using System ;
3
+ using System . Collections . Generic ;
4
+ using Twilio ;
5
+ using Twilio . Rest . Preview . DeployedDevices . Fleet
6
+
7
+ public class Example
8
+ {
9
+ public static void Main ( string [ ] args )
10
+ {
11
+ // Get your Account SID and Auth Token from https://twilio.com/console
12
+ const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
13
+ const string authToken = "your_auth_token" ;
14
+ TwilioClient . Init ( accountSid , authToken ) ;
15
+
16
+ const string fleetSid = "FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
17
+ const string deviceSid = "THXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
18
+ const DeviceResource device = DeviceResource . Fetch ( fleetSid , deviceSid ) ;
19
+
20
+ Console . WriteLine ( device . Sid ) ;
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+ // Get the Node helper library from https://twilio.com/docs/libraries/php
3
+ require_once '/path/to/vendor/autoload.php ' ; // Loads the library
4
+
5
+ use Twilio \Rest \Client ;
6
+
7
+ // Get your Account SID and Auth Token from https://twilio.com/console
8
+ $ accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' ;
9
+ $ authToken = 'your_auth_token ' ;
10
+ $ client = new Client ($ sid , $ token );
11
+
12
+ $ fleetSid = 'FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' ;
13
+ $ fleetService = $ client ->preview ->deployedDevices ->fleets ($ fleetSid );
14
+
15
+ $ device = $ fleetService
16
+ ->devices ("THXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX " )
17
+ ->fetch ();
18
+
19
+ echo $ device ;
Original file line number Diff line number Diff line change
1
+ # Get the Node helper library from https://twilio.com/docs/libraries/ruby
2
+ require 'twilio-ruby'
3
+
4
+ # Get your Account SID and Auth Token from https://twilio.com/console
5
+ account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
6
+ auth_token = 'your_auth_token'
7
+ client = Twilio ::REST ::Client . new ( account_sid , auth_token )
8
+
9
+ fleet_sid = 'FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
10
+ fleet_service = client . preview . deployed_devices . fleets ( fleet_sid )
11
+
12
+ device = fleet_service
13
+ . devices ( "THXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" )
14
+ . fetch ( )
15
+
16
+ puts device
Original file line number Diff line number Diff line change
1
+ # Get the Node helper library from https://twilio.com/docs/libraries/python
2
+ from pathlib import Path
3
+ from Twilio .rest import Client
4
+
5
+ # Get your Account SID and Auth Token from https://twilio.com/console
6
+ account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
7
+ auth_token = 'your_auth_token'
8
+ client = Client (account_sid , auth_token )
9
+
10
+ fleet_sid = 'FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
11
+ fleet_service = client .preview .deployed_devices .fleets (fleet_sid )
12
+
13
+ device = fleet_service .devices ("THXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" )\
14
+ .fetch ()
15
+
16
+ print (device )
Original file line number Diff line number Diff line change
1
+ // Get the Node helper library from https://twilio.com/docs/libraries/java
2
+ import com .twilio .Twilio ;
3
+ import com .twilio .base .ResourceSet ;
4
+ import com .twilio .rest .preview .deployedDevices .fleet ;
5
+ import java .io .IOException ;
6
+ import java .nio .file .Files ;
7
+ import java .nio .file .Paths ;
8
+
9
+ public class Example {
10
+ // Get your Account SID and Auth Token from https://twilio.com/console
11
+ public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
12
+ public static final String AUTH_TOKEN = "your_auth_token" ;
13
+
14
+ public static void main (String [] args ) {
15
+ Twilio .init (ACCOUNT_SID , AUTH_TOKEN );
16
+
17
+ String fleetSid = "FLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
18
+ String deviceSid = "THXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ;
19
+ Device device = DeviceFetcher (fleetSid , deviceSid );
20
+
21
+ System .out .println (device .getSid ());
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments