Post Streams

Endpoints:

GET /posts/streams/me

Token: user

Scope: stream

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: user

Scope: stream

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: none

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: none

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: none

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: none

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...."}
    ]
}