แอปฟีด home
สร้าง หน้า home แบบ dealer ด้วย Gommo public API — ใช้ domain ลงทะเบียนตาม Authentication
Playground
Playground เมื่อรัน npm run docs:stack: Home feed, Community, พื้นที่โปรเจกต / คลังโปรเจกต / งบโปรเจกต, แพลตฟอร์ม — ดู AI projects และ Credit pools
1. Login และ profile
$domain = $env:GOMMO_API_DOMAIN
if (-not $domain) { throw 'Set GOMMO_API_DOMAIN' }
$h = @{ Authorization = "Bearer $env:TOKEN"; 'Content-Type' = 'application/x-www-form-urlencoded' }
Invoke-RestMethod -Method Post -Uri 'https://api.gommo.net/ai/me' -Headers $h -Body "access_token=$env:TOKEN&domain=$domain"2. รายการ projects
Invoke-RestMethod -Method Post -Uri 'https://api.gommo.net/ai/projects' -Headers $h -Body "access_token=$env:TOKEN&domain=$domain"ใช้ id_base จาก data[] เป็น project_id (มักเป็น "default")
ตัวจัดการโปรเจกต์ V2
POST https://api.gommo.net/api/v2/ai-projects กับ action typed: CRUD, set_password / password บน get (protected), สมาชิก (member_list, member_kick, invite, invite_revoke), set_budget, stats, activity_list — ตารางและ Playground: AI projects
$uri = 'https://api.gommo.net/api/v2/ai-projects'
$list = "access_token=$env:TOKEN&domain=$domain&action=list&language=vi"
Invoke-RestMethod -Method Post -Uri $uri -Headers $h -Body $list
$create = "access_token=$env:TOKEN&domain=$domain&action=create&name=My+project&description=At+least+ten+chars+here&language=vi"
Invoke-RestMethod -Method Post -Uri $uri -Headers $h -Body $create
$idBase = '<id_base_from_list>'
$get = "access_token=$env:TOKEN&domain=$domain&action=get&id_base=$idBase&language=vi"
Invoke-RestMethod -Method Post -Uri $uri -Headers $h -Body $get
$upd = "access_token=$env:TOKEN&domain=$domain&action=update&id_base=$idBase&name=My+project&description=Updated+description+here&language=vi"
Invoke-RestMethod -Method Post -Uri $uri -Headers $h -Body $upd
$del = "access_token=$env:TOKEN&domain=$domain&action=delete&id_base=$idBase&language=vi"
Invoke-RestMethod -Method Post -Uri $uri -Headers $h -Body $delใช้ id_base จาก list/create เป็น project_id บน newfeeds และ job — ลบด้วย id_base ไม่ใช่ id ตัวเลข
แท็บ Media (modal โปรเจกต — list ภาพ/วิดีโอ/audio/music) ใช้ endpoint อื่น: AI projects — Media tab
2b. Devices (ทางเลือก)
Invoke-RestMethod -Method Post -Uri 'https://api.gommo.net/api/v2/devices' -Headers $h -Body "access_token=$env:TOKEN&domain=$domain&action=list&language=EN"2c. Support Center (ทางเลือก)
Invoke-RestMethod -Method Post -Uri 'https://api.gommo.net/api/apps/go-mmo/support/myTickets' -Headers $h -Body "access_token=$env:TOKEN&domain=$domain&language=TH"Create / detail / reply: …/support/create, …/detail, …/reply ใช้ ticket_id_base (SUP-…) ดู ตั๋วซัพพอร์ต
2d. โปรแกรมพาร์ทเนอร์ (ทางเลือก)
Invoke-RestMethod -Method Post -Uri 'https://api.gommo.net/api/apps/go-mmo/users/partner_program' -Headers $h -Body "access_token=$env:TOKEN&domain=$domain&action_type=status&lang=th&language=TH"Apply: URL เดียวกัน action_type=apply. ดู โปรแกรมพาร์ทเนอร์
2e. Creator Rewards (ทางเลือก)
Invoke-RestMethod -Method Post -Uri 'https://api.gommo.net/api/apps/go-mmo/users/creator_rewards' -Headers $h -Body "access_token=$env:TOKEN&domain=$domain&action_type=status&language=TH"
Invoke-RestMethod -Method Post -Uri 'https://api.gommo.net/api/apps/go-mmo/users/creator_rewards' -Headers $h -Body "access_token=$env:TOKEN&domain=$domain&action_type=pool&language=TH"Apply: action_type=apply, payout_pref=credit, accept_rules=1. ดู Creator Rewards
3. ฟีดสาธารณะ
$body = "access_token=$env:TOKEN&domain=$domain&privacy=PUBLIC&limit=30&project_id=default"
Invoke-RestMethod -Method Post -Uri 'https://api.gommo.net/ai/newfeeds' -Headers $h -Body $body4. Explore (ทางเลือก)
วิดีโอ: POST …/api/apps/go-mmo/ai/public-videos · รูป: POST …/api/apps/go-mmo/ai/images
5. แจ้งเตือน (ทางเลือก)
Invoke-RestMethod -Method Post -Uri 'https://api.gommo.net/ai/notifications' -Headers $h -Body "access_token=$env:TOKEN&domain=$domain&limit=30"6. รายละเอียด item
$id = '<id_base>'
Invoke-RestMethod -Method Post -Uri "https://api.gommo.net/ai/info/image/$id" -Headers $h -Body "access_token=$env:TOKEN&domain=$domain&id_base=$id"Self-host
Mode B: /gateway/newfeeds, /gateway/projects, /gateway/ai-projects, /gateway/news, /gateway/changelogs, /gateway/notifications, /gateway/devices, /gateway/support/tickets (+ /create, /detail, /reply), … — Endpoint map. News: news-updates · Changelogs: changelogs
ทางเลือก — Changelogs (Recent updates)
Modal Recent updates / เมนู Changelogs: POST …/app/changelogs — ไม่ใช่ news/getAll ดู Changelogs
นอกขอบเขต (home ของ integrator)
เว็บ dealer เรียก API ภายใน ที่ไม่จำเป็นสำหรับฟีด home:
| ชื่อบน Network | ข้ามได้ |
|---|---|
mini-apps, mini-app-featured | Launcher mini-app |
community-chat, get_rooms | แท็บแชท (คนละ product) |
site-config, domain-config-get, getAll | config UI dealer |
events, health | marketing / keepalive |
ยังไม่มี mini-app / chat / get_rooms ใน docs gateway — ทำเมื่อตั้งใจ build chat ใน phase ถัดไป
