v0.1.1: add configure() method, wally dependency, project config
This commit is contained in:
@@ -17,5 +17,30 @@ wally install
|
||||
|
||||
## Setup
|
||||
|
||||
1. Add your Filoxen API key as a secret named `FILOXEN_API_KEY` in the [Creator Dashboard](https://create.roblox.com) under Secrets.
|
||||
1. Add your Filoxen API key as a secret in the [Creator Dashboard](https://create.roblox.com) under Secrets (defaults to `FILOXEN_API_KEY`).
|
||||
2. Make sure `HttpService` is enabled for your game.
|
||||
|
||||
## Usage
|
||||
|
||||
```luau
|
||||
local Filoxen = require(path.to.Filoxen)
|
||||
|
||||
-- Must be called once before any other function
|
||||
Filoxen.configure({
|
||||
baseUrl = "https://your-filoxen-instance.com",
|
||||
apiKeySecretName = "FILOXEN_API_KEY", -- optional, this is the default
|
||||
})
|
||||
|
||||
-- Fetch 10 random hats
|
||||
local assets = Filoxen.random(
|
||||
{ Enum.AssetType.Hat }, -- assetTypeIds
|
||||
nil, -- maxAssetId
|
||||
nil, -- minAssetId
|
||||
10, -- batch
|
||||
true -- onsale
|
||||
)
|
||||
|
||||
-- Search for assets by name
|
||||
local results = Filoxen.search("blue hat", Enum.AssetType.Hat.Value)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user