DEV Community

Discussion on: Exploring DEV.to API

Collapse
 
grahamthedev profile image
GrahamTheDev

First of all, I love the mini app you built for this experiment, as it isn't tied to your followed tags it lets you discover random articles you might not see in your feed! ❀ and πŸ¦„ from me!

As for posting and updating from the API...it is extremely useful if you cross post to other sites. Edit in one place, deploy to many, something I have been piecing together over the last few weeks.

Oh and you can abuse the "update" part of the API to make posts where people can actually add content to them or you can update them automatically (I have two such posts that update every minute to do some fun tricks! Happy to share the links to those and an explanation if that doesn't bother you, but don't want to self promote unnecessarily!)

Collapse
 
mwrpwr profile image
Joseph Maurer

Oh cool yeah please share a link to what you’re working on! Cool to hear I’m not the only one messing around with the API for fun 😊

Collapse
 
grahamthedev profile image
GrahamTheDev • Edited

dev.to/inhuofficial/i-built-a-3-pa...

In this post I have a "SPA" which has a "contact form" (you will see why I put those in quotes when you play with it / read the article!) - instead of the contact form sending me an email it instead adds anything that is filled in into a comments section within the post itself.

To do that I update the post every minute using the dev.to API based on stored messages (in fact thinking about it it is really inefficient as I do that every minute no matter what, I should change it to just update if a new message has been added....a quick weekend job!)


dev.to/inhuofficial/this-gif-is-ac...

In this article I create a GIF dynamically every minute that counts down to a date.

Yet again the script that creates that GIF runs every minute and then updates the article automatically, that way the GIF is always in sync.

Any questions just ask, but that is my way of getting used to the dev.to API πŸ˜‹