2017-01-30 01:43:34 +01:00
|
|
|
package tc.oc.api.users;
|
|
|
|
|
|
|
|
import javax.annotation.Nullable;
|
|
|
|
|
|
|
|
import tc.oc.api.annotations.Serialize;
|
|
|
|
import tc.oc.api.docs.PlayerId;
|
|
|
|
import tc.oc.api.docs.virtual.Document;
|
2017-02-02 09:51:51 +01:00
|
|
|
import tc.oc.minecraft.api.user.UserUtils;
|
2017-01-30 01:43:34 +01:00
|
|
|
|
|
|
|
public class UserSearchRequest implements Document {
|
|
|
|
@Serialize public final String username;
|
|
|
|
@Serialize public final @Nullable String sender_id;
|
|
|
|
|
|
|
|
public UserSearchRequest(String username, @Nullable PlayerId sender) {
|
|
|
|
this.username = UserUtils.sanitizeUsername(username);
|
|
|
|
this.sender_id = sender == null ? null : sender._id();
|
|
|
|
}
|
|
|
|
}
|