SummerClientFriends · Inherits: RefCounted · Access: Summer.client.friends
The player’s Summer friends as this Game may see them.
With the player’s consent, this view lists the player’s Summer friends and whether each is offline, online, or playing this Game. A Game never learns which other Game a friend is playing. The trusted Summer app owns friendship, friend requests, blocking and chat; show_friends(), show_profile() and show_chat() ask the app to present those screens over the game, and need no consent.
Reading friends needs the social.friends.read permission: the Build declares it, and the player grants it in the Summer app’s consent sheet, which request_access() asks the app to show. get_access() reports the player’s current decision. The Engine re-reads the friends when they change, when the event stream starts or resyncs, after a consent decision, on refresh(), and about every 60 seconds while a handler is connected to changed and the game is in front; friend status changes are not pushed. Every signal is emitted after the view is updated, once per change.
player.friends@1
Methods
get_access
social.friends.read in this Game: granted, declined, revoked, not_requested, or undeclared when this Build does not declare the permission. It is not_requested until the first read after Summer.initialize() completes; access_changed reports every change.
Returns: StringName
get_friends
is_available() is false. Each entry is an immutable SummerFriend; an unchanged friend keeps its object across reads, so key UI by SummerFriend.user_id.
Returns: SummerFriend[]
is_available
true when the Summer app offers friends (player.friends@1) to this signed-in player and this Build declares social.friends.read. Always false in local play, for guests, and for accounts the platform does not allow social features (age_restricted).
Returns: bool
refresh
permission_not_requested, permission_declined, permission_revoked or permission_undeclared when the player has not granted access (the view is then empty), capability_unavailable when is_available() is false for lack of the capability, age_restricted, unavailable (retryable) when the Player Host cannot be reached, or protocol_error for a malformed read, which changes nothing.
Returns: SummerOperation
Returns at once. Wait for the result with var result: SummerResult = await op.get_result_or_completed_signal(); see SummerOperation.
request_access
social.friends.read. Only the trusted app records the player’s decision; the Engine then reads it, and the operation completes with it: success once the player granted access, after access_changed and changed have fired, or permission_declined or permission_not_requested (the player closed the sheet without deciding). It succeeds at once when access is already granted, fails at once with permission_undeclared when this Build does not declare the permission, and fails with ui_unavailable when the app cannot show the sheet now. One consent sheet is requested at a time; while it is pending, a second call returns the same operation.
Returns: SummerOperation
Returns at once. Wait for the result with var result: SummerResult = await op.get_result_or_completed_signal(); see SummerOperation.
show_chat
user_id over the game. Completes when the app’s presenter answers, as soon as the screen is shown; fails with ui_unavailable when the app cannot show it now, invalid_argument for a malformed ID or this player’s own, and capability_unavailable when the Summer app offers no friends or parties. The overlays share the party sheets’ presenter: one request is in flight at a time, the same request while pending returns the same operation, and any other fails with retryable operation_in_progress.
Returns:
SummerOperation
Returns at once. Wait for the result with var result: SummerResult = await op.get_result_or_completed_signal(); see SummerOperation.
show_friends
show_chat().
Returns: SummerOperation
Returns at once. Wait for the result with var result: SummerResult = await op.get_result_or_completed_signal(); see SummerOperation.
show_profile
user_id over the game, with its add-friend, message, invite-to-party and report actions. user_id can be any other player this Game knows, such as a SummerParticipant in the current match. Completion and failures match show_chat().
Returns:
SummerOperation
Returns at once. Wait for the result with var result: SummerResult = await op.get_result_or_completed_signal(); see SummerOperation.
Signals
access_changed
social.friends.read changed to state; see get_access(). When access ends, changed follows with an empty list.
changed
What is live on the platform today: platform capability status. Check availability at runtime before you offer a feature.

