REST API

This pages describes the official twee.thingz.io REST API.

API Endpoint

The REST API is available at https://twee.thingz.io/api.

API Version

The v1 is the only version of the API currently supproted (https://twee.thingz.io/api/v1)

Authentication

To access the API, you must be authenticated. You can do this by providing a valid API key in the Authorization header. The API authentication token can be obtained on your account page (Authorization: token your-token-goes-here)

Dayly Data

GET /days/{day}

The days API returns data for specific day. For example

curl -H "Accept: application/json" \
     -H "Authorization: token $API_TOKEN" \
     https://twee.thingz.io/api/v1/days/2022-04-01

will return JSON payload with something similar to this abreviated vesion:

{
  "username": "your-username",
  "day_key": "id-...-2022-04-01",
  "state_day": "2022-04-01",
  "posts": 10,
  "post_diff": 1,
  "faves": 11,
  "fave_diff": 1,
  "lists": 2,
  "list_diff": 0,
  "friends": 100,
  "followers": 100,
  "friended": 1,
  "unfriended": 0,
  "followed": 1,
  "unfollowed": 3,
  "updated_at": "2022-04-01T23:00:06.024262Z",
  "ids": {
    "friend_list": [
      12345,
      67890,
      ...
    ],
    "follower_list": [
      98765,
      43210,
      ...
    ]
  },
  "events": {
    "followers": [
      12345,
      ...
    ],
    "unfollowers": [
      67890,
      ...
    ],
    "befrienders": [
      98765,
      43210,
      ...
    ],
    "unfrienders": [
      98765,
      43210,
      ...
    ]
  }
}

Key Value
username The username of the user
day_key The user/day key of the day used to persist the data
state_day The date of the day in RFC3339 format (yyyy-MM-dd)
posts The number of posts made by the user
post_diff The difference between the previous day and the current day
faves The number of likes made by the user
fave_diff The difference between the previous day and the current day likes
lists The number of lists created by the user
list_diff The difference between the previous day and the current day lists
friends The number of friends the user has
followers The number of followers the user has
friended The number of friends the user has gained
unfriended The number of friends the user has lost
followed The number of followers the user has gained
unfollowed The number of followers the user has lost
updated_at The date of the last update in RFC3339 format (yyyy-MM-ddTHH:mm:ss.SSSSSSZ)
ids A JSON object containing the ids of the friends and followers
ids.friend_list IDs of all the friends from that day
ids.follower_list IDs of all the followers from that day
events A JSON object containing the events of the day
events.followers IDs of the new followers gained that day
events.unfollowers IDs of the new followers lost that day
events.befrienders IDs of the new friends gained that day
events.unfrienders IDs of the new friends lost that day