> For the complete documentation index, see [llms.txt](https://sirgoldman.gitbook.io/sirgoldmans-plugins/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sirgoldman.gitbook.io/sirgoldmans-plugins/plugins/onestopshop/api.md).

# API

## How do you hook into OneStopShop?

![](/files/-MLPW1qc8_gvuCVJqe-a)

**API Download**: [Link](https://www.mediafire.com/file/mk3a64zssfm4kar/OneStopShopAPI.jar/file)

1. Download the API jar above and add it into your IDE plugin project dependencies as "provided" so the jar does not compile with the API jar included.
2. Open your **`plugin.yml`** in your project and add **`softdepend: [OneStopShop]`** or depending on what type of plugin you're making add **`depend: [OneStopShop]`**.
3. Now you're ready to get the plugin's methods, use the following:

```
OneStopShopAPI api = OneStopShop.getPlugin().getApi();

Examples:

# add a item to a shop
api.addShopItem(item, "armor-shop", 100.0, 500.0);

# get a item buy value
Double buy = api.getItemBuyValue(item);

# get a item sell value
Double sell = api.getItemSellValue(item);
```

## API Methods

```
public void addShopItem(ItemStack item, String shop, double sell, double buy) {

}

public double getItemSellValue(ItemStack item) {

}

public double getItemBuyValue(ItemStack item) {

}
```
