> For the complete documentation index, see [llms.txt](https://lionstudios.gitbook.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lionstudios.gitbook.io/readme/features/whoami-service/shared-service.md).

# Shared Service

### **Introduction**

`WhoAmIShared` is a service within `WhoAmIService` that provides player-related information based on all the data we may have of them across our games portfolio.

### Usage

The following helper functions are available, allowing developers to easily access common player attributes without dealing with API requests directly.

<table><thead><tr><th width="163">Function Name</th><th width="422">Description</th><th>Return Value</th></tr></thead><tbody><tr><td>IsPayer</td><td>Checks if the player has made any previous purchases in this or any other LionStudio game.</td><td>Boolean</td></tr></tbody></table>

**Example**

```csharp
bool isPlayerIsPayer = await WhoAmIService.Shared.IsPayer();
```

### Advanced Usage

If developers need additional data beyond the predefined functions, a **generic method** is available. This method allows retrieving custom values without requiring LionSDK update.

**Generic method:** The `GetValue<T>()` function enables fetching custom data based on a specified key. The returned value can be of any primitive data type or a custom class.

* Code signature

  ```csharp
  WhoAmIService.GetValue<T>("key");
  ```
* Full Example:

  ```csharp
  bool isPlayerIsPayer = await WhoAmIService.Shared.GetValue<bool>("is_payer");
  ```

{% hint style="info" %}
`Key` parameter in `GetValue<T>` function is defined by Lion Studios team.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://lionstudios.gitbook.io/readme/features/whoami-service/shared-service.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
