> ## Documentation Index
> Fetch the complete documentation index at: https://docs.summerengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Summer.client.party

> The player's Summer party as this Game sees it.

**Class:** `SummerClientParty` · **Inherits:** RefCounted · **Access:** `Summer.client.party`

The player's Summer party as this Game sees it.

A Summer party belongs to the player's account and follows them across Games. This view shows its members, its leader, which members have this Game open, data this Game shares with the party, and whether the party is searching a queue in this Game. The trusted Summer app owns creating parties, invitations, kicking, leadership transfer and chat; [`show_invite_dialog()`](/api-reference/gdscript/client/party#show_invite_dialog) and [`show_party_dialog()`](/api-reference/gdscript/client/party#show_party_dialog) ask the app to present those screens. The Game never sees the party ID, invitations, chat, another Game's data, or which other Game a member is playing.
The view is a snapshot read through the Player Host whenever the party changes, when the event stream starts or resyncs, and on [`refresh()`](/api-reference/gdscript/client/party#refresh). Every signal is emitted after the snapshot is updated, once per real change. Getters return empty values outside a party and when [`is_available()`](/api-reference/gdscript/client/party#is_available) is `false`: in local play, for a guest, or when the Summer app does not offer parties.
To bring the party into a match, the leader joins [`SummerJoinTarget.party_queue()`](/api-reference/gdscript/types/join-target#party_queue); every other member follows by joining the same target when [`search_started`](/api-reference/gdscript/client/party#search_started) fires.

```gdscript theme={null}
var party := Summer.client.party
party.search_started.connect(func(queue: StringName) -> void:
    if not party.is_leader():
        var result := await Summer.client.join(SummerJoinTarget.party_queue(queue)).completed
        if not result.is_ok():
            push_warning(result.message)
)

func _on_play_pressed(queue: StringName) -> void:
    if party.is_in_party():
        if party.is_leader():
            await Summer.client.join(SummerJoinTarget.party_queue(queue)).completed
    else:
        await Summer.client.join(SummerJoinTarget.queue(queue)).completed
```

Games typically disable Play for members, show each member's [`SummerPartyMember.in_game`](/api-reference/gdscript/types/party-member#in_game), and use [`set_data()`](/api-reference/gdscript/client/party#set_data) so members see the leader's selection.

**Host capabilities named here:** `player.party@1`

## Methods

### get\_all\_data

```gdscript theme={null}
func get_all_data() -> Dictionary const
```

Returns a copy of this Game's party data as `String` keys and values. Empty outside a party.

**Returns:** Dictionary

### get\_data

```gdscript theme={null}
func get_data(key: String, default: String = "") -> String const
```

Returns this Game's party data for `key`, or `default` when the key is not set.

| Parameter | Type | Default |
| - | - | - |
| `key` | String | required |
| `default` | String | `""` |

**Returns:** String

### get\_leader

```gdscript theme={null}
func get_leader() -> SummerPartyMember const
```

Returns the party leader, or `null` outside a party.

**Returns:** [`SummerPartyMember`](/api-reference/gdscript/types/party-member)

### get\_local\_member

```gdscript theme={null}
func get_local_member() -> SummerPartyMember const
```

Returns this player's own member entry, or `null` outside a party.

**Returns:** [`SummerPartyMember`](/api-reference/gdscript/types/party-member)

### get\_member\_limit

```gdscript theme={null}
func get_member_limit() -> int const
```

Returns the party's maximum size, or `0` when it is unknown.

**Returns:** int

### get\_members

```gdscript theme={null}
func get_members() -> SummerPartyMember[] const
```

Returns the current members in join order. Each entry is an immutable [`SummerPartyMember`](/api-reference/gdscript/types/party-member) for the current snapshot; key your UI by [`SummerPartyMember.user_id`](/api-reference/gdscript/types/party-member#user_id).

**Returns:** [`SummerPartyMember`](/api-reference/gdscript/types/party-member)\[]

### get\_search\_queue

```gdscript theme={null}
func get_search_queue() -> StringName const
```

Returns the queue the party is searching in this Game, or an empty `StringName` when no party search is in progress.

**Returns:** StringName

### is\_available

```gdscript theme={null}
func is_available() -> bool const
```

Returns `true` when the Summer app offers parties to this signed-in player. Always `false` in local play, for guests, for accounts the platform does not allow parties (`age_restricted`), and in Summer apps without the `player.party@1` capability.

**Returns:** bool

### is\_in\_party

```gdscript theme={null}
func is_in_party() -> bool const
```

Returns `true` when the player currently belongs to a Summer party.

**Returns:** bool

### is\_leader

```gdscript theme={null}
func is_leader() -> bool const
```

Returns `true` when this player leads their party.

**Returns:** bool

### is\_searching

```gdscript theme={null}
func is_searching() -> bool const
```

Returns `true` while a party search in this Game is in progress. See [`get_search_queue()`](/api-reference/gdscript/client/party#get_search_queue).

**Returns:** bool

### refresh

```gdscript theme={null}
func refresh() -> SummerOperation
```

Reads the party snapshot again through the Player Host. Normally unnecessary: the Engine already re-reads it on every change. One read is in flight at a time; a second call while pending returns the same operation. Fails with `capability_unavailable` when [`is_available()`](/api-reference/gdscript/client/party#is_available) is `false`, `age_restricted` when the platform refuses parties to this account, `unavailable` (retryable) when the Player Host cannot be reached, or `protocol_error` for a malformed snapshot, which changes nothing.

**Returns:** [`SummerOperation`](/api-reference/gdscript/types/operation)

Returns at once. Wait for the result with `var result: SummerResult = await op.get_result_or_completed_signal()`; see [SummerOperation](/api-reference/gdscript/types/operation).

### set\_data

```gdscript theme={null}
func set_data(key: String, value: String) -> SummerOperation
```

Sets this Game's party data for `key`; an empty `value` deletes the key. Only the leader can set party data. Keys are 1 to 32 characters of `a-z`, `0-9`, `_`, `.` and `-`; values are at most 256 UTF-8 bytes of text without control characters and pass the Summer chat text filter; a party holds at most 16 keys per Game.
The Engine refuses before any network request with `not_party_leader` for a member, `party_not_found` outside a party, or `invalid_argument` for a key, value or key count outside these limits. The platform remains the authority and may still refuse with the same codes, or with `text_not_allowed` when the text filter rejects the value. Writes are applied in call order and fenced by the party version; if the party changed underneath a write, the Engine re-reads it and sends the write once more before failing with retryable `party_version_conflict`. On success, [`data_changed`](/api-reference/gdscript/client/party#data_changed) has already fired.

| Parameter | Type | Default |
| - | - | - |
| `key` | String | required |
| `value` | String | required |

**Returns:** [`SummerOperation`](/api-reference/gdscript/types/operation)

Returns at once. Wait for the result with `var result: SummerResult = await op.get_result_or_completed_signal()`; see [SummerOperation](/api-reference/gdscript/types/operation).

### set\_member\_data

```gdscript theme={null}
func set_member_data(key: String, value: String) -> SummerOperation
```

Sets this player's own member data for this Game, such as `ready` or `character`; an empty `value` deletes the key. Any member can set their own data, up to 8 keys per Game. Key and value limits, ordering, version fencing and failures match [`set_data()`](/api-reference/gdscript/client/party#set_data), except that it is never refused for leadership. Member data is removed when the member leaves the party.

| Parameter | Type | Default |
| - | - | - |
| `key` | String | required |
| `value` | String | required |

**Returns:** [`SummerOperation`](/api-reference/gdscript/types/operation)

Returns at once. Wait for the result with `var result: SummerResult = await op.get_result_or_completed_signal()`; see [SummerOperation](/api-reference/gdscript/types/operation).

### show\_invite\_dialog

```gdscript theme={null}
func show_invite_dialog() -> SummerOperation
```

Asks the Summer app to present its friend invite sheet over the game. The app creates a party first when the player has none. The operation completes when the app's presenter answers. The Summer app answers as soon as the sheet is on screen, not when the player closes it, so the game keeps running and receives party changes while the sheet is open. It fails with `ui_unavailable` when the app cannot present the sheet right now and nothing is shown, and with `capability_unavailable` when [`is_available()`](/api-reference/gdscript/client/party#is_available) is `false`. Invitations sent from the sheet reach the game only as later party changes.

**Returns:** [`SummerOperation`](/api-reference/gdscript/types/operation)

Returns at once. Wait for the result with `var result: SummerResult = await op.get_result_or_completed_signal()`; see [SummerOperation](/api-reference/gdscript/types/operation).

### show\_party\_dialog

```gdscript theme={null}
func show_party_dialog() -> SummerOperation
```

Asks the Summer app to present party management (leave, kick, leadership transfer and party chat) over the game. Completes when the app's presenter answers, as soon as the sheet is on screen; failures match [`show_invite_dialog()`](/api-reference/gdscript/client/party#show_invite_dialog). One request is in flight at a time: while the app has not answered, asking for the same sheet returns the pending operation and asking for the other fails with retryable `operation_in_progress`.

**Returns:** [`SummerOperation`](/api-reference/gdscript/types/operation)

Returns at once. Wait for the result with `var result: SummerResult = await op.get_result_or_completed_signal()`; see [SummerOperation](/api-reference/gdscript/types/operation).

## Signals

### changed

```gdscript theme={null}
signal changed()
```

The party snapshot changed in any way this Game can see. Emitted once per change, after every more specific signal for that change.

### data\_changed

```gdscript theme={null}
signal data_changed(key: String)
```

This Game's party data for `key` was set, changed or deleted. Joining a party reports each key it already holds; leaving a party reports each key it held.

### leader\_changed

```gdscript theme={null}
signal leader_changed(member: SummerPartyMember)
```

Leadership moved to `member` inside the same party. Joining or leaving a party reports the leader through [`member_joined`](/api-reference/gdscript/client/party#member_joined) and [`member_left`](/api-reference/gdscript/client/party#member_left) instead.

### member\_data\_changed

```gdscript theme={null}
signal member_data_changed(member: SummerPartyMember, key: String)
```

A member who stayed in the party set, changed or deleted their data for `key`. A joining member's data arrives with [`member_joined`](/api-reference/gdscript/client/party#member_joined).

### member\_in\_game\_changed

```gdscript theme={null}
signal member_in_game_changed(member: SummerPartyMember)
```

A member who stayed in the party opened or closed this Game; read [`SummerPartyMember.in_game`](/api-reference/gdscript/types/party-member#in_game).

### member\_joined

```gdscript theme={null}
signal member_joined(member: SummerPartyMember)
```

`member` is now in the party. When this player joins a party, it fires for every member, including this player's own entry.

### member\_left

```gdscript theme={null}
signal member_left(member: SummerPartyMember)
```

`member`, as last seen, is no longer in the party. When this player leaves, the snapshot becomes empty and it fires for every former member, including this player's own entry.

### search\_ended

```gdscript theme={null}
signal search_ended()
```

The party search in this Game reached a terminal state, or this player left the party during it.

### search\_started

```gdscript theme={null}
signal search_started(queue: StringName)
```

The party leader started a party search in `queue` of this Game, or this player joined a party that is searching. A member follows with `Summer.client.join(SummerJoinTarget.party_queue(queue))`.

***

What is live on the platform today: [platform capability status](/knowledge-base/source-status). Check availability at runtime before you offer a feature.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.