Skip to content

Commit f8240c4

Browse files
author
childish-sambino
authored
fix: only include list operations if a path is present (#682)
1 parent ab49546 commit f8240c4

File tree

6 files changed

+0
-292
lines changed

6 files changed

+0
-292
lines changed

twilio/rest/accounts/v1/secondary_auth_token.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -36,38 +36,6 @@ def __init__(self, version: Version):
3636
# Path Solution
3737
self._solution = {}
3838

39-
def create(self):
40-
"""
41-
Create the SecondaryAuthTokenInstance
42-
43-
44-
:returns: The created SecondaryAuthTokenInstance
45-
:rtype: twilio.rest.accounts.v1.secondary_auth_token.SecondaryAuthTokenInstance
46-
"""
47-
48-
payload = self._version.create(
49-
method="POST",
50-
uri=self._uri,
51-
)
52-
53-
return SecondaryAuthTokenInstance(self._version, payload)
54-
55-
async def create_async(self):
56-
"""
57-
Asynchronously create the SecondaryAuthTokenInstance
58-
59-
60-
:returns: The created SecondaryAuthTokenInstance
61-
:rtype: twilio.rest.accounts.v1.secondary_auth_token.SecondaryAuthTokenInstance
62-
"""
63-
64-
payload = await self._version.create_async(
65-
method="POST",
66-
uri=self._uri,
67-
)
68-
69-
return SecondaryAuthTokenInstance(self._version, payload)
70-
7139
def get(self):
7240
"""
7341
Constructs a SecondaryAuthTokenContext

twilio/rest/flex_api/v1/insights_session.py

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -35,48 +35,6 @@ def __init__(self, version: Version):
3535
# Path Solution
3636
self._solution = {}
3737

38-
def create(self, authorization=values.unset):
39-
"""
40-
Create the InsightsSessionInstance
41-
42-
:param str authorization: The Authorization HTTP request header
43-
44-
:returns: The created InsightsSessionInstance
45-
:rtype: twilio.rest.flex_api.v1.insights_session.InsightsSessionInstance
46-
"""
47-
data = values.of({})
48-
headers = values.of(
49-
{
50-
"Authorization": authorization,
51-
}
52-
)
53-
payload = self._version.create(
54-
method="POST", uri=self._uri, data=data, headers=headers
55-
)
56-
57-
return InsightsSessionInstance(self._version, payload)
58-
59-
async def create_async(self, authorization=values.unset):
60-
"""
61-
Asynchronously create the InsightsSessionInstance
62-
63-
:param str authorization: The Authorization HTTP request header
64-
65-
:returns: The created InsightsSessionInstance
66-
:rtype: twilio.rest.flex_api.v1.insights_session.InsightsSessionInstance
67-
"""
68-
data = values.of({})
69-
headers = values.of(
70-
{
71-
"Authorization": authorization,
72-
}
73-
)
74-
payload = await self._version.create_async(
75-
method="POST", uri=self._uri, data=data, headers=headers
76-
)
77-
78-
return InsightsSessionInstance(self._version, payload)
79-
8038
def get(self):
8139
"""
8240
Constructs a InsightsSessionContext

twilio/rest/media/v1/player_streamer/playback_grant.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -39,58 +39,6 @@ def __init__(self, version: Version, sid: str):
3939
"sid": sid,
4040
}
4141

42-
def create(self, ttl=values.unset, access_control_allow_origin=values.unset):
43-
"""
44-
Create the PlaybackGrantInstance
45-
46-
:param int ttl: The time to live of the PlaybackGrant. Default value is 15 seconds. Maximum value is 60 seconds.
47-
:param str access_control_allow_origin: The full origin URL where the livestream can be streamed. If this is not provided, it can be streamed from any domain.
48-
49-
:returns: The created PlaybackGrantInstance
50-
:rtype: twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantInstance
51-
"""
52-
data = values.of(
53-
{
54-
"Ttl": ttl,
55-
"AccessControlAllowOrigin": access_control_allow_origin,
56-
}
57-
)
58-
59-
payload = self._version.create(
60-
method="POST",
61-
uri=self._uri,
62-
data=data,
63-
)
64-
65-
return PlaybackGrantInstance(self._version, payload, sid=self._solution["sid"])
66-
67-
async def create_async(
68-
self, ttl=values.unset, access_control_allow_origin=values.unset
69-
):
70-
"""
71-
Asynchronously create the PlaybackGrantInstance
72-
73-
:param int ttl: The time to live of the PlaybackGrant. Default value is 15 seconds. Maximum value is 60 seconds.
74-
:param str access_control_allow_origin: The full origin URL where the livestream can be streamed. If this is not provided, it can be streamed from any domain.
75-
76-
:returns: The created PlaybackGrantInstance
77-
:rtype: twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantInstance
78-
"""
79-
data = values.of(
80-
{
81-
"Ttl": ttl,
82-
"AccessControlAllowOrigin": access_control_allow_origin,
83-
}
84-
)
85-
86-
payload = await self._version.create_async(
87-
method="POST",
88-
uri=self._uri,
89-
data=data,
90-
)
91-
92-
return PlaybackGrantInstance(self._version, payload, sid=self._solution["sid"])
93-
9442
def get(self):
9543
"""
9644
Constructs a PlaybackGrantContext

twilio/rest/serverless/v1/service/build/build_status.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ def __init__(self, version: Version, service_sid: str, sid: str):
4040

4141

4242

43-
44-
4543
def get(self):
4644
"""
4745
Constructs a BuildStatusContext

twilio/rest/video/v1/composition_settings.py

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -35,88 +35,6 @@ def __init__(self, version: Version):
3535
# Path Solution
3636
self._solution = {}
3737

38-
def create(
39-
self,
40-
friendly_name,
41-
aws_credentials_sid=values.unset,
42-
encryption_key_sid=values.unset,
43-
aws_s3_url=values.unset,
44-
aws_storage_enabled=values.unset,
45-
encryption_enabled=values.unset,
46-
):
47-
"""
48-
Create the CompositionSettingsInstance
49-
50-
:param str friendly_name: A descriptive string that you create to describe the resource and show to the user in the console
51-
:param str aws_credentials_sid: The SID of the stored Credential resource.
52-
:param str encryption_key_sid: The SID of the Public Key resource to use for encryption.
53-
:param str aws_s3_url: The URL of the AWS S3 bucket where the compositions should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/compositions`, where `compositions` is the path in which you want the compositions to be stored. This URL accepts only URI-valid characters, as described in the <a href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>.
54-
:param bool aws_storage_enabled: Whether all compositions should be written to the `aws_s3_url`. When `false`, all compositions are stored in our cloud.
55-
:param bool encryption_enabled: Whether all compositions should be stored in an encrypted form. The default is `false`.
56-
57-
:returns: The created CompositionSettingsInstance
58-
:rtype: twilio.rest.video.v1.composition_settings.CompositionSettingsInstance
59-
"""
60-
data = values.of(
61-
{
62-
"FriendlyName": friendly_name,
63-
"AwsCredentialsSid": aws_credentials_sid,
64-
"EncryptionKeySid": encryption_key_sid,
65-
"AwsS3Url": aws_s3_url,
66-
"AwsStorageEnabled": aws_storage_enabled,
67-
"EncryptionEnabled": encryption_enabled,
68-
}
69-
)
70-
71-
payload = self._version.create(
72-
method="POST",
73-
uri=self._uri,
74-
data=data,
75-
)
76-
77-
return CompositionSettingsInstance(self._version, payload)
78-
79-
async def create_async(
80-
self,
81-
friendly_name,
82-
aws_credentials_sid=values.unset,
83-
encryption_key_sid=values.unset,
84-
aws_s3_url=values.unset,
85-
aws_storage_enabled=values.unset,
86-
encryption_enabled=values.unset,
87-
):
88-
"""
89-
Asynchronously create the CompositionSettingsInstance
90-
91-
:param str friendly_name: A descriptive string that you create to describe the resource and show to the user in the console
92-
:param str aws_credentials_sid: The SID of the stored Credential resource.
93-
:param str encryption_key_sid: The SID of the Public Key resource to use for encryption.
94-
:param str aws_s3_url: The URL of the AWS S3 bucket where the compositions should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/compositions`, where `compositions` is the path in which you want the compositions to be stored. This URL accepts only URI-valid characters, as described in the <a href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>.
95-
:param bool aws_storage_enabled: Whether all compositions should be written to the `aws_s3_url`. When `false`, all compositions are stored in our cloud.
96-
:param bool encryption_enabled: Whether all compositions should be stored in an encrypted form. The default is `false`.
97-
98-
:returns: The created CompositionSettingsInstance
99-
:rtype: twilio.rest.video.v1.composition_settings.CompositionSettingsInstance
100-
"""
101-
data = values.of(
102-
{
103-
"FriendlyName": friendly_name,
104-
"AwsCredentialsSid": aws_credentials_sid,
105-
"EncryptionKeySid": encryption_key_sid,
106-
"AwsS3Url": aws_s3_url,
107-
"AwsStorageEnabled": aws_storage_enabled,
108-
"EncryptionEnabled": encryption_enabled,
109-
}
110-
)
111-
112-
payload = await self._version.create_async(
113-
method="POST",
114-
uri=self._uri,
115-
data=data,
116-
)
117-
118-
return CompositionSettingsInstance(self._version, payload)
119-
12038
def get(self):
12139
"""
12240
Constructs a CompositionSettingsContext

twilio/rest/video/v1/recording_settings.py

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -35,88 +35,6 @@ def __init__(self, version: Version):
3535
# Path Solution
3636
self._solution = {}
3737

38-
def create(
39-
self,
40-
friendly_name,
41-
aws_credentials_sid=values.unset,
42-
encryption_key_sid=values.unset,
43-
aws_s3_url=values.unset,
44-
aws_storage_enabled=values.unset,
45-
encryption_enabled=values.unset,
46-
):
47-
"""
48-
Create the RecordingSettingsInstance
49-
50-
:param str friendly_name: A descriptive string that you create to describe the resource and be shown to users in the console
51-
:param str aws_credentials_sid: The SID of the stored Credential resource.
52-
:param str encryption_key_sid: The SID of the Public Key resource to use for encryption.
53-
:param str aws_s3_url: The URL of the AWS S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/recordings`, where `recordings` is the path in which you want the recordings to be stored. This URL accepts only URI-valid characters, as described in the <a href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>.
54-
:param bool aws_storage_enabled: Whether all recordings should be written to the `aws_s3_url`. When `false`, all recordings are stored in our cloud.
55-
:param bool encryption_enabled: Whether all recordings should be stored in an encrypted form. The default is `false`.
56-
57-
:returns: The created RecordingSettingsInstance
58-
:rtype: twilio.rest.video.v1.recording_settings.RecordingSettingsInstance
59-
"""
60-
data = values.of(
61-
{
62-
"FriendlyName": friendly_name,
63-
"AwsCredentialsSid": aws_credentials_sid,
64-
"EncryptionKeySid": encryption_key_sid,
65-
"AwsS3Url": aws_s3_url,
66-
"AwsStorageEnabled": aws_storage_enabled,
67-
"EncryptionEnabled": encryption_enabled,
68-
}
69-
)
70-
71-
payload = self._version.create(
72-
method="POST",
73-
uri=self._uri,
74-
data=data,
75-
)
76-
77-
return RecordingSettingsInstance(self._version, payload)
78-
79-
async def create_async(
80-
self,
81-
friendly_name,
82-
aws_credentials_sid=values.unset,
83-
encryption_key_sid=values.unset,
84-
aws_s3_url=values.unset,
85-
aws_storage_enabled=values.unset,
86-
encryption_enabled=values.unset,
87-
):
88-
"""
89-
Asynchronously create the RecordingSettingsInstance
90-
91-
:param str friendly_name: A descriptive string that you create to describe the resource and be shown to users in the console
92-
:param str aws_credentials_sid: The SID of the stored Credential resource.
93-
:param str encryption_key_sid: The SID of the Public Key resource to use for encryption.
94-
:param str aws_s3_url: The URL of the AWS S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/recordings`, where `recordings` is the path in which you want the recordings to be stored. This URL accepts only URI-valid characters, as described in the <a href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>.
95-
:param bool aws_storage_enabled: Whether all recordings should be written to the `aws_s3_url`. When `false`, all recordings are stored in our cloud.
96-
:param bool encryption_enabled: Whether all recordings should be stored in an encrypted form. The default is `false`.
97-
98-
:returns: The created RecordingSettingsInstance
99-
:rtype: twilio.rest.video.v1.recording_settings.RecordingSettingsInstance
100-
"""
101-
data = values.of(
102-
{
103-
"FriendlyName": friendly_name,
104-
"AwsCredentialsSid": aws_credentials_sid,
105-
"EncryptionKeySid": encryption_key_sid,
106-
"AwsS3Url": aws_s3_url,
107-
"AwsStorageEnabled": aws_storage_enabled,
108-
"EncryptionEnabled": encryption_enabled,
109-
}
110-
)
111-
112-
payload = await self._version.create_async(
113-
method="POST",
114-
uri=self._uri,
115-
data=data,
116-
)
117-
118-
return RecordingSettingsInstance(self._version, payload)
119-
12038
def get(self):
12139
"""
12240
Constructs a RecordingSettingsContext

0 commit comments

Comments
 (0)