Hi there!
Question a bit complicated for me.
I'm currently working with an API and it allows me, a bit like discord, to retrieve lists of users and servers.
To do something a bit like Py-Cord I'm trying to create classes. Server, User to return this rather than a not very friendly json.
Of course, I end up with a lot of different values and I asked myself a question. Do I do a for each and assign to the variables the content of what the json returns? Or should I put everything in the init and assign it at that point?
Another question: I've noticed that the guild.py present in the types only contains a kind of "enum". However, in the discord.guild type, you can perform a huge number of different actions. So, where should I add my methods in my class? In another file?
class Server:
def __init__(self, id, name, description, node, sftp_details):
self.id = id
self.name = name
self.description = description
self.node = node
self.sftp_details = sftp_details