Skip to content

Conversation

matsk-sinch
Copy link
Contributor

No description provided.

Copy link

@asein-sinch asein-sinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it going to be a root commit that will reset all the history? It should be the case as there is nothing to save from the previous version

number_type="LOCAL"
)
page_counter = 1
while active_numbers:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me check if I understand correctly: this will evaluate to True only is the API call is successful. Then you'll enter in the loop and start displaying the numbers page by page.
active_numbers will be updated within the loop and should always be evaluated to True as long as the API answers properly.
But in the case there is an error with the API, wouldn't the SDK raise an error? If so, then it would mean this loop is unreachable.
All of this to say: wouldn't it be more readable to use while True: ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,7 @@
def execute(numbers_service):
phone_number = "YOUR_PHONE_NUMBER"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't be "YOUR" phone number but "A" phone number as at this moment, you haven't rented it yet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done



def execute(numbers_service):
phone_number = "YOUR_PHONE_NUMBER"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. I just checked what I did in the node.js snippets and I call it available_phone_number_to_be_rented

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment on lines 10 to 12
voice_configuration: VoiceConfigurationDictType = {
"app_id": "YOUR_APP_ID",
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although it's not mandatory for backward compatibility reasons, I think it's best to showcase the type property too (RTC for the app_id use case)

Note for myself: do it too for Node.js :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

def callback_configuration_get(numbers_service):
response = numbers_service.callback_configuration.get()

print("Callback Configuration:", response)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: add a space after the :

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@matsk-sinch matsk-sinch force-pushed the DEVEXP_785-Python-Snippets branch from 4047dfc to 3c1f783 Compare April 16, 2025 14:58
@matsk-sinch
Copy link
Contributor Author

Created an orphan branch

@matsk-sinch matsk-sinch deleted the DEVEXP_785-Python-Snippets branch April 16, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants