Post Streams
Endpoints:
- Get a user's personal stream
- Get a user's unified personal stream
- Get mentions of a user
- Get posts by a user
- Get the global stream
- Get posts with a tag
GET /posts/streams/me
Token:
Scope:
The authenticated user's stream of posts from their followers and themself.
Example
curl "https://api.pnut.io/v1/posts/streams/me?count=2" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "X-Pretty-Json: 1"
Returns a list of posts.
{
"meta": {
"more": true,
"max_id": "0",
"min_id": "0",
"code": 200
},
"data": [
{"...Post Object..."},
{"...Post Object..."}
]
}
GET /posts/streams/unified
Token:
Scope:
A combined Personal Stream including the authenticated user's mentions.
Example
curl "https://api.pnut.io/v1/posts/streams/unified?count=1" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "X-Pretty-Json: 1"
Returns a list of posts.
{
"meta": {
"more": true,
"max_id": "0",
"min_id": "0",
"code": 200
},
"data": [
{"...Post Object..."}
]
}
GET /users/{user_id}/mentions
Scope:
Posts mentioning the specified user.
URL Parameters
Name | Description |
---|---|
user_id |
Posts mention this user |
Example
curl "https://api.pnut.io/v1/users/9/mentions?count=2" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "X-Pretty-Json: 1"
Returns a list of posts.
{
"meta": {
"more": true,
"max_id": "0",
"min_id": "0",
"code": 200
},
"data": [
{"....Post Object..."},
{"....Post Object..."}
]
}
GET /users/{user_id}/posts
Scope:
Posts created by the specified user.
If a user looks up a user they blocked or muted, the posts will still be retrieved.
URL Parameters
Name | Description |
---|---|
user_id |
Posts created by this user |
Example
curl "https://api.pnut.io/v1/users/9/posts?count=2" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "X-Pretty-Json: 1"
Returns a list of posts.
{
"meta": {
"more": true,
"max_id": "0",
"min_id": "0",
"code": 200
},
"data": [
{"...Post Object...."},
{"...Post Object...."}
]
}
GET /posts/streams/global
Scope:
A stream of all human
-type users' public posts.
Example
curl "https://api.pnut.io/v1/posts/streams/global?count=2" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "X-Pretty-Json: 1"
Returns a list of posts.
{
"meta": {
"more": true,
"max_id": "0",
"min_id": "0",
"code": 200
},
"data": [
{"...Post Object.."},
{"...Post Object.."}
]
}
GET /posts/tags/{tag}
Scope:
A stream of all posts that include the specified tag
.
URL Parameters
Name | Description |
---|---|
tag |
The string tag that all posts should include |
Example
curl "https://api.pnut.io/v1/posts/tags/MondayNightDanceParty?count=2" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "X-Pretty-Json: 1"
Returns a list of posts.
{
"meta": {
"more": true,
"max_id": "0",
"min_id": "0",
"code": 200
},
"data": [
{"....Post Object...."},
{"....Post Object...."}
]
}