Player Stats Retrieve

View as Markdown

Response

idintegerRead-only
userobject

Mixin to handle profile_picture serialization for WebSocket compatibility.

This mixin adds a SerializerMethodField for profile_picture that converts ImageFieldFile objects to URL strings, making them JSON serializable for WebSocket consumers.

The mixin intelligently handles profile pictures from IAMUserDetail by:

  1. Accessing the related details queryset on the IAMUser model
  2. Extracting the ImageFieldFile from the first detail record
  3. Converting it to a URL string for JSON serialization

Usage:

1class MyUserSerializer(ProfilePictureMixin, serializers.ModelSerializer):
2 class Meta:
3 model = User
4 fields = ['id', 'username', 'profile_picture', ...]

Note:

  • This mixin expects the model to have a details related manager
  • The related detail should have a profile_picture ImageField
  • Returns None if no profile picture is found or an error occurs
statsmap from strings to anyRead-only
uidstringRead-onlyformat: "uuid"
created_atdatetimeRead-only
updated_atdatetimeRead-only
experience_updated_atdatetimeRead-only
deleted_atdatetime or null
is_activeboolean
created_bystring or null<=255 characters
updated_bystring or null<=255 characters
deleted_bystring or null<=255 characters
last_online_atlong or null-9223372036854776000-9223372036854776000
is_in_gameboolean
experienceinteger-2147483648-2147483647
experience_levelinteger-2147483648-2147483647
in_gameinteger or null