# Shared

Methods and properties listed below will work identically on both client and server, with the exception of `Value` property as it is a regular table (meaning that you normally iterate through it and use `table` methods on it) on the client while on the server it is considered a `userdata`.

## Retrieval

The `get` method can be called anywhere in your code as the method will yield until the data is available, however, beware that error will occur if yield takes too long to resolve. Also keep in mind that the data cannot be accessed directly, thus the data must be accessed through the `Value` property.

```lua
local round = Wizgoose.get("round")
print(round.Value) --> { participantIds: {} }
print(round.Value.participantIds) --> {}
```

{% hint style="warning" %}
Method will yield until data is available and will throw an error if it takes too long to resolve.
{% endhint %}

## Listening for changes

```lua
round:Changed("participantIds"):Connect(function(current, previous)
    print(current, previous)
end)
```

## Listening for item insertion

```lua
round:ItemAddedIn("participantIds"):Connect(function(addedParticipantId)
    print(addedParticipantId)
end)
```

## Listening for item removal

```lua
round:ItemRemovedIn("participantIds"):Connect(function(removedParticipantId)
    print(removedParticipantId)
end)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://moonward.gitbook.io/wizgoose/api/shared.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
