cURL
curl --request GET \
--url https://our-secret-api-url.com/post/childrenimport requests
url = "https://our-secret-api-url.com/post/children"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://our-secret-api-url.com/post/children', 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://our-secret-api-url.com/post/children",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://our-secret-api-url.com/post/children"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://our-secret-api-url.com/post/children")
.asString();require 'uri'
require 'net/http'
url = URI("https://our-secret-api-url.com/post/children")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": 123,
"snowflakeId": "<string>",
"user": {
"id": 123,
"username": "<string>",
"avatarUrl": "<string>"
},
"parent": "<unknown>",
"parentId": 123,
"createdAt": "2023-11-07T05:31:56Z",
"userId": 123,
"content": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"type": "post",
"originalId": 123,
"hashtags": [
"<string>"
],
"media": [
{
"id": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"postId": 123,
"mediaUrl": "<string>",
"mimeType": "<string>"
}
],
"repostsCount": 123,
"reposts": [
123
],
"repliesCount": 123
}{}Post
Get Post Children
Get children posts by type
GET
/
post
/
children
cURL
curl --request GET \
--url https://our-secret-api-url.com/post/childrenimport requests
url = "https://our-secret-api-url.com/post/children"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://our-secret-api-url.com/post/children', 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://our-secret-api-url.com/post/children",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://our-secret-api-url.com/post/children"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://our-secret-api-url.com/post/children")
.asString();require 'uri'
require 'net/http'
url = URI("https://our-secret-api-url.com/post/children")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": 123,
"snowflakeId": "<string>",
"user": {
"id": 123,
"username": "<string>",
"avatarUrl": "<string>"
},
"parent": "<unknown>",
"parentId": 123,
"createdAt": "2023-11-07T05:31:56Z",
"userId": 123,
"content": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"type": "post",
"originalId": 123,
"hashtags": [
"<string>"
],
"media": [
{
"id": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"postId": 123,
"mediaUrl": "<string>",
"mimeType": "<string>"
}
],
"repostsCount": 123,
"reposts": [
123
],
"repliesCount": 123
}{}If no
postType is passed, all posts that has the same parentId will be fetched.This API is useful if you are fetching post type of
repost or quoteQuery Parameters
The ID of the parent post.
The type of the post.
Available options:
post, quote, reply, repost Response
A list of posts.
ID of the post.
Snowflake ID of the post.
Show child attributes
Show child attributes
ID of the parent post.
Creation timestamp of the post.
ID of the user who created the post.
Content of the post.
Last update timestamp of the post.
Type of the post.
Available options:
post, quote, reply, repost ID of the original post if this is a repost or quote.
Show child attributes
Show child attributes
Number of reposts.
Number of replies.
