> For the complete documentation index, see [llms.txt](https://docs.kuthulu.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kuthulu.xyz/contracts/posts.md).

# Posts

The dataset of posts by user

## Table of Contents

1. [Events](#events)
2. [Public Functions](#public-functions)

***

## <mark style="color:purple;">Events</mark>

Two types of events are emitted in the smart contract:

1. logAddPost
2. logRemovePost

***

## <mark style="color:purple;">Public Functions</mark>

### getMsgIDsByAddress

This function retrieves a list of message IDs that are posted by a given user or group based on the parameters provided.

* Expected Input

| Parameter  | Type       | Description                          |
| ---------- | ---------- | ------------------------------------ |
| usrAddress | address    | Address to retrieve message IDs for  |
| startFrom  | uint256    | Number to start getting records from |
| whatToGet  | uint256\[] | An array of parameters               |

* Return

An array of uint256 representing message IDs.

* Usage

```javascript
// ethers.js example
const usrAddress = "0x1234567890123456789012345678901234567890";
const startFrom = 0;
const whatToGet = [0, 1, 2]; // change these based on your needs
let messageIDs = await contract.getMsgIDsByAddress(usrAddress, startFrom, whatToGet);
console.log(messageIDs);
```
