appwrite / sdk-generator

Generating SDKs for multiple programming languages and platforms ⚙️
https://appwrite.io
MIT License
258 stars 160 forks source link

🚀 Feature: Regarding naming convention from updateStatus() function to blockUser() function #879

Open raman04-byte opened 3 weeks ago

raman04-byte commented 3 weeks ago

🔖 Feature description

Existing functionality

To block the user from the client-sdk (such as Flutter SDK) we have to call the updateStatus() function to block the user on the Appwrite Cloud but the task the function is doing is to block the user on the Cloud

🎤 Pitch

Suggestion

Well the main task of the updateStatus() function is to block the user so it makes much more sense to refactor the name of the updateStatus() to blockUser() so that the new developers can use that function and easily find them

Problem

Well, I faced a similar issue when I wanted to use the blockUser function so I had to look into the docs of how to perform that and it took time so if it was named blockUser() it would be simple and easy to use the function.

👀 Have you spent some time to check if this issue has been raised before?

🏢 Have you read the Code of Conduct?

ItzNotABug commented 3 weeks ago

I think this might not be a simple change as the specs for the SDKs refer to use updateStatus. A change like this would require changes across all Server SDKs.


Another point to note that the method doesn't only block a user, but can also be used to unblock the user. Atleast thats the behaviour as per docs, see - https://appwrite.io/docs/references/cloud/server-dart/users#updateStatus.

Although I agree that the naming doesn't really confer to what its actually doing. Lets wait for a core member to bump on this.

raman04-byte commented 3 weeks ago

It was a suggestion as it would be helpful for the new dev who is using appwrite for the first time and not familiar with the functions and updateStatus() didn't give much of an idea of what function is going to act.