Docs
Refs
Our documentation is a work in progress. We're slowly opening our API to the masses. Note that drastic changes may occur without warning.
Please let us know on GitHub what you need from our API and our docs, and the project in general.
The gist
Every time an article is created on SuperYesMore, a slug is attached to this article. A slug is a slugified version of the title to which is added the id of the article (a random string of letters and numbers). The slug is grabbed from the url and used to retroeve the article. A ref offers an alternative to this default slug approach as you can customize your url. In otehr words, a ref is a custom identifier that you can add to your article. A ref is useful if you're querying your article through the SuperYesMore API. It's typically the url you would use on your own website to make it easier for you to query our API. You can think of a ref as a permalink.
To create your ref scheme, you can use the following variables. Every time an article is created for your publication, its ref automatically follows your scheme, replacing variables with actual values.
$article_slug
: the slug of the article$article_hash
: the hash of the article (a random, unique string made of letters and numbers)$article_pubdate_year
: The year (four digits) of the pubdate$article_pubdate_month_name
: The name of the month of the pubdate (january, february etc.)$article_pubdate_day
: The day (no leading zero) of the pubdate$author_username
: the username of the author$author_slug
: the slug of the author
Example
$author_slug/$article_pubdate_year-$article_pubdate_month_name-$article_pubdate_day
Will output a ref like this:
alex-duloz/2022-january-1
Suggestions? Comments? More pings? Hit us on GitHub.