https://www.thailand.go.th/api/news
REST/JSON
GET
Parameter Name | Required | Default | Description |
---|---|---|---|
api_token | True | - | |
type | True | - | ex: useful, event, issue |
hl | - | en | language content ex: en, th, cn, jp, de |
Type
Type | Description |
useful | Target |
issue | Topic |
event | Events |
guidebook | Guide Books |
hl
hl | Languages |
en | English |
th | Thai |
cn | Chinese |
jp | Japanese |
de | German |
var myHeaders = new Headers(); myHeaders.append("Authorization", "Bearer xxxxx"); var requestOptions = { method: 'GET', headers: myHeaders, redirect: 'follow' }; fetch("https://thailand.go.th/api/news?type=guidebook&hl=th", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));