twilio / twilio-python

A Python module for communicating with the Twilio API and generating TwiML.
MIT License
1.82k stars 696 forks source link

Add update and remove operations to client.studio.v2.flows.update #786

Open allavytalize opened 4 months ago

allavytalize commented 4 months ago

Issue Summary

This is a feature request. Twilio studio api already supports update and remove operations. Why not add them on the twilio-python client just like create? https://www.twilio.com/docs/studio/rest-api/v2/flow#update-a-flow-resource https://www.twilio.com/docs/studio/rest-api/v2/flow#delete-a-flow-resource

Steps to Reproduce

  1. Try to use update or remove operation on v2.flows resource.

Code Snippet

from twilio.rest import Client
client = Client(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN)
client.studio.v2.flows.update(...)

Exception/Log

AttributeError: 'FlowList' object has no attribute 'update'

Technical details:

tiwarishubham635 commented 4 months ago

Hi @allavytalize! The fetch, update and delete functions are available for a specific Flow resource only. Thus if you want to update a particular Flow resource, you are required to provide its sid like FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. While in case of create you are creating a new Flow resource, in case of list you are listing all the resources. Thus no particular Flow resource sid is required. I think this helps!