DEV.to support
sgrove opened this issue · comments
- DEV is one of the most open developer sites out there
- They have an API!
- .. and we've added it to the OneGraph tooling!
Here's an example to get the recently rising top
articles
right from within GraphiQL!
query RecentlyRisingTopArticles {
devTo {
articles(state: "rising") {
nodes {
id
title
url
socialImage
publishedAt
user {
name
username
githubUsername
}
}
}
}
}
We're still waiting to get into the private OAuth alpha, so for any fields that
require auth (basically any non-published articles or webhooks) you'll need to
create an API token to use the integration.
I suspect that ~30 minutes after we hear that OneGraph is in the OAuth alpha
(and we make our way back to a nearby keyboard), we'll have full onegraph-auth
support with automatic login for your apps!
In the meantime, we have near full coverage of the API:
- Create an article on DEV with GraphQL
- Publish and un-publish articles you've written on DEV
- Find your DEV articles that are pending publication
- Find all of your DEV webhooks
- Check if a user in your app has signed into DEV
- Create a DEV webhook to be notified when articles are created or updated
- Destroy a DEV webhook when you realize how frequently articles are created and updated on DEV
We've also gone through the API looking to normalize as much as possible. DEV
has great content, they've been actively open, and we want to make their API as
joyous to use as possible.
If you find anything missing, just ping us on @onegraph!
Special thanks to @zaiste for requesting DEV's API in the first place - check out their articles on DEV!