Browse Source

Improve documentation

pull/8/head
Anton Tarasenko 2 years ago
parent
commit
04f6eb7bbf
  1. 16
      sources/Users/UserAPI.uc
  2. 119
      sources/Users/Users_Feature.uc

16
sources/Users/UserAPI.uc

@ -259,8 +259,7 @@ public final function array<Text> GetAvailableGroups()
}
/**
* Returns names of all groups available for the user with a SteamID given by
* `steamID`.
* Returns names of all groups available for the user given by the SteamID.
*
* In case active config of `Users_Feature` is set up to load user groups
* from a database (either local or remote), the returned value is a locally
@ -295,8 +294,7 @@ public final function array<Text> GetGroupsForSteamID(
}
/**
* Returns names of all groups available for the user with a SteamID given by
* `steamID`.
* Returns names of all groups available for the user given by the SteamID.
*
* In case active config of `Users_Feature` is set up to load user groups
* from a database (either local or remote), the returned value is a locally
@ -331,7 +329,7 @@ public final /*unreal*/ function array<Text> GetGroupsForSteamID_S(
/**
* Returns names of all groups available for the user with an ID given by `id`.
* Returns names of all groups available for the user given by the `UserID`.
*
* In case active config of `Users_Feature` is set up to load user groups
* from a database (either local or remote), the returned value is a locally
@ -363,7 +361,7 @@ public final function array<Text> GetGroupsForUserID(UserID id)
}
/**
* Returns names of all groups available for the user given by `user`.
* Returns names of all groups available for the user.
*
* In case active config of `Users_Feature` is set up to load user groups
* from a database (either local or remote), the returned value is a locally
@ -426,7 +424,7 @@ public final function array<UserID> GetGroupMembers(BaseText groupName)
}
/**
* Checks whether user with an ID given by `id` belongs to the group named
* Checks whether user given by the `UserID` belongs to the group named
* `groupName`.
*
* In case active config of `Users_Feature` is set up to load user groups
@ -435,7 +433,7 @@ public final function array<UserID> GetGroupMembers(BaseText groupName)
* to check something about user groups, but it also means we might have
* an outdated information.
*
* @param id ID of the user.
* @param id ID of the user to check.
* @param groupName Name of the group. Case-insensitive.
* @return `true` if user with an ID given by `id` belongs to the group named
* `groupName` and false if: it does not, either of the parameters is
@ -457,7 +455,7 @@ public final function bool IsUserIDInGroup(UserID id, Text groupName)
}
/**
* Checks whether user given by `user` belongs to the group named `groupName`.
* Checks whether user belongs to the given group.
*
* In case active config of `Users_Feature` is set up to load user groups
* from a database (either local or remote), the returned value is a locally

119
sources/Users/Users_Feature.uc

@ -180,6 +180,19 @@ public final function array<Text> GetAvailableGroups()
return result;
}
/**
* Adds user with the given SteamID into the specified group.
* In case this feature is configured to load user groups from a database
* (either local or remote), changes are guaranteed to be made to the locally
* cached copy that will persist for the duration of the game. Method will also
* attempt to change the database value, but that is not guaranteed to succeed,
* meaning that changes might not be saved for later matches.
*
* @param steamID SteamID of the user to add to the group.
* @param groupName Name of the group to add user to.
* @return `true` if user was added to the group (including if her was already
* added to it) and `false` in any other case.
*/
public final function bool AddSteamIDToGroup(
BaseText steamID,
BaseText groupName)
@ -201,6 +214,19 @@ public final function bool AddSteamIDToGroup(
return true;
}
/**
* Adds user with the given SteamID into the specified group.
* In case this feature is configured to load user groups from a database
* (either local or remote), changes are guaranteed to be made to the locally
* cached copy that will persist for the duration of the game. Method will also
* attempt to change the database value, but that is not guaranteed to succeed,
* meaning that changes might not be saved for later matches.
*
* @param steamID SteamID of the user to add to the group.
* @param groupName Name of the group to add user to.
* @return `true` if user was added to the group (including if her was already
* added to it) and `false` in any other case.
*/
public final /*unreal*/ function bool AddSteamIDToGroup_S(
string steamID,
string groupName)
@ -216,6 +242,19 @@ public final /*unreal*/ function bool AddSteamIDToGroup_S(
return result;
}
/**
* Adds user (given by the `UserID`) into the specified group.
* In case this feature is configured to load user groups from a database
* (either local or remote), changes are guaranteed to be made to the locally
* cached copy that will persist for the duration of the game. Method will also
* attempt to change the database value, but that is not guaranteed to succeed,
* meaning that changes might not be saved for later matches.
*
* @param id `UserID` of the user to add to the group.
* @param groupName Name of the group to add user to.
* @return `true` if user was added to the group (including if her was already
* added to it) and `false` in any other case.
*/
public final function bool AddUserIDToGroup(
UserID id,
BaseText groupName)
@ -233,6 +272,19 @@ public final function bool AddUserIDToGroup(
return result;
}
/**
* Adds given user into the specified group.
* In case this feature is configured to load user groups from a database
* (either local or remote), changes are guaranteed to be made to the locally
* cached copy that will persist for the duration of the game. Method will also
* attempt to change the database value, but that is not guaranteed to succeed,
* meaning that changes might not be saved for later matches.
*
* @param user User to add to the group.
* @param groupName Name of the group to add user to.
* @return `true` if user was added to the group (including if her was already
* added to it) and `false` in any other case.
*/
public final function bool AddUserToGroup(User user, BaseText groupName)
{
local bool result;
@ -247,6 +299,19 @@ public final function bool AddUserToGroup(User user, BaseText groupName)
return result;
}
/**
* Removes user with the given SteamID from the specified group.
* In case this feature is configured to load user groups from a database
* (either local or remote), changes are guaranteed to be made to the locally
* cached copy that will persist for the duration of the game. Method will also
* attempt to change the database value, but that is not guaranteed to succeed,
* meaning that changes might not be saved for later matches.
*
* @param steamID SteamID of the user to remove to the group.
* @param groupName Name of the group to remove user to.
* @return `true` if user was removed to the group (including if her was
* already removed to it) and `false` in any other case.
*/
public final function bool RemoveSteamIDFromGroup(
BaseText steamID,
BaseText groupName)
@ -270,6 +335,19 @@ public final function bool RemoveSteamIDFromGroup(
return hadUser;
}
/**
* Removes user with the given SteamID from the specified group.
* In case this feature is configured to load user groups from a database
* (either local or remote), changes are guaranteed to be made to the locally
* cached copy that will persist for the duration of the game. Method will also
* attempt to change the database value, but that is not guaranteed to succeed,
* meaning that changes might not be saved for later matches.
*
* @param steamID SteamID of the user to remove to the group.
* @param groupName Name of the group to remove user to.
* @return `true` if user was removed to the group (including if her was
* already removed to it) and `false` in any other case.
*/
public final /*unreal*/ function bool RemoveSteamIDFromGroup_S(
string steamID,
string groupName)
@ -285,6 +363,19 @@ public final /*unreal*/ function bool RemoveSteamIDFromGroup_S(
return result;
}
/**
* Removes user (given by the `UserID`) from the specified group.
* In case this feature is configured to load user groups from a database
* (either local or remote), changes are guaranteed to be made to the locally
* cached copy that will persist for the duration of the game. Method will also
* attempt to change the database value, but that is not guaranteed to succeed,
* meaning that changes might not be saved for later matches.
*
* @param id `UserID` of the user to remove to the group.
* @param groupName Name of the group to remove user to.
* @return `true` if user was removed to the group (including if her was
* already removed to it) and `false` in any other case.
*/
public final function bool RemoveUserIDFromGroup(
UserID id,
BaseText groupName)
@ -302,6 +393,19 @@ public final function bool RemoveUserIDFromGroup(
return result;
}
/**
* Removes user from the specified group.
* In case this feature is configured to load user groups from a database
* (either local or remote), changes are guaranteed to be made to the locally
* cached copy that will persist for the duration of the game. Method will also
* attempt to change the database value, but that is not guaranteed to succeed,
* meaning that changes might not be saved for later matches.
*
* @param user User to remove to the group.
* @param groupName Name of the group to remove user to.
* @return `true` if user was removed to the group (including if her was
* already removed to it) and `false` in any other case.
*/
public final function bool RemoveUserFromGroup(User user, BaseText groupName)
{
local bool result;
@ -317,8 +421,7 @@ public final function bool RemoveUserFromGroup(User user, BaseText groupName)
}
/**
* Returns names of all groups available for the user with a SteamID given by
* `steamID`.
* Returns names of all groups available for the user given by SteamID.
*
* In case this feature is configured to load user groups from a database
* (either local or remote), the returned value is a locally cached one.
@ -368,7 +471,7 @@ public final function array<Text> GetGroupsForSteamID(BaseText steamID)
/**
* Returns names of all groups available for the user with a SteamID given by
* `steamID`.
* `UserID`.
*
* In case this feature is configured to load user groups from a database
* (either local or remote), the returned value is a locally cached one.
@ -398,7 +501,7 @@ public final /*unreal*/ function array<Text> GetGroupsForSteamID_S(
}
/**
* Returns names of all groups available for the user with an ID given by `id`.
* Returns names of all groups available for the user given by `UserID`.
*
* In case this feature is configured to load user groups from a database
* (either local or remote), the returned value is a locally cached one.
@ -429,7 +532,7 @@ public final function array<Text> GetGroupsForUserID(UserID id)
}
/**
* Returns names of all groups available for the user given by `user`.
* Returns names of all groups available for the user.
*
* In case this feature is configured to load user groups from a database
* (either local or remote), the returned value is a locally cached one.
@ -510,7 +613,7 @@ public final function array<UserID> GetGroupMembers(BaseText groupName)
}
/**
* Checks whether user with an ID given by `id` belongs to the group named
* Checks whether user given by `UserID` belongs to the group named
* `groupName`.
*
* In case this feature is configured to load user groups from a database
@ -519,7 +622,7 @@ public final function array<UserID> GetGroupMembers(BaseText groupName)
* something about user groups, but it also means we might have an outdated
* information.
*
* @param id ID of the user.
* @param id ID of the user to check.
* @param groupName Name of the group. Case-insensitive.
* @return `true` if user with an ID given by `id` belongs to the group named
* `groupName` and false if: it does not, either of the parameters is
@ -550,7 +653,7 @@ public final function bool IsUserIDInGroup(UserID id, Text groupName)
}
/**
* Checks whether user given by `user` belongs to the group named `groupName`.
* Checks whether user belongs to the specified group.
*
* In case this feature is configured to load user groups from a database
* (either local or remote), the returned value is a locally cached one.

Loading…
Cancel
Save