curl --request POST \
--url https://api.fireant.vn/posts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"approved": true,
"date": "2023-11-07T05:31:56Z",
"title": "<string>",
"description": "<string>",
"type": 123,
"videoUrl": "<string>",
"videoThumbnailUrl": "<string>",
"videoWidth": 123,
"videoHeight": 123,
"language": "<string>",
"expertUserID": "<string>",
"postGroupID": 123,
"postSourceID": 123,
"isSourceContentFull": true,
"postSourceUrl": "<string>",
"isTop": true,
"content": "<string>",
"link": "<string>",
"linkTitle": "<string>",
"linkDescription": "<string>",
"linkImage": "<string>",
"roomID": 123,
"referToPostID": 123,
"replyToPostID": 123,
"sentiment": 123,
"images": [
{
"imageID": 123,
"base64Image": "<string>",
"imageUrl": "<string>"
}
],
"files": [
{
"fileID": 123,
"fileName": "<string>",
"fileExtension": "<string>",
"base64Content": "<string>",
"fileContentUrl": "<string>"
}
],
"symbols": [
"<string>"
],
"individuals": [
123
],
"hashTags": [
123
],
"users": [
"<string>"
],
"videoType": 123,
"isVideo": true,
"isEmagazine": true,
"isInfographic": true,
"newsType": 123,
"summary": "<string>",
"isLivestream": true,
"streamingUrl": "<string>",
"streamingKey": "<string>",
"youtubeStreamingUrl": "<string>",
"youtubeStreamingKey": "<string>",
"facebookStreamingUrl": "<string>",
"facebookStreamingKey": "<string>",
"livestreamAction": true,
"livestreamActionTitle": "<string>",
"livestreamActionUrl": "<string>",
"livestreamActionRoute": "<string>",
"repliesDisabled": true,
"repliesModerationRequired": true,
"pendingApproval": true,
"isAIGenerated": true,
"contentURL": "<string>",
"hasSummary": true
}
'import requests
url = "https://api.fireant.vn/posts"
payload = {
"approved": True,
"date": "2023-11-07T05:31:56Z",
"title": "<string>",
"description": "<string>",
"type": 123,
"videoUrl": "<string>",
"videoThumbnailUrl": "<string>",
"videoWidth": 123,
"videoHeight": 123,
"language": "<string>",
"expertUserID": "<string>",
"postGroupID": 123,
"postSourceID": 123,
"isSourceContentFull": True,
"postSourceUrl": "<string>",
"isTop": True,
"content": "<string>",
"link": "<string>",
"linkTitle": "<string>",
"linkDescription": "<string>",
"linkImage": "<string>",
"roomID": 123,
"referToPostID": 123,
"replyToPostID": 123,
"sentiment": 123,
"images": [
{
"imageID": 123,
"base64Image": "<string>",
"imageUrl": "<string>"
}
],
"files": [
{
"fileID": 123,
"fileName": "<string>",
"fileExtension": "<string>",
"base64Content": "<string>",
"fileContentUrl": "<string>"
}
],
"symbols": ["<string>"],
"individuals": [123],
"hashTags": [123],
"users": ["<string>"],
"videoType": 123,
"isVideo": True,
"isEmagazine": True,
"isInfographic": True,
"newsType": 123,
"summary": "<string>",
"isLivestream": True,
"streamingUrl": "<string>",
"streamingKey": "<string>",
"youtubeStreamingUrl": "<string>",
"youtubeStreamingKey": "<string>",
"facebookStreamingUrl": "<string>",
"facebookStreamingKey": "<string>",
"livestreamAction": True,
"livestreamActionTitle": "<string>",
"livestreamActionUrl": "<string>",
"livestreamActionRoute": "<string>",
"repliesDisabled": True,
"repliesModerationRequired": True,
"pendingApproval": True,
"isAIGenerated": True,
"contentURL": "<string>",
"hasSummary": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
approved: true,
date: '2023-11-07T05:31:56Z',
title: '<string>',
description: '<string>',
type: 123,
videoUrl: '<string>',
videoThumbnailUrl: '<string>',
videoWidth: 123,
videoHeight: 123,
language: '<string>',
expertUserID: '<string>',
postGroupID: 123,
postSourceID: 123,
isSourceContentFull: true,
postSourceUrl: '<string>',
isTop: true,
content: '<string>',
link: '<string>',
linkTitle: '<string>',
linkDescription: '<string>',
linkImage: '<string>',
roomID: 123,
referToPostID: 123,
replyToPostID: 123,
sentiment: 123,
images: [{imageID: 123, base64Image: '<string>', imageUrl: '<string>'}],
files: [
{
fileID: 123,
fileName: '<string>',
fileExtension: '<string>',
base64Content: '<string>',
fileContentUrl: '<string>'
}
],
symbols: ['<string>'],
individuals: [123],
hashTags: [123],
users: ['<string>'],
videoType: 123,
isVideo: true,
isEmagazine: true,
isInfographic: true,
newsType: 123,
summary: '<string>',
isLivestream: true,
streamingUrl: '<string>',
streamingKey: '<string>',
youtubeStreamingUrl: '<string>',
youtubeStreamingKey: '<string>',
facebookStreamingUrl: '<string>',
facebookStreamingKey: '<string>',
livestreamAction: true,
livestreamActionTitle: '<string>',
livestreamActionUrl: '<string>',
livestreamActionRoute: '<string>',
repliesDisabled: true,
repliesModerationRequired: true,
pendingApproval: true,
isAIGenerated: true,
contentURL: '<string>',
hasSummary: true
})
};
fetch('https://api.fireant.vn/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireant.vn/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'approved' => true,
'date' => '2023-11-07T05:31:56Z',
'title' => '<string>',
'description' => '<string>',
'type' => 123,
'videoUrl' => '<string>',
'videoThumbnailUrl' => '<string>',
'videoWidth' => 123,
'videoHeight' => 123,
'language' => '<string>',
'expertUserID' => '<string>',
'postGroupID' => 123,
'postSourceID' => 123,
'isSourceContentFull' => true,
'postSourceUrl' => '<string>',
'isTop' => true,
'content' => '<string>',
'link' => '<string>',
'linkTitle' => '<string>',
'linkDescription' => '<string>',
'linkImage' => '<string>',
'roomID' => 123,
'referToPostID' => 123,
'replyToPostID' => 123,
'sentiment' => 123,
'images' => [
[
'imageID' => 123,
'base64Image' => '<string>',
'imageUrl' => '<string>'
]
],
'files' => [
[
'fileID' => 123,
'fileName' => '<string>',
'fileExtension' => '<string>',
'base64Content' => '<string>',
'fileContentUrl' => '<string>'
]
],
'symbols' => [
'<string>'
],
'individuals' => [
123
],
'hashTags' => [
123
],
'users' => [
'<string>'
],
'videoType' => 123,
'isVideo' => true,
'isEmagazine' => true,
'isInfographic' => true,
'newsType' => 123,
'summary' => '<string>',
'isLivestream' => true,
'streamingUrl' => '<string>',
'streamingKey' => '<string>',
'youtubeStreamingUrl' => '<string>',
'youtubeStreamingKey' => '<string>',
'facebookStreamingUrl' => '<string>',
'facebookStreamingKey' => '<string>',
'livestreamAction' => true,
'livestreamActionTitle' => '<string>',
'livestreamActionUrl' => '<string>',
'livestreamActionRoute' => '<string>',
'repliesDisabled' => true,
'repliesModerationRequired' => true,
'pendingApproval' => true,
'isAIGenerated' => true,
'contentURL' => '<string>',
'hasSummary' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fireant.vn/posts"
payload := strings.NewReader("{\n \"approved\": true,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": 123,\n \"videoUrl\": \"<string>\",\n \"videoThumbnailUrl\": \"<string>\",\n \"videoWidth\": 123,\n \"videoHeight\": 123,\n \"language\": \"<string>\",\n \"expertUserID\": \"<string>\",\n \"postGroupID\": 123,\n \"postSourceID\": 123,\n \"isSourceContentFull\": true,\n \"postSourceUrl\": \"<string>\",\n \"isTop\": true,\n \"content\": \"<string>\",\n \"link\": \"<string>\",\n \"linkTitle\": \"<string>\",\n \"linkDescription\": \"<string>\",\n \"linkImage\": \"<string>\",\n \"roomID\": 123,\n \"referToPostID\": 123,\n \"replyToPostID\": 123,\n \"sentiment\": 123,\n \"images\": [\n {\n \"imageID\": 123,\n \"base64Image\": \"<string>\",\n \"imageUrl\": \"<string>\"\n }\n ],\n \"files\": [\n {\n \"fileID\": 123,\n \"fileName\": \"<string>\",\n \"fileExtension\": \"<string>\",\n \"base64Content\": \"<string>\",\n \"fileContentUrl\": \"<string>\"\n }\n ],\n \"symbols\": [\n \"<string>\"\n ],\n \"individuals\": [\n 123\n ],\n \"hashTags\": [\n 123\n ],\n \"users\": [\n \"<string>\"\n ],\n \"videoType\": 123,\n \"isVideo\": true,\n \"isEmagazine\": true,\n \"isInfographic\": true,\n \"newsType\": 123,\n \"summary\": \"<string>\",\n \"isLivestream\": true,\n \"streamingUrl\": \"<string>\",\n \"streamingKey\": \"<string>\",\n \"youtubeStreamingUrl\": \"<string>\",\n \"youtubeStreamingKey\": \"<string>\",\n \"facebookStreamingUrl\": \"<string>\",\n \"facebookStreamingKey\": \"<string>\",\n \"livestreamAction\": true,\n \"livestreamActionTitle\": \"<string>\",\n \"livestreamActionUrl\": \"<string>\",\n \"livestreamActionRoute\": \"<string>\",\n \"repliesDisabled\": true,\n \"repliesModerationRequired\": true,\n \"pendingApproval\": true,\n \"isAIGenerated\": true,\n \"contentURL\": \"<string>\",\n \"hasSummary\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fireant.vn/posts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"approved\": true,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": 123,\n \"videoUrl\": \"<string>\",\n \"videoThumbnailUrl\": \"<string>\",\n \"videoWidth\": 123,\n \"videoHeight\": 123,\n \"language\": \"<string>\",\n \"expertUserID\": \"<string>\",\n \"postGroupID\": 123,\n \"postSourceID\": 123,\n \"isSourceContentFull\": true,\n \"postSourceUrl\": \"<string>\",\n \"isTop\": true,\n \"content\": \"<string>\",\n \"link\": \"<string>\",\n \"linkTitle\": \"<string>\",\n \"linkDescription\": \"<string>\",\n \"linkImage\": \"<string>\",\n \"roomID\": 123,\n \"referToPostID\": 123,\n \"replyToPostID\": 123,\n \"sentiment\": 123,\n \"images\": [\n {\n \"imageID\": 123,\n \"base64Image\": \"<string>\",\n \"imageUrl\": \"<string>\"\n }\n ],\n \"files\": [\n {\n \"fileID\": 123,\n \"fileName\": \"<string>\",\n \"fileExtension\": \"<string>\",\n \"base64Content\": \"<string>\",\n \"fileContentUrl\": \"<string>\"\n }\n ],\n \"symbols\": [\n \"<string>\"\n ],\n \"individuals\": [\n 123\n ],\n \"hashTags\": [\n 123\n ],\n \"users\": [\n \"<string>\"\n ],\n \"videoType\": 123,\n \"isVideo\": true,\n \"isEmagazine\": true,\n \"isInfographic\": true,\n \"newsType\": 123,\n \"summary\": \"<string>\",\n \"isLivestream\": true,\n \"streamingUrl\": \"<string>\",\n \"streamingKey\": \"<string>\",\n \"youtubeStreamingUrl\": \"<string>\",\n \"youtubeStreamingKey\": \"<string>\",\n \"facebookStreamingUrl\": \"<string>\",\n \"facebookStreamingKey\": \"<string>\",\n \"livestreamAction\": true,\n \"livestreamActionTitle\": \"<string>\",\n \"livestreamActionUrl\": \"<string>\",\n \"livestreamActionRoute\": \"<string>\",\n \"repliesDisabled\": true,\n \"repliesModerationRequired\": true,\n \"pendingApproval\": true,\n \"isAIGenerated\": true,\n \"contentURL\": \"<string>\",\n \"hasSummary\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fireant.vn/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"approved\": true,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": 123,\n \"videoUrl\": \"<string>\",\n \"videoThumbnailUrl\": \"<string>\",\n \"videoWidth\": 123,\n \"videoHeight\": 123,\n \"language\": \"<string>\",\n \"expertUserID\": \"<string>\",\n \"postGroupID\": 123,\n \"postSourceID\": 123,\n \"isSourceContentFull\": true,\n \"postSourceUrl\": \"<string>\",\n \"isTop\": true,\n \"content\": \"<string>\",\n \"link\": \"<string>\",\n \"linkTitle\": \"<string>\",\n \"linkDescription\": \"<string>\",\n \"linkImage\": \"<string>\",\n \"roomID\": 123,\n \"referToPostID\": 123,\n \"replyToPostID\": 123,\n \"sentiment\": 123,\n \"images\": [\n {\n \"imageID\": 123,\n \"base64Image\": \"<string>\",\n \"imageUrl\": \"<string>\"\n }\n ],\n \"files\": [\n {\n \"fileID\": 123,\n \"fileName\": \"<string>\",\n \"fileExtension\": \"<string>\",\n \"base64Content\": \"<string>\",\n \"fileContentUrl\": \"<string>\"\n }\n ],\n \"symbols\": [\n \"<string>\"\n ],\n \"individuals\": [\n 123\n ],\n \"hashTags\": [\n 123\n ],\n \"users\": [\n \"<string>\"\n ],\n \"videoType\": 123,\n \"isVideo\": true,\n \"isEmagazine\": true,\n \"isInfographic\": true,\n \"newsType\": 123,\n \"summary\": \"<string>\",\n \"isLivestream\": true,\n \"streamingUrl\": \"<string>\",\n \"streamingKey\": \"<string>\",\n \"youtubeStreamingUrl\": \"<string>\",\n \"youtubeStreamingKey\": \"<string>\",\n \"facebookStreamingUrl\": \"<string>\",\n \"facebookStreamingKey\": \"<string>\",\n \"livestreamAction\": true,\n \"livestreamActionTitle\": \"<string>\",\n \"livestreamActionUrl\": \"<string>\",\n \"livestreamActionRoute\": \"<string>\",\n \"repliesDisabled\": true,\n \"repliesModerationRequired\": true,\n \"pendingApproval\": true,\n \"isAIGenerated\": true,\n \"contentURL\": \"<string>\",\n \"hasSummary\": true\n}"
response = http.request(request)
puts response.read_body{
"postID": 123,
"userName": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"bio": "<string>",
"isAuthentic": true,
"followed": true
},
"title": "<string>",
"description": "<string>",
"summary": "<string>",
"hasSummary": true,
"type": 123,
"newsType": 123,
"videoUrl": "<string>",
"videoThumbnailUrl": "<string>",
"videoWidth": 123,
"videoHeight": 123,
"language": "<string>",
"postGroup": {
"postGroupID": 123,
"name": "<string>",
"description": "<string>"
},
"postSource": {
"postSourceID": 123,
"name": "<string>",
"url": "<string>"
},
"isSourceContentFull": true,
"postSourceUrl": "<string>",
"content": "<string>",
"originalContent": "<string>",
"contentURL": "<string>",
"isAIGenerated": true,
"date": "2023-11-07T05:31:56Z",
"priority": 123,
"hasImage": true,
"hasFile": true,
"link": "<string>",
"linkImage": "<string>",
"linkTitle": "<string>",
"linkDescription": "<string>",
"sentiment": 123,
"approved": true,
"isTop": true,
"isExpertIdea": true,
"liked": true,
"totalLikes": 123,
"totalReplies": 123,
"totalShares": 123,
"replyToPostID": 123,
"referToPostID": 123,
"taggedSymbols": [
{
"symbol": "<string>",
"price": 123,
"change": 123,
"percentChange": 123,
"changeSince": 123,
"percentChangeSince": 123
}
],
"taggedIndividuals": [
{
"individualID": 123,
"name": "<string>"
}
],
"taggedHashTags": [
{
"hashTagID": 123,
"symbol": "<string>",
"name": "<string>"
}
],
"taggedUsers": [
{
"userID": "<string>",
"name": "<string>"
}
],
"images": [
{
"imageID": 123,
"base64Image": "<string>",
"imageUrl": "<string>"
}
],
"files": [
{
"fileID": 123,
"fileName": "<string>",
"fileExtension": "<string>",
"base64Content": "<string>",
"fileContentUrl": "<string>"
}
],
"roomID": 123,
"roomName": "<string>",
"isRoomSticky": true,
"videoType": 123,
"isVideo": true,
"isEmagazine": true,
"isInfographic": true,
"lastRepliedDate": "2023-11-07T05:31:56Z",
"isLivestream": true,
"livestreamStarted": true,
"livestreamEnded": true,
"streamingUrl": "<string>",
"streamingKey": "<string>",
"youtubeStreamingUrl": "<string>",
"youtubeStreamingKey": "<string>",
"facebookStreamingUrl": "<string>",
"facebookStreamingKey": "<string>",
"livestreamAction": true,
"livestreamActionTitle": "<string>",
"livestreamActionUrl": "<string>",
"livestreamActionRoute": "<string>",
"repliesDisabled": true,
"repliesModerationRequired": true,
"pendingApproval": true
}Đăng bài viết
curl --request POST \
--url https://api.fireant.vn/posts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"approved": true,
"date": "2023-11-07T05:31:56Z",
"title": "<string>",
"description": "<string>",
"type": 123,
"videoUrl": "<string>",
"videoThumbnailUrl": "<string>",
"videoWidth": 123,
"videoHeight": 123,
"language": "<string>",
"expertUserID": "<string>",
"postGroupID": 123,
"postSourceID": 123,
"isSourceContentFull": true,
"postSourceUrl": "<string>",
"isTop": true,
"content": "<string>",
"link": "<string>",
"linkTitle": "<string>",
"linkDescription": "<string>",
"linkImage": "<string>",
"roomID": 123,
"referToPostID": 123,
"replyToPostID": 123,
"sentiment": 123,
"images": [
{
"imageID": 123,
"base64Image": "<string>",
"imageUrl": "<string>"
}
],
"files": [
{
"fileID": 123,
"fileName": "<string>",
"fileExtension": "<string>",
"base64Content": "<string>",
"fileContentUrl": "<string>"
}
],
"symbols": [
"<string>"
],
"individuals": [
123
],
"hashTags": [
123
],
"users": [
"<string>"
],
"videoType": 123,
"isVideo": true,
"isEmagazine": true,
"isInfographic": true,
"newsType": 123,
"summary": "<string>",
"isLivestream": true,
"streamingUrl": "<string>",
"streamingKey": "<string>",
"youtubeStreamingUrl": "<string>",
"youtubeStreamingKey": "<string>",
"facebookStreamingUrl": "<string>",
"facebookStreamingKey": "<string>",
"livestreamAction": true,
"livestreamActionTitle": "<string>",
"livestreamActionUrl": "<string>",
"livestreamActionRoute": "<string>",
"repliesDisabled": true,
"repliesModerationRequired": true,
"pendingApproval": true,
"isAIGenerated": true,
"contentURL": "<string>",
"hasSummary": true
}
'import requests
url = "https://api.fireant.vn/posts"
payload = {
"approved": True,
"date": "2023-11-07T05:31:56Z",
"title": "<string>",
"description": "<string>",
"type": 123,
"videoUrl": "<string>",
"videoThumbnailUrl": "<string>",
"videoWidth": 123,
"videoHeight": 123,
"language": "<string>",
"expertUserID": "<string>",
"postGroupID": 123,
"postSourceID": 123,
"isSourceContentFull": True,
"postSourceUrl": "<string>",
"isTop": True,
"content": "<string>",
"link": "<string>",
"linkTitle": "<string>",
"linkDescription": "<string>",
"linkImage": "<string>",
"roomID": 123,
"referToPostID": 123,
"replyToPostID": 123,
"sentiment": 123,
"images": [
{
"imageID": 123,
"base64Image": "<string>",
"imageUrl": "<string>"
}
],
"files": [
{
"fileID": 123,
"fileName": "<string>",
"fileExtension": "<string>",
"base64Content": "<string>",
"fileContentUrl": "<string>"
}
],
"symbols": ["<string>"],
"individuals": [123],
"hashTags": [123],
"users": ["<string>"],
"videoType": 123,
"isVideo": True,
"isEmagazine": True,
"isInfographic": True,
"newsType": 123,
"summary": "<string>",
"isLivestream": True,
"streamingUrl": "<string>",
"streamingKey": "<string>",
"youtubeStreamingUrl": "<string>",
"youtubeStreamingKey": "<string>",
"facebookStreamingUrl": "<string>",
"facebookStreamingKey": "<string>",
"livestreamAction": True,
"livestreamActionTitle": "<string>",
"livestreamActionUrl": "<string>",
"livestreamActionRoute": "<string>",
"repliesDisabled": True,
"repliesModerationRequired": True,
"pendingApproval": True,
"isAIGenerated": True,
"contentURL": "<string>",
"hasSummary": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
approved: true,
date: '2023-11-07T05:31:56Z',
title: '<string>',
description: '<string>',
type: 123,
videoUrl: '<string>',
videoThumbnailUrl: '<string>',
videoWidth: 123,
videoHeight: 123,
language: '<string>',
expertUserID: '<string>',
postGroupID: 123,
postSourceID: 123,
isSourceContentFull: true,
postSourceUrl: '<string>',
isTop: true,
content: '<string>',
link: '<string>',
linkTitle: '<string>',
linkDescription: '<string>',
linkImage: '<string>',
roomID: 123,
referToPostID: 123,
replyToPostID: 123,
sentiment: 123,
images: [{imageID: 123, base64Image: '<string>', imageUrl: '<string>'}],
files: [
{
fileID: 123,
fileName: '<string>',
fileExtension: '<string>',
base64Content: '<string>',
fileContentUrl: '<string>'
}
],
symbols: ['<string>'],
individuals: [123],
hashTags: [123],
users: ['<string>'],
videoType: 123,
isVideo: true,
isEmagazine: true,
isInfographic: true,
newsType: 123,
summary: '<string>',
isLivestream: true,
streamingUrl: '<string>',
streamingKey: '<string>',
youtubeStreamingUrl: '<string>',
youtubeStreamingKey: '<string>',
facebookStreamingUrl: '<string>',
facebookStreamingKey: '<string>',
livestreamAction: true,
livestreamActionTitle: '<string>',
livestreamActionUrl: '<string>',
livestreamActionRoute: '<string>',
repliesDisabled: true,
repliesModerationRequired: true,
pendingApproval: true,
isAIGenerated: true,
contentURL: '<string>',
hasSummary: true
})
};
fetch('https://api.fireant.vn/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireant.vn/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'approved' => true,
'date' => '2023-11-07T05:31:56Z',
'title' => '<string>',
'description' => '<string>',
'type' => 123,
'videoUrl' => '<string>',
'videoThumbnailUrl' => '<string>',
'videoWidth' => 123,
'videoHeight' => 123,
'language' => '<string>',
'expertUserID' => '<string>',
'postGroupID' => 123,
'postSourceID' => 123,
'isSourceContentFull' => true,
'postSourceUrl' => '<string>',
'isTop' => true,
'content' => '<string>',
'link' => '<string>',
'linkTitle' => '<string>',
'linkDescription' => '<string>',
'linkImage' => '<string>',
'roomID' => 123,
'referToPostID' => 123,
'replyToPostID' => 123,
'sentiment' => 123,
'images' => [
[
'imageID' => 123,
'base64Image' => '<string>',
'imageUrl' => '<string>'
]
],
'files' => [
[
'fileID' => 123,
'fileName' => '<string>',
'fileExtension' => '<string>',
'base64Content' => '<string>',
'fileContentUrl' => '<string>'
]
],
'symbols' => [
'<string>'
],
'individuals' => [
123
],
'hashTags' => [
123
],
'users' => [
'<string>'
],
'videoType' => 123,
'isVideo' => true,
'isEmagazine' => true,
'isInfographic' => true,
'newsType' => 123,
'summary' => '<string>',
'isLivestream' => true,
'streamingUrl' => '<string>',
'streamingKey' => '<string>',
'youtubeStreamingUrl' => '<string>',
'youtubeStreamingKey' => '<string>',
'facebookStreamingUrl' => '<string>',
'facebookStreamingKey' => '<string>',
'livestreamAction' => true,
'livestreamActionTitle' => '<string>',
'livestreamActionUrl' => '<string>',
'livestreamActionRoute' => '<string>',
'repliesDisabled' => true,
'repliesModerationRequired' => true,
'pendingApproval' => true,
'isAIGenerated' => true,
'contentURL' => '<string>',
'hasSummary' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fireant.vn/posts"
payload := strings.NewReader("{\n \"approved\": true,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": 123,\n \"videoUrl\": \"<string>\",\n \"videoThumbnailUrl\": \"<string>\",\n \"videoWidth\": 123,\n \"videoHeight\": 123,\n \"language\": \"<string>\",\n \"expertUserID\": \"<string>\",\n \"postGroupID\": 123,\n \"postSourceID\": 123,\n \"isSourceContentFull\": true,\n \"postSourceUrl\": \"<string>\",\n \"isTop\": true,\n \"content\": \"<string>\",\n \"link\": \"<string>\",\n \"linkTitle\": \"<string>\",\n \"linkDescription\": \"<string>\",\n \"linkImage\": \"<string>\",\n \"roomID\": 123,\n \"referToPostID\": 123,\n \"replyToPostID\": 123,\n \"sentiment\": 123,\n \"images\": [\n {\n \"imageID\": 123,\n \"base64Image\": \"<string>\",\n \"imageUrl\": \"<string>\"\n }\n ],\n \"files\": [\n {\n \"fileID\": 123,\n \"fileName\": \"<string>\",\n \"fileExtension\": \"<string>\",\n \"base64Content\": \"<string>\",\n \"fileContentUrl\": \"<string>\"\n }\n ],\n \"symbols\": [\n \"<string>\"\n ],\n \"individuals\": [\n 123\n ],\n \"hashTags\": [\n 123\n ],\n \"users\": [\n \"<string>\"\n ],\n \"videoType\": 123,\n \"isVideo\": true,\n \"isEmagazine\": true,\n \"isInfographic\": true,\n \"newsType\": 123,\n \"summary\": \"<string>\",\n \"isLivestream\": true,\n \"streamingUrl\": \"<string>\",\n \"streamingKey\": \"<string>\",\n \"youtubeStreamingUrl\": \"<string>\",\n \"youtubeStreamingKey\": \"<string>\",\n \"facebookStreamingUrl\": \"<string>\",\n \"facebookStreamingKey\": \"<string>\",\n \"livestreamAction\": true,\n \"livestreamActionTitle\": \"<string>\",\n \"livestreamActionUrl\": \"<string>\",\n \"livestreamActionRoute\": \"<string>\",\n \"repliesDisabled\": true,\n \"repliesModerationRequired\": true,\n \"pendingApproval\": true,\n \"isAIGenerated\": true,\n \"contentURL\": \"<string>\",\n \"hasSummary\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fireant.vn/posts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"approved\": true,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": 123,\n \"videoUrl\": \"<string>\",\n \"videoThumbnailUrl\": \"<string>\",\n \"videoWidth\": 123,\n \"videoHeight\": 123,\n \"language\": \"<string>\",\n \"expertUserID\": \"<string>\",\n \"postGroupID\": 123,\n \"postSourceID\": 123,\n \"isSourceContentFull\": true,\n \"postSourceUrl\": \"<string>\",\n \"isTop\": true,\n \"content\": \"<string>\",\n \"link\": \"<string>\",\n \"linkTitle\": \"<string>\",\n \"linkDescription\": \"<string>\",\n \"linkImage\": \"<string>\",\n \"roomID\": 123,\n \"referToPostID\": 123,\n \"replyToPostID\": 123,\n \"sentiment\": 123,\n \"images\": [\n {\n \"imageID\": 123,\n \"base64Image\": \"<string>\",\n \"imageUrl\": \"<string>\"\n }\n ],\n \"files\": [\n {\n \"fileID\": 123,\n \"fileName\": \"<string>\",\n \"fileExtension\": \"<string>\",\n \"base64Content\": \"<string>\",\n \"fileContentUrl\": \"<string>\"\n }\n ],\n \"symbols\": [\n \"<string>\"\n ],\n \"individuals\": [\n 123\n ],\n \"hashTags\": [\n 123\n ],\n \"users\": [\n \"<string>\"\n ],\n \"videoType\": 123,\n \"isVideo\": true,\n \"isEmagazine\": true,\n \"isInfographic\": true,\n \"newsType\": 123,\n \"summary\": \"<string>\",\n \"isLivestream\": true,\n \"streamingUrl\": \"<string>\",\n \"streamingKey\": \"<string>\",\n \"youtubeStreamingUrl\": \"<string>\",\n \"youtubeStreamingKey\": \"<string>\",\n \"facebookStreamingUrl\": \"<string>\",\n \"facebookStreamingKey\": \"<string>\",\n \"livestreamAction\": true,\n \"livestreamActionTitle\": \"<string>\",\n \"livestreamActionUrl\": \"<string>\",\n \"livestreamActionRoute\": \"<string>\",\n \"repliesDisabled\": true,\n \"repliesModerationRequired\": true,\n \"pendingApproval\": true,\n \"isAIGenerated\": true,\n \"contentURL\": \"<string>\",\n \"hasSummary\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fireant.vn/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"approved\": true,\n \"date\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": 123,\n \"videoUrl\": \"<string>\",\n \"videoThumbnailUrl\": \"<string>\",\n \"videoWidth\": 123,\n \"videoHeight\": 123,\n \"language\": \"<string>\",\n \"expertUserID\": \"<string>\",\n \"postGroupID\": 123,\n \"postSourceID\": 123,\n \"isSourceContentFull\": true,\n \"postSourceUrl\": \"<string>\",\n \"isTop\": true,\n \"content\": \"<string>\",\n \"link\": \"<string>\",\n \"linkTitle\": \"<string>\",\n \"linkDescription\": \"<string>\",\n \"linkImage\": \"<string>\",\n \"roomID\": 123,\n \"referToPostID\": 123,\n \"replyToPostID\": 123,\n \"sentiment\": 123,\n \"images\": [\n {\n \"imageID\": 123,\n \"base64Image\": \"<string>\",\n \"imageUrl\": \"<string>\"\n }\n ],\n \"files\": [\n {\n \"fileID\": 123,\n \"fileName\": \"<string>\",\n \"fileExtension\": \"<string>\",\n \"base64Content\": \"<string>\",\n \"fileContentUrl\": \"<string>\"\n }\n ],\n \"symbols\": [\n \"<string>\"\n ],\n \"individuals\": [\n 123\n ],\n \"hashTags\": [\n 123\n ],\n \"users\": [\n \"<string>\"\n ],\n \"videoType\": 123,\n \"isVideo\": true,\n \"isEmagazine\": true,\n \"isInfographic\": true,\n \"newsType\": 123,\n \"summary\": \"<string>\",\n \"isLivestream\": true,\n \"streamingUrl\": \"<string>\",\n \"streamingKey\": \"<string>\",\n \"youtubeStreamingUrl\": \"<string>\",\n \"youtubeStreamingKey\": \"<string>\",\n \"facebookStreamingUrl\": \"<string>\",\n \"facebookStreamingKey\": \"<string>\",\n \"livestreamAction\": true,\n \"livestreamActionTitle\": \"<string>\",\n \"livestreamActionUrl\": \"<string>\",\n \"livestreamActionRoute\": \"<string>\",\n \"repliesDisabled\": true,\n \"repliesModerationRequired\": true,\n \"pendingApproval\": true,\n \"isAIGenerated\": true,\n \"contentURL\": \"<string>\",\n \"hasSummary\": true\n}"
response = http.request(request)
puts response.read_body{
"postID": 123,
"userName": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"bio": "<string>",
"isAuthentic": true,
"followed": true
},
"title": "<string>",
"description": "<string>",
"summary": "<string>",
"hasSummary": true,
"type": 123,
"newsType": 123,
"videoUrl": "<string>",
"videoThumbnailUrl": "<string>",
"videoWidth": 123,
"videoHeight": 123,
"language": "<string>",
"postGroup": {
"postGroupID": 123,
"name": "<string>",
"description": "<string>"
},
"postSource": {
"postSourceID": 123,
"name": "<string>",
"url": "<string>"
},
"isSourceContentFull": true,
"postSourceUrl": "<string>",
"content": "<string>",
"originalContent": "<string>",
"contentURL": "<string>",
"isAIGenerated": true,
"date": "2023-11-07T05:31:56Z",
"priority": 123,
"hasImage": true,
"hasFile": true,
"link": "<string>",
"linkImage": "<string>",
"linkTitle": "<string>",
"linkDescription": "<string>",
"sentiment": 123,
"approved": true,
"isTop": true,
"isExpertIdea": true,
"liked": true,
"totalLikes": 123,
"totalReplies": 123,
"totalShares": 123,
"replyToPostID": 123,
"referToPostID": 123,
"taggedSymbols": [
{
"symbol": "<string>",
"price": 123,
"change": 123,
"percentChange": 123,
"changeSince": 123,
"percentChangeSince": 123
}
],
"taggedIndividuals": [
{
"individualID": 123,
"name": "<string>"
}
],
"taggedHashTags": [
{
"hashTagID": 123,
"symbol": "<string>",
"name": "<string>"
}
],
"taggedUsers": [
{
"userID": "<string>",
"name": "<string>"
}
],
"images": [
{
"imageID": 123,
"base64Image": "<string>",
"imageUrl": "<string>"
}
],
"files": [
{
"fileID": 123,
"fileName": "<string>",
"fileExtension": "<string>",
"base64Content": "<string>",
"fileContentUrl": "<string>"
}
],
"roomID": 123,
"roomName": "<string>",
"isRoomSticky": true,
"videoType": 123,
"isVideo": true,
"isEmagazine": true,
"isInfographic": true,
"lastRepliedDate": "2023-11-07T05:31:56Z",
"isLivestream": true,
"livestreamStarted": true,
"livestreamEnded": true,
"streamingUrl": "<string>",
"streamingKey": "<string>",
"youtubeStreamingUrl": "<string>",
"youtubeStreamingKey": "<string>",
"facebookStreamingUrl": "<string>",
"facebookStreamingKey": "<string>",
"livestreamAction": true,
"livestreamActionTitle": "<string>",
"livestreamActionUrl": "<string>",
"livestreamActionRoute": "<string>",
"repliesDisabled": true,
"repliesModerationRequired": true,
"pendingApproval": true
}Ủy quyền
OAuth2 Implicit Grant
Nội dung
Thông tin bài viết
Yêu cầu đăng/sửa bài
Approved?
Ngày đăng tin
Tiêu đề
Mô tả
Loại (0: Bài viết mạng xã hội, 1: Tin tức)
Đường dẫn video
Đường dẫn thumbnail video
Chiều rộng video
Chiều cao video
Ngôn ngữ
User name của chuyên gia
ID của nhóm
ID của nguồn tin
Đầy đủ nội dung từ tin nguồn?
Đường dẫn tin nguồn
Bài viết TOP
Nội dung
Liên kết
Tiêu đề liên kết
Mô tả liên kết
Ảnh liên kết
ID của nhóm chứa bài viết
Tham chiếu tới bài viết
Trả lời cho bài viết
Đánh giá bài viết (-1 => Tiêu cực, 0 => Bình thường, 1 => Tích cực)
Danh sách ảnh đính kèm bài viết (ImageID = 0 cho file mới, ImageID > 0 với file cũ)
Show child attributes
Show child attributes
Danh sách tài liệu đính kèm bài viết (FileID = 0 cho file mới, FileID > 0 với file cũ)
Show child attributes
Show child attributes
Mã chứng khoán được tag trong nội dung
Cá nhân được tag trong nội dung
Hashtag được tag trong nội dung
User được tag trong nội dung
Loại video (0: Short, 1: Long)
Bài viết video
Bài viết là e-magazine
Bài viết là infographic
Phản hồi
Thành công
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes