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

Documentation Improvement - iterator vs get_object #116

Open
jaimeatwork opened this issue Sep 22, 2022 · 2 comments
Open

Documentation Improvement - iterator vs get_object #116

jaimeatwork opened this issue Sep 22, 2022 · 2 comments

Comments

@jaimeatwork
Copy link

jaimeatwork commented Sep 22, 2022

Original Submission:

      client.get_object fails when attempting to pull resolutions. 
      
      example:
      ```
      resolutions = client.get_object("/ip_addresses/46.232.251.191/resolutions")
      ```
      
      This works through the API developers console, but not via the vt-py library.
      
      https://developers.virustotal.com/reference/ip-relationships
    
      Is there an improvement that can be made in handling these responses?

While submitting this issue, I realized I should have been using the iterator to iterate through the response instead of the using the get_object method. I read through the examples in the documentation and didn't see any references to when I might need to use the iterator vs when I could use single object calls.

I read through the quick start (https://virustotal.github.io/vt-py/quickstart.html) and the examples, but it wasn't clear that some endpoints don't support single get_object calls and need to be iterated. Instructions on when to use each of the different methods may be helpful, or maybe I missed something documented elsewhere. Thanks!

@mgmacias95
Copy link
Member

Hello @jaimeatwork,

can you provide more detail about the issue?

Thanks!

Regards,
Marta

@jaimeatwork
Copy link
Author

Sorry about this, I was typing up the issue and accidentally submitted it before it was complete, I found I needed to use the iterator instead, I will complete the original submission shortly.

@jaimeatwork jaimeatwork changed the title [bug] - IP Resolutions ValueError Documentation Improvement - iterator vs get_object Sep 22, 2022
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

No branches or pull requests

2 participants