Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Communication]: Cleaned up ACS samples #18656

Merged
merged 2 commits into from
May 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
USAGE:
python identity_samples.py
Set the environment variables with your own values before running the sample:
2) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
3) AZURE_CLIENT_ID - the client ID of your active directory application
4) AZURE_CLIENT_SECRET - the secret of your active directory application
5) AZURE_TENANT_ID - the tenant ID of your active directory application
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
2) AZURE_CLIENT_ID - the client ID of your active directory application
3) AZURE_CLIENT_SECRET - the secret of your active directory application
4) AZURE_TENANT_ID - the tenant ID of your active directory application
"""
import os
from azure.communication.identity._shared.utils import parse_connection_str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
python identity_samples_async.py
Set the environment variables with your own values before running the sample:
1) AZURE_COMMUNICATION_SERVICE_ENDPOINT - Communication Service endpoint url
2) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
2) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
3) AZURE_CLIENT_ID - the client ID of your active directory application
4) AZURE_CLIENT_SECRET - the secret of your active directory application
5) AZURE_TENANT_ID - the tenant ID of your active directory application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
python purchase_phone_number_sample.py
Set the environment variables with your own values before running the sample:
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and
access key of your Azure Communication Service 2) AZURE_COMMUNICATION_SERVICE_SEARCH_ID_TO_PURCHASE - The search id for the phone number you reserved and want to purchase
access key of your Azure Communication Service
2) AZURE_COMMUNICATION_SERVICE_SEARCH_ID_TO_PURCHASE - The search id for the phone number you
reserved and want to purchase
"""

import os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
USAGE:
python send_sms_to_multiple_recipients_sample.py
Set the environment variable with your own value before running the sample:
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
2) AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER - a phone number with SMS capabilities in your ACS resource
"""

import os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
USAGE:
python send_sms_to_multiple_recipients_sample_async.py
Set the environment variable with your own value before running the sample:
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
2) AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER - a phone number with SMS capabilities in your ACS resource
"""

import os
Expand All @@ -37,7 +38,7 @@ async def send_sms_to_multiple_recipients_async(self):
# calling send() with sms values
sms_responses = await sms_client.send(
from_=self.phone_number,
to=[self.phone_number,self.phone_number],
to=[self.phone_number, self.phone_number],
message="Hello World via SMS",
enable_delivery_report=True, # optional property
tag="custom-tag") # optional property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
USAGE:
python send_sms_to_single_recipient_sample.py
Set the environment variable with your own value before running the sample:
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
2) AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER - a phone number with SMS capabilities in your ACS resource
"""

import os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
USAGE:
python send_sms_to_single_recipient_sample_async.py
Set the environment variable with your own value before running the sample:
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
2) AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER - a phone number with SMS capabilities in your ACS resource
"""

import os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
USAGE:
python sms_token_credential_auth_sample.py
Set the environment variable with your own value before running the sample:
1) AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING - the connection string in your ACS account
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
2) AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER - a phone number with SMS capabilities in your ACS resource
"""

import os
Expand All @@ -27,7 +28,7 @@

class SmsTokenCredentialAuthSample(object):

connection_str = os.getenv('AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING')
connection_str = os.getenv('COMMUNICATION_SAMPLES_CONNECTION_STRING')
phone_number = os.getenv("AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER")

def sms_token_credential_auth(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
USAGE:
python sms_token_credential_auth_sample_async.py
Set the environment variable with your own value before running the sample:
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
2) AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER - a phone number with SMS capabilities in your ACS resource
"""

import os
Expand Down