lasscat / namemcpy

Namemc api wrapper made in python
MIT License
14 stars 4 forks source link

comments #2

Closed capslock321 closed 3 years ago

capslock321 commented 3 years ago

I have a few comments on your, api some good things: your api, is one of the first and is already on pypi. great job the amount of comments detailing what you are doing bad things: functions names are extremely long, and can definitly be condensed for easier usage. eg printFriendListUsernameOutputUsername lack of functionality, and multiple functions can be put togehter as one eg. printFriendListUsernameOutputUsername poor documentation, does not explain what it output, eg dict, list and a lack of a requrements.txt EDIT: i did not see the install.txt you may object to some of them, but this is my opinion or your api good job tho

lasscat commented 3 years ago

Yea I was thinking about that I will try to shorten them in the next update.

lasscat commented 3 years ago

Thank you for the tips.

capslock321 commented 3 years ago

no prob

lasscat commented 3 years ago

Okay what do you think for my maybe new system to get rid of the long function names. def printFriendList(self, playerInput=False, uuidInput=False, playerOutput=False, uuidOutput=False): Basically how this works is that you enter the player name in the playerinput for input vice versa, and the same thing for output?

capslock321 commented 3 years ago

@lasscat to be honest, i am not a fan of printFriendsList, it in my opinion is too long of a name and can be massively shortened to .friends(). uuid and names can be combined into one function, because if you search namemc.com/name/uuid-192-djd is the same as namemc.com/name/lasscat. you can access the websites using requests.get then getting the title of the websites name to get the name. this in my opinion is more efficient

capslock321 commented 3 years ago

also i am also making an wrapper for name mc, cuz i got bored started 5 days ago to be exact

lasscat commented 3 years ago

Not to be rude why would you replicate a project that I am doing?

capslock321 commented 3 years ago

It was really a small project to keep me busy, before this i was very bored, doing little things that would only take 1 day to complete. This project also taught me how to write docs, so yeah.

capslock321 commented 3 years ago

IF you choose to keep going, a good way to improve your docs is to use sphinx https://www.sphinx-doc.org/en/master/ its a free documentation maker and makes very nice looking docs. You just have to put doc strings everywhere which is annoying to me.

lasscat commented 3 years ago

Ok thank you for clearing things up feel free to work on my project and I will work on yours

capslock321 commented 3 years ago

ill bring my repo to public, i dont think ill work on it anymore, so yeah. @lasscat ill take it down when the owner of namemc tell me to take it down, else i am not going to

lasscat commented 3 years ago

Ok but why would the owner of namemc say to take it down?

capslock321 commented 3 years ago

when you are webscraping, you are making request to the server. this can cause unesscary traffic and may block (depending on how its used) actual "people" from accessing the site. which is why some websites check for your browser to see if it is via a supported browser, not python etc.

capslock321 commented 3 years ago

i really dont see what is the problem tho. if a person makes too many requests, just block the ip lol.

lasscat commented 3 years ago

Oh I understand sorry I misunderstood