Skip to content

Commit

Permalink
Pequenas melhorias
Browse files Browse the repository at this point in the history
  • Loading branch information
Luís Gustavo Cuozzo committed Oct 13, 2020
1 parent 2f3769f commit dcc44ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Testado com Python 3.7. Para dependências, ver _requirements.txt_.
Para instalação automática do SDK e dependências via `pip`, execute a linha abaixo:

```shell
$ pip install git+https://github.com/CPqD/trd-sdk-python.git@master
$ pip install git+https://github.com/CPqD/trd-sdk-python.git@feature/api-v3
```

#### Servidor WSGI para _callbacks_ via Webhooks
Expand All @@ -37,9 +37,11 @@ simples para acesso externo.
from cpqdtrd import TranscriptionClient

client = TranscriptionClient(
api_url="https://speech.cpqd.com.br/trd",
webhook_port=8443, # Outbound, precisa de redirecionamento para a WAN
api_url="https://speech.cpqd.com.br/trd/v3",
webhook_port=443, # Outbound, precisa de redirecionamento para a WAN
webhook_host="100.100.100.100", # IP externo ou DNS
webhook_listener='0.0.0.0',
webhook_protocol="https",
username="<username>",
password="<password>"
)
Expand Down
3 changes: 1 addition & 2 deletions cpqdtrd/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(
raise self.TimeoutException(msg)

def create(self, file_path: str, tag: str = None, config: List[str] = None, callbacks_url: List = []):
upload_request = "{}/job/create/".format(self._url)
upload_request = "{}/job/create".format(self._url)
if tag:
upload_request += "?tag={}".format(tag)

Expand Down Expand Up @@ -152,7 +152,6 @@ def webhook_validate(
payload["timeout"] = int(timeout)
if retries:
payload["retries"] = int(retries)

if crt is not None:
r = requests.post(
test_request, params=payload, auth=self._auth, json={"crt": crt, "token": token}
Expand Down

0 comments on commit dcc44ff

Please sign in to comment.