clubby789 / htb-api

PyHackTheBox is an unofficial Python library to interact with the Hack The Box API.
https://pypi.org/project/PyHackTheBox/
46 stars 8 forks source link

Suggestion: Add total ownership to User class #41

Closed An00bRektn closed 3 years ago

An00bRektn commented 3 years ago

I was working on a small project using this api, and I needed to get the total ownership of my user. However, the User class doesn't seem to have this as a class attribute, and I think it would be a useful addition. I can obviously calculate total ownership given what I have, but it would be a nice QoL change.

Thanks!

(I would try and contribute this myself but I don't know if I have the time to :) )

clubby789 commented 3 years ago

The 'Total Ownership' (if I understand you correctly) is actually available as User.rank_ownership. I try to use the exact terminology used by the API to make development easier, but it can be a bit confusing. I might consider adding aliases such as this to make things easier to understand.

An00bRektn commented 3 years ago

Sorry for not using the exact terminology. rank_ownership is actually not immediately listed in the ReadTheDocs. It's in the source code, but not on the hackthebox.user.User page itself, as far as I can tell. Thanks for the quick reply!