feat(apiv2): guild endpoints
This commit is contained in:
@@ -25,7 +25,7 @@ namespace PluralKit.API
|
||||
|
||||
public class ModelParseError: PKError
|
||||
{
|
||||
public ModelParseError() : base(400, 0, "Error parsing JSON model")
|
||||
public ModelParseError() : base(400, 40001, "Error parsing JSON model")
|
||||
{
|
||||
// todo
|
||||
}
|
||||
@@ -47,16 +47,19 @@ namespace PluralKit.API
|
||||
public static PKError GroupNotFound = new(404, 20003, "Group not found.");
|
||||
public static PKError MessageNotFound = new(404, 20004, "Message not found.");
|
||||
public static PKError SwitchNotFound = new(404, 20005, "Switch not found, switch is associated to different system, or unauthorized to view front history.");
|
||||
public static PKError SystemGuildNotFound = new(404, 20006, "No system guild settings found for target guild.");
|
||||
public static PKError MemberGuildNotFound = new(404, 20007, "No member guild settings found for target guild.");
|
||||
public static PKError UnauthorizedMemberList = new(403, 30001, "Unauthorized to view member list");
|
||||
public static PKError UnauthorizedGroupList = new(403, 30002, "Unauthorized to view group list");
|
||||
public static PKError UnauthorizedGroupMemberList = new(403, 30003, "Unauthorized to view group member list");
|
||||
public static PKError UnauthorizedCurrentFronters = new(403, 30004, "Unauthorized to view current fronters.");
|
||||
public static PKError UnauthorizedFrontHistory = new(403, 30005, "Unauthorized to view front history.");
|
||||
public static PKError NotOwnMemberError = new(403, 40001, "Target member is not part of your system.");
|
||||
public static PKError NotOwnGroupError = new(403, 40002, "Target group is not part of your system.");
|
||||
public static PKError NotOwnMemberError = new(403, 30006, "Target member is not part of your system.");
|
||||
public static PKError NotOwnGroupError = new(403, 30006, "Target group is not part of your system.");
|
||||
// todo: somehow add the memberRef to the JSON
|
||||
public static PKError NotOwnMemberErrorWithRef(string memberRef) => new(403, 40003, $"Member '{memberRef}' is not part of your system.");
|
||||
public static PKError NotOwnGroupErrorWithRef(string groupRef) => new(403, 40004, $"Group '{groupRef}' is not part of your system.");
|
||||
public static PKError NotOwnMemberErrorWithRef(string memberRef) => new(403, 30008, $"Member '{memberRef}' is not part of your system.");
|
||||
public static PKError NotOwnGroupErrorWithRef(string groupRef) => new(403, 30009, $"Group '{groupRef}' is not part of your system.");
|
||||
public static PKError MissingAutoproxyMember = new(400, 40002, "Missing autoproxy member for member-mode autoproxy.");
|
||||
public static PKError Unimplemented = new(501, 50001, "Unimplemented");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user