devtogo happens to be my first open-source API integration and I have a soft spot for dev.to ♥️.
devtogo is a Go API client library for dev.to. I made a huge update to this in the past week that I would like to share.
But first, let me do my shameless plug. Always accepting contributions!
ShiraazMoollatjie / devtogo
A REST API Wrapper for the dev.to api in go
Fully complete client
The major update is that devtogo is a fully complete and supports 100% of the API features 🎉. This means that you should now be able to:
- Do everything with articles
- View comments
- View tags
- Create, update and view listings
- View podcast-episodes
- View your user profile information
- View video articles
- View webhooks
This is a simple example that you can use as a base for a dev.to scraper.
package main
import (
"fmt"
"log"
"github.com/ShiraazMoollatjie/devtogo"
)
func main() {
cl := devtogo.NewClient(devtogo.WithApiKey("YOUR_API_KEY_HERE"))
al, err := cl.Articles(devtogo.Defaults())
if err != nil {
log.Fatalf("something went wrong: %+v", err)
}
fmt.Printf("All Articles: %+v", al)
}
Milestones
These are important milestones that happened in this project. It might not be reflective of a successful project, but they did hit and I feel proud of them
🎉 Someone contributed
When I initially did my launch post, I received a much higher response than what I thought I'd get (more than zero LOL). Someone made a PR which is more valuable to me than the project itself.
It felt great to get someone else to contribute. I started this project to learn more about go, so I appreciate it when other gophers tag along.
⭐ Engineers starred it
Again, didn't expect this. Normally I leave my code on GitHub and at best at least one person will star it. This one got 5 stars, not much at all, but surprising to me.
Roadmap ahead
Two themes are going forward that I feel needs to be done for this project.
Fork for forem
The devtogo client needs to align with dev.to's new vision of forem. I think that with a little bit of commits, this project should be able to work on any forem based site. That is super cool!
Use more Go features
devtogo is one of my first Go open source projects, and in some places it shows LOL. The idea is to use more go features such as:
- The use of contexts for HTTP calls
- Incorporating channels for certain use cases
- Maybe add optional metric tracking
Have more examples
There are some pretty interesting things that you can do with the forem/dev.to api. I would want to showcase these in the future.
Shoutout to the dev.to team
A big thanks for the dev.to team for giving me a platform to write about tech. I'm a big lurker, sometimes contributor and the community is so amazing. It always happens that when you think the platform peaked, then there's some innovation that happens which is super cool.
Top comments (0)