# LoFiTown 廣告API
以下供 合作團隊存取,分為3個部份
1. 廣告圖片與大小
2. 廣告持有帳戶與到期日
3. 像素版地圖專用
前端平面地圖MAP網站, 會顯示圖片
可以對照使用:
https://maps.lofitown.world/ad/
### 取得所有的廣告圖片
### <font color="#099BFF"><i class="fa fa-plug"></i></font> get All images of LoFiTown AD
- Type: Read
- Method: Get
- URL:`https://mapnft.chainbacon.com/nft/getLofiAd`
- Response:
- JSON format: [ { item-1}, { item-2 }, ....]
- `tile`: 地號ID (左上角)
- `size`: 土地大小(例1:表示單一地,2為:2x2, 類推)
- `image`: 廣告圖片
- `index` : 供 像素版小人地圖索引使用
- `x` : 地塊座標 X (左上為(0,0),往右遞增最大70)
- `y` : 地塊座標 Y (左上為(0,0),往下遞增最大70)
- 範例
`https://mapnft.chainbacon.com/nft/getLofiAd`
### 列出廣告持有人, 到期日
### <font color="#099BFF"><i class="fa fa-plug"></i></font> get All AD of LoFiTown
- Type: Read
- Method: Get
- URL:`https://maps.lofitown.world/lofiad/getallADs?network=`
- Parameters:
- `network`: 4 取得測試網之廣告數據
- Response:
- JSON format: [ { item-1}, { item-2 }, ....]
- `network`: 4 為測試網, 250 為正式(Fantom網)
- `tokenid`: 地號ID (左上角)
- `owner`: 廣告持有人,隨時變動
- `size`: 土地大小(例1:表示單一地,2為:2x2, 類推)
- `expire`: 到期日 ( UTC TimeStamp )
- 範例
`https://maps.lofitown.world/lofiad/getallADs?network=4`
### 像素版小人地圖(workadv) 用廣告圖層
### <font color="#099BFF"><i class="fa fa-plug"></i></font> Image layer of LoFiTown AD
- Type: Read
- Method: Get
- URL:`https://mapnft.chainbacon.com/media/adimg/ad_allmap.png`
- Parameters:
- None
- Response:
image output by PNG format
### 像素版小人地圖(workadv) 用廣告Json數據
### <font color="#099BFF"><i class="fa fa-plug"></i></font> layer json of LoFiTown AD
- Type: Read
- Method: Get
- URL:`https://mapnft.chainbacon.com/nft/getLofimapAd`
- Parameters:
- None
- Response:
image output by PNG format
### 列出土地之地塊主人
### <font color="#099BFF"><i class="fa fa-plug"></i></font> list all owners of LoFi-Land
- Type: Read
- Method: Get
- URL:`https://maps.lofitown.world/lofitown/getallLands?network=`
- Parameters:
- `network`: 4 取得測試網之土地數據
- Response:
- JSON format: [ { item-1}, { item-2 }, ....]
- `network`: 4 為測試網, 250 為正式(Fantom網)
- `tokenid`: 單一地號ID
- `owner`: 地塊持有人
- `time`: 擁有時間 ( UTC TimeStamp )
- 範例
`https://maps.lofitown.world/lofitown/getallLands?network=4`