team-telnyx / telnyx-python

Python SDK for the Telnyx API
MIT License
49 stars 16 forks source link

Gather DTFM #70

Closed PhenomAmd closed 7 months ago

PhenomAmd commented 2 years ago

I have been reading your documentation the whole day regarding the api ussage, first of all i find myself with something weird:

import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.Calls.post_actions.post_gather.create(client_state="aGF2ZSBhIG5pY2UgZGF5ID1d",command_id="891510ac-f3e4-11e8-af5b-de00688a4901")

first error here is that there is no "Calls" method inside telnyx but Call imagen

second theres no post actions inside Call imagen

so i tried the most common thing around watching another languages to figure out how to call gather then i see ruby wich only starts a call

imagen

then watched php wich also just starts a call

\Telnyx\Telnyx::setApiKey('YOUR_API_KEY');

\Telnyx\Call::Create(["client_state" => "aGF2ZSBhIG5pY2UgZGF5ID1d","command_id" => "891510ac-f3e4-11e8-af5b-de00688a4901"]);

then saw curl wich seems to gather something nevertheless it doesnt seem to gather nothing aswell

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"client_state":"aGF2ZSBhIG5pY2UgZGF5ID1d","command_id":"891510ac-f3e4-11e8-af5b-de00688a4901"}' \
  https://api.telnyx.com/v2/calls/{call_control_id}/actions/gather

which makes me think did you made this on purpose or is it a hard error or maybe im totally blind or maybe its just a wrong method please update your documentation or at least provide an actual working example instead of "pseudo-commands"

ADandyGuyInSpace commented 7 months ago

Method should now be documented on live site, apologies for the trouble and late response.