API Base #2

Open
opened 2025-01-28 18:33:34 -05:00 by MYHM · 3 comments
Collaborator

The bare minimum to get me started would be the following:

Need:

  • Has authentication
  • 2 get methods that return a full list of banned users / check if a certain user is banned
  • permissions so data can be either read/write or just read
  • Validate a token and return the user name id / none if invalid
  • Easily extensible
  • Database for ban
  • link a token to a discord ID so that way I know what token belongs to who

Want:

  • Swagger UI
  • Upload existing JSON data

an example of the data being stored would look like this:

{
  "user": "272368290700197899",
  "reason": "spamming invite links",
  "proof": "https://i.imgur.com/fRtOMuB.png",
  "reasonKey": "DM_ADS"
}
The bare minimum to get me started would be the following: Need: - Has authentication - 2 get methods that return a full list of banned users / check if a certain user is banned - permissions so data can be either read/write or just read - Validate a token and return the user name id / none if invalid - Easily extensible - Database for ban - link a token to a discord ID so that way I know what token belongs to who Want: - Swagger UI - Upload existing JSON data an example of the data being stored would look like this: ```json { "user": "272368290700197899", "reason": "spamming invite links", "proof": "https://i.imgur.com/fRtOMuB.png", "reasonKey": "DM_ADS" } ```
cswimr self-assigned this 2025-01-29 12:24:48 -05:00
cswimr added the
Size
XL
label 2025-01-29 12:39:46 -05:00
cswimr added a new dependency 2025-01-29 12:40:49 -05:00
cswimr added a new dependency 2025-01-29 13:25:05 -05:00
cswimr added a new dependency 2025-01-29 13:25:35 -05:00
Owner

@MYHM wrote in https://www.coastalcommits.com/cswimr/myhm-commission/issues/2#issue-286:

Easily extensible

What exactly do you mean by this? Do you just mean it should be easy to add new features, i.e. new api endpoints?

Edit: This is also a bit misleading, as while I might find it easy to extend this software, someone else with less C# experience might find it pretty difficult. I'll do my best to document the codebase, but C# knowledge is simply required to contribute.

@MYHM wrote in https://www.coastalcommits.com/cswimr/myhm-commission/issues/2#issue-286: > Easily extensible What exactly do you mean by this? Do you just mean it should be easy to add new features, i.e. new api endpoints? Edit: This is also a bit misleading, as while I might find it easy to extend this software, someone else with less C# experience might find it pretty difficult. I'll do my best to document the codebase, but C# knowledge is simply required to contribute.
cswimr pinned this 2025-01-29 13:36:23 -05:00
cswimr added a new dependency 2025-01-29 13:38:03 -05:00
Author
Collaborator

So realistically this is going to be a you project, unless you absolutely aren't able to do whatever it is I come up with I will always commission you on this, when I first came up with this idea the plan was to make it so I could easily add endpoints without the need of another developer to actually come and do it for me, realistically that is a lot of work for not a lot of payoff. So you can probably just ignore that part if I'm being honest.

So realistically this is going to be a you project, unless you absolutely aren't able to do whatever it is I come up with I will always commission you on this, when I first came up with this idea the plan was to make it so I could easily add endpoints without the need of another developer to actually come and do it for me, realistically that is a lot of work for not a lot of payoff. So you can probably just ignore that part if I'm being honest.
Owner

Alright, in that case, I'll still document everything, but it shouldn't really be that hard to add new endpoints once the first few are made. EntityFrameworkCore (EFCore), the main C# ORM, is pretty easy to use, so adding endpoints might not necessarily require me if you're willing to give it a shot. I'd be happy to review PRs without a commission :xentheta:

Alright, in that case, I'll still document everything, but it shouldn't really be that hard to add new endpoints once the first few are made. EntityFrameworkCore (EFCore), the main C# ORM, is pretty easy to use, so adding endpoints might not necessarily require me if you're willing to give it a shot. I'd be happy to review PRs without a commission :xentheta:
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Depends on
#6 Add initial src
cswimr/LookingGlass
#11 Set up data models
cswimr/LookingGlass
#12 Authentication
cswimr/LookingGlass
#13 Permissions
cswimr/LookingGlass
Reference: cswimr/LookingGlass#2
No description provided.