API Reference
About

Yes, you heard that right, this website has an official API! Is it overkill? Absolutely. Still cool? Absolutely.

/api/programming
GET /

Obtains list of all my current programming projects.

[
 {
  "id": 4,
  "title": "...",
  "subtitle": "...",
  "description": "...",
  "link": "...",
  "skills": [ "...", ... ]
 },
...
]

/api/video
GET /

Obtains list of self-made videos.

[
 {
  "url": 11-char youtube id,
  "date": "...",
 },
...
]

GET /commissions

Obtains list of commissions. All commissions done for a creator can be obtained through the key denoted by that creator's name.

{
 "Creator1": ,
  "views": number,
  "pfp": a URL containing a 240x240 profile picture,
  "id": some string id,
  "videos": [,
   {
    "url": 11-char youtube id,
    "date": "...",
   }
   ...
  ],
 "Creator2": ,
  "views": number,
  "pfp": a URL containing a 240x240 profile picture,
  "id": some string id,
  "videos": [,
   {
    "url": 11-char youtube id,
    "date": "...",
   }
   ...
  ],
}

/api/motion
GET /

Obtains list of motion graphics projects, ordered by date descending.

[
 {
  "id": 4,
  "name": "...",
  "description": "...",
  "youtube_id": 11-char youtube id,
  "publish_date": "YYYY-MM-DD",
  "skills": [ "...", ... ]
 },
...
]

/api/animation
GET /

Obtains list of 3D animation projects, ordered by date descending.

[
 {
  "id": 4,
  "name": "...",
  "description": "...",
  "youtube_id": 11-char youtube id,
  "publish_date": "YYYY-MM-DD",
  "skills": [ "...", ... ]
 },
...
]

/api/graphic_design
GET /

Fetches all possible keys provided in the image bucket for the graphic design page. Each key can be used to fetch that specific image.

[
 {
  "Key": "Posters/Some poster here.jpg",
  "Size": 85592
 },
...
]

GET /[...id]

Returns a full-quality image provided from the key given.

404s if the key leads to no image.

GET /resize/[...id]

Returns a low-quality image provided from the key given. Useful for keeping the graphic design page optimized when displaying every image.

404s if the key leads to no image.

/api/cron
GET /

Activates the portfolio site's main Cron job: revalidate every path that is not dynamic. This is helpful to ensure that caches are properly updated every day at regular times. The website automatically fires this every 24 hours at 12:00AM.

To manually activate it, the correct 16-digit alphanumeric Bearer token is required. This is to prevent unauthorized cache invalidations.

Returns 401 if unauthorized, or { success: true } if authorization passes and revalidations are successful.