File size: 1,065 Bytes
bc010ed
 
a2075f6
 
 
bc010ed
a2075f6
bc010ed
 
a2075f6
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
title: SUT Tender API
emoji: 🏗️
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
---

# SUT Tender API

REST API ที่ดึงประกาศจัดซื้อจัดจ้างจากระบบ e-GP ของมหาวิทยาลัยเทคโนโลยีสุรนารี (SUT)
ดึงข้อมูลครั้งเดียวตอน container start แล้ว cache ไว้ใน memory (ไม่ auto-refresh)

## Endpoints

- `GET /` — สถานะ cache (จำนวนรายการ, เวลาอัปเดตล่าสุด)
- `GET /api/tenders?keyword=server&limit=50&offset=0` — ดึงรายการประกาศ กรองด้วยคำใน title ได้
- `POST /refresh` — สั่งดึงข้อมูลใหม่แบบ manual

## สำหรับ Frontend (Lovable)

เรียก `GET https://<your-space>.hf.space/api/tenders?keyword=server` เพื่อดึงรายการที่กรองแล้ว