Implement getting users and reopos by their respective IDs
Closes #683.
Well, what I basically did is that I introduced UserRef and RepoRef.
They are enums with two variants: either full form (nickname, owner/name pair), or ids.
I implemented std::fmt::Display for them, so that it's easier to operate in API URLs.
No breaking changes!!
This is my first PR in Rust, so, uh. It may be not ideal. But I'm ready to improve it
CRUCIAL UPDATE: in order to get repository by id, you need to use repositories in the URL, not repos.
I'll update this later
Another update:
To get user by name, /users/{login} should be used.
To get user by id, /user/{id} should be used.
Seems like there's some breakage in tests 🙂
I see now why the tests fail.
The thing I got very confused with is: why it worked in my project...
It worked because I used IDs, but not other things... Now I need to fix this
@XAMPPRocky tests are fixed
Thank you for your PR, and congrats on your first contribution! 🎉