The Doras API

Updated on 22nd Jun, 2024

Integrating your Doras profile with any platform that will accept it with both read and write abilities.

Read API

/api/user/$username

https://doras.to/api/user/$username -> replacing $username with the username you're fetching.

This will pull the users username, display name, biography, and profile picture.

{ "username": "your_username", "displayname": "Your Display Name", "bio": "Biography", "pic": "https://....." }

/user/$username/blocks

An output of every block on the users profile. As you can see it can be quite long, but that's why we've also introduced a method of filtering.

Every type of block has a different method and output, though 90% of the output will be similar to keep it consistent, and removing bloat where it's not needed to be optimized.

// This is what an average response would look like: [ { "id": "string", "created_at": "string (ISO 8601 date)", "updated_at": "string (ISO 8601 date)", "name": "string", "url": "string (URL)", "icon": "string", "colour": { "text": "string", "background": "string (hex color code)", "toggle": "boolean" }, "type": "string", "adult": "boolean", "show": "boolean", "group": "array", "options": "object", "chosen": "boolean", "selected": "boolean", }, { "id": "string", "created_at": "string (ISO 8601 date)", "updated_at": "string (ISO 8601 date)", "name": "string", "url": "string (URL)", "icon": "string", "colour": { "text": "string", "background": "string", "toggle": "boolean" }, "type": "string", "adult": "boolean", "show": "boolean", "group": "array", "options": "object", "chosen": "boolean", "selected": "boolean", }, { "id": "string", "created_at": "string (ISO 8601 date)", "updated_at": "string (ISO 8601 date)", "name": "string", "url": "string (URL)", "icon": "string", "colour": { "text": "string", "background": "string", "toggle": "boolean" }, "type": "string", "adult": "boolean", "show": "boolean", "group": "array", "options": "object", "chosen": "boolean", "selected": "boolean" }, { "id": "string", "created_at": "string (ISO 8601 date)", "updated_at": "string (ISO 8601 date)", "name": "string", "url": "string", "icon": "string", "colour": { "text": "string", "background": "string (hex color code)", "toggle": "boolean" }, "type": "string", "adult": "boolean", "show": "boolean", "group": "array", "options": { "content":"string" }, "chosen": "boolean", "selected": "boolean" }, { "id": "string", "created_at": "string (ISO 8601 date)", "updated_at": "string (ISO 8601 date)", "name": "string", "url": "string", "icon": "string", "colour": { "text": "string", "background": "string (hex color code)", "toggle": "boolean" }, "type": "string", "adult": "boolean", "show": "boolean", "group": "array", "options": { "rank": "boolean", "stars": "boolean", "prs": "boolean", "issues": "boolean", "contribs": "boolean" }, "chosen": "boolean", "selected": "boolean" }, { "id": "string", "created_at": "string (ISO 8601 date)", "updated_at": "string (ISO 8601 date)", "name": "string", "url": "string (URL)", "icon": "string", "colour": { "text": "string", "background": "string", "toggle": "boolean" }, "type": "string", "adult": "boolean", "show": "boolean", "group": "array", "options": { "size": "number", "link": "string" }, "chosen": "boolean", "selected": "boolean" } ]

Block filtering and types

Filtering is a useful way to get the data you're looking for. In the output of all the blocks, we saw the field "type": "link". We can use this as a selector to narrow down our searches, and save you the effort of parsing too much data.

By appending ?filter=type:$type to the blocks fetch, we can specify what particular blocks to call.


Block Fields

Field NameData TypeDescription
idstringA unique identifier for the block.
created_atstringThe date and time when the block was created.
updated_atstringThe date and time when the block was last updated.
typestringThe type of the block. See the "Block Types" table below for possible values.
namestringThe name or title of the block.
descriptionstringA brief description of the block (internal usage).
categorystringThe category to which the block belongs (internal usage).
icon_reactobjectAn object representing the icon for the block in React format.
urlstring (URL)The URL associated with the block. For email type, it's a string (email).
iconstringThe icon identifier for the block.
colourobjectAn object representing the color settings for the block.
colour.textstringThe color of the text in the block. Can be a string or a string (RGB color).
colour.backgroundstringThe background color of the block. Can be a string or a string (RGB color).
colour.togglebooleanIndicates whether the custom color toggle is enabled for the block.
adultbooleanIndicates whether the block contains adult content.
showbooleanIndicates whether the block is visible.
optionsobjectAn object containing additional options specific to the block type. See the "Block Types" table below for available options.
grouparrayAn array representing the group to which the block belongs.
chosenbooleanIndicates whether the block is chosen (internal usage).
selectedbooleanIndicates whether the block is selected (internal usage).

Block Types

Block TypeAvailable Options (related to the options section in the above table)
link-
email-
mediakitdata (array), total_followers (boolean)
textblockcontent (string)
twitchhide_offline (boolean)
podbean-
divider-
youtubehide_offline (boolean)
youtube_videohide_title (boolean)
youtube_video_latesthide_title (boolean)
spotify-
github_userrank (boolean), stars (boolean), prs (boolean), issues (boolean), contribs (boolean)
imgsize (array), link (string, URL)

Examples of some blocks


Link Block

{ "id": "string (UUID)", "created_at": "string (ISO 8601 date)", "updated_at": "string (ISO 8601 date)", "type": "link", "name": "string", "description": "string", "category": "string", "icon_react": "object", "url": "string (URL)", "icon": "string", "colour": { "text": "string", "background": "string", "toggle": "boolean" }, "adult": "boolean", "show": "boolean", "options": "object", "group": "array", "chosen": "boolean", "selected": "boolean" }

Mediakit

{ "id": "string (UUID)", "created_at": "string (ISO 8601 date)", "updated_at": "string (ISO 8601 date)", "type": "mediakit", "name": "string", "description": "string", "category": "string", "icon_react": "object", "url": "string", "icon": "string", "colour": { "text": "string (RGB color)", "background": "string (RGB color)", "toggle": "boolean" }, "adult": "boolean", "show": "boolean", "options": { "data": "array", "total_followers": "boolean" }, "group": "array", "chosen": "boolean", "selected": "boolean" }

...