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

Implementa requisições assícronas para obter mais ocorrências, mais rápido #64

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

cuducos
Copy link
Collaborator

@cuducos cuducos commented Oct 23, 2023

Examplo de uso da nova implementação:

In [1]: from crossfire.client import Client

In [2]: client = Client()

In [3]: client.states()
Out[3]: 
[{'id': 'b112ffbe-17b3-4ad0-8f2a-2038745d1d14', 'name': 'Rio de Janeiro'},
 {'id': '813ca36b-91e3-4a18-b408-60b27a1942ef', 'name': 'Pernambuco'},
 {'id': 'd3a9b545-7056-4dc6-9b68-ce320c9edffc', 'name': 'Bahia'},
 {'id': '2a98a020-3815-45d7-a6f6-6de2119eba8b', 'name': 'Para'}]

In [4]: client.occurrences('813ca36b-91e3-4a18-b408-60b27a1942ef')

Isso cria uma barra de progresso e carrega todas as ocorrências dessa UF da API.

@FelipeSBarros FelipeSBarros merged commit 9410624 into FelipeSBarros:master Oct 23, 2023
1 check passed
@FelipeSBarros
Copy link
Owner

Fiz o teste mencionado na mensagem e está rodando bem... 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants