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

# PlaytoliaSocial

> Friends list, player search, and friend request management

### Methods

| Method                           | Parameters | Returns               | Notes                     |
| -------------------------------- | ---------- | --------------------- | ------------------------- |
| `GetFriends()`                   | —          | `List<Friend>`        | In-memory                 |
| `SearchPlayers(query)`           | `string`   | `List<Player>`        | Network call — blocking   |
| `GetIncomingFriendRequests()`    | —          | `List<FriendRequest>` |                           |
| `GetOutgoingFriendRequests()`    | —          | `List<FriendRequest>` |                           |
| `SendFriendRequest(playerId)`    | `string`   | `void`                | Uses `PlayerId`, not `Id` |
| `AcceptFriendRequest(requestId)` | `string`   | `void`                |                           |
| `RejectFriendRequest(requestId)` | `string`   | `void`                |                           |
| `CancelFriendRequest(requestId)` | `string`   | `void`                | Cancel outgoing request   |
| `RemoveFriend(friendshipId)`     | `string`   | `void`                | Uses `FriendshipId`       |
| `GetState()`                     | —          | `SocialState`         |                           |
| `Refresh()`                      | —          | `void`                | Manual sync               |
| `AddListener(listener)`          | `Action`   | `void`                |                           |
| `RemoveListener(listener)`       | `Action`   | `void`                |                           |

### Friend

| Field          | Type     | Notes                                  |
| -------------- | -------- | -------------------------------------- |
| `FriendshipId` | `string` | Used with `RemoveFriend()`             |
| `User`         | `Player` | Friend's profile                       |
| `FriendsSince` | `string` | ISO timestamp                          |
| `UnreadCount`  | `int`    | Unread messages (if messaging enabled) |

### FriendRequest

| Field         | Type     | Notes                          |
| ------------- | -------- | ------------------------------ |
| `RequestId`   | `string` | Used with Accept/Reject/Cancel |
| `SenderId`    | `string` |                                |
| `RecipientId` | `string` |                                |
| `Sender`      | `Player` |                                |
| `Recipient`   | `Player` |                                |
| `CreatedAt`   | `string` |                                |

### Player

| Field         | Type     | Notes                           |
| ------------- | -------- | ------------------------------- |
| `Id`          | `string` | Internal ID                     |
| `PlayerId`    | `string` | Used with `SendFriendRequest()` |
| `DisplayName` | `string` |                                 |
| `Username`    | `string` |                                 |
| `Avatar`      | `string` | URL                             |
| `Status`      | `string` | `"online"` or `"offline"`       |
| `CreatedAt`   | `string` |                                 |
