Enumerating URL types used for Steem Apps

in SteemDevs4 years ago (edited)

Although there is no given reason, URLs in Steem Apps use the same URL scheme between them. Whether you use steemit, steempeak, or busy, the URLs are the same between them.

So when we want to mention another user we use @leprechaun or if we want to refer to a specific post we should use the path only part of the URL. For example, instead of https://www.steempeak.com/@leprechaun/feed, it is better to use /@leprechaun/feed as a URL and whatever interface the user is on he can stay on that same interface.

It is not immediately obvious how some of data from these URLs are generated. Finding things in the steemit/condenser source code is not fun and the steemapi docs lack completeness.

So here is my created list of URL types for Steem. I shall edit and update this post as time goes on.

Types

interface beneficiary {
    account: string, 
    weight: number
};

interface Opinion {
    voter:string; 
    rshares:number; 
    percent:number; 
    reputation:number;
}

interface post {
        post_id : number;
    author : string;
    permlink : string;
    category : string;
    title : string;
    body : string;
    json_metadata : string;
    created : Date;
    last_update : Date;
    depth : number;
    children : number;
    net_rshares : number;
    last_payout : Date;
    cashout_time : Date;
    total_payout_value : string;
    curator_payout_value : string;
    pending_payout_value : string;
    promoted : string;
    replies : any;
    body_length : number;
    active_votes : Array<Opinion>;
    author_reputation : number;
    parent_author : string;
    parent_permlink : string;
    url : string;
    root_title : string;
    beneficiaries : Array<beneficiary>;
    max_accepted_payout : string;
    percent_steem_dollars : string;
};

User Feed:

example:
/@leprechaun/feed

Sinopsis:
/@useraccount/feed

User Blog:

example:
/@leprechaun

Sinopsis:
/@useraccount or /@useraccount*/blog

Loading comes from:

steem.api.getDiscussionsByAuthorBeforeDate(useraccount,  
startPermlink : null|string,  beforeDate, 
limit : integer, 
function (error : any, result : Array<post>) {});

NB: Is beforeDate a string representation of a Date or a Date object?

View Posts by some order

example:
/trending
/one of trending, promoted, hot, created, payout, payout_comments, or muted
Still investigating
NB:{page:'posts',sort='trending',tag:''}

View Posts by some order with tags

example:
/trending/bitcoin
/one of trending, promoted, hot,
created, payout, payout_comments, or muted
/some tag
Still investigating

Two part forms with @username

/@username/one of 'blog', 'posts', 'comments', 'replies', 'payout', 'transfers',
'author-rewards', 'followers', 'followed'

still investigating
{page:'account',sort='blog',tag='@user'}

Three part forms with @username

/tag/@username/something

To investigate...

Do you other ways to improve this document? Do you know of other forms that were left out? Leave your comments below.

Source: steemit/condenser/src/app/utils/steemApi.js:function parsePath(url)

Sort:  

Hi! Did you know that steemit.com is now censoring users and posts based on their opinions?
All the posts of these users are gone!
https://github.com/steemit/condenser/commit/3394af78127bdd8d037c2d49983b7b9491397296

Here's a list of some banned users:
'roelandp', 'blocktrades', 'anyx', 'ausbitbank', 'gtg', 'themarkymark', 'lukestokes.mhth', 'netuoso', 'innerhive'
See anyone you recognize? There could be more, they also have a remote IP ban list.

Will you be censored next?