Get a single post
curl --request POST \
--url https://api.stophy.dev/v1/tumblr/post \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"post": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({post: '<string>'})
};
fetch('https://api.stophy.dev/v1/tumblr/post', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/tumblr/post"
payload = { "post": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"post": {
"url": "<string>",
"isNsfw": true,
"id": "<string>",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
},
"type": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"summary": "<string>",
"text": "<string>",
"images": [
{
"url": "<string>",
"caption": "<string>",
"alt": "<string>"
}
],
"videos": [
{
"url": "<string>"
}
],
"links": [
"<string>"
],
"tags": [
"<string>"
],
"notes": 0,
"likes": 0,
"reposts": 0,
"replies": 0,
"repostOf": {
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
}
},
"repostedFrom": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
}
},
"blog": {
"url": "<string>",
"isNsfw": true,
"id": "<string>",
"username": "<string>",
"name": "<string>",
"description": "<string>",
"avatar": "<string>",
"posts": 0,
"updatedAt": "2023-11-07T05:31:56Z"
}
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}Tumblr
Tumblr post API
Call the Tumblr post API to get post and blog, as JSON or markdown. 1 credit.
POST
/
v1
/
tumblr
/
post
Get a single post
curl --request POST \
--url https://api.stophy.dev/v1/tumblr/post \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"post": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({post: '<string>'})
};
fetch('https://api.stophy.dev/v1/tumblr/post', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/tumblr/post"
payload = { "post": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"post": {
"url": "<string>",
"isNsfw": true,
"id": "<string>",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
},
"type": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"summary": "<string>",
"text": "<string>",
"images": [
{
"url": "<string>",
"caption": "<string>",
"alt": "<string>"
}
],
"videos": [
{
"url": "<string>"
}
],
"links": [
"<string>"
],
"tags": [
"<string>"
],
"notes": 0,
"likes": 0,
"reposts": 0,
"replies": 0,
"repostOf": {
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
}
},
"repostedFrom": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
}
},
"blog": {
"url": "<string>",
"isNsfw": true,
"id": "<string>",
"username": "<string>",
"name": "<string>",
"description": "<string>",
"avatar": "<string>",
"posts": 0,
"updatedAt": "2023-11-07T05:31:56Z"
}
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}- Endpoint:
tumblr.post - Returns:
datahaspost,blog. - Cost: 1 credit. Failed calls cost nothing.
- Paging: No.
Example
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.tumblr.post({ post: "https://example.tumblr.com/post/123456789012/example-post" });
console.log(result.data.post);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.tumblr.post(post="https://example.tumblr.com/post/123456789012/example-post")
print(result["data"]["post"])
curl -X POST https://api.stophy.dev/v1/tumblr/post \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"post":"https://example.tumblr.com/post/123456789012/example-post"}'
stophy tumblr post https://example.tumblr.com/post/123456789012/example-post
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json