devRant Public API Docs

devRant Public API Docs

cozyplanes

Here's some basic API info


- getting the main feed: (this is the most basic version, it will get items sorted by algo by default. app=3 is needed for a check we do on the backend, eventually I'll remove it since it's not doing much) 

https://www.devrant.io/api/devrant/rants?app=3 


https://www.devrant.io/api/devrant/rants?app=3&sort=recent&limit=30&skip=10 (those are most of the other params, pretty self-exlanatory I think, you can put algo, recent, or top in sort and limit and skip tell it how many you want/want to skip for paging) 


- Getting a rant with its full text and comments: (just replace rant_id with any rant id, ex. 32502 and you'll see all of the info) 

https://www.devrant.io/api/devrant/rants/32502?app=3 


- Getting a user profile: (just send any id, ex. 487 is my user id) 

https://www.devrant.io/api/users/487?app=3 


- Get a user id by username: (this example sends my username. Since you can't currently fetch a profile by a username, you can just use this to get the user id first and then fetch the profile from the user id) 

https://www.devrant.io/api/get-user-id?username=dfox&app=3 



- Search: (ex. with term "js") 

https://www.devrant.io/api/devrant/search?term=js&app=3 


- Random rant with at least 15 +1's: 

https://www.devrant.io/api/devrant/rants/surprise?app=3 


If you want to see what some other people are doing with the API, there's a good list of projects you can check out here for examples:https://www.devrant.io/projects 



If you're looking to publish an app built on the devRant platform, right now we have a few requirements: 

- if the name devRant is in the title, it should say "unofficial" 

- any usage of rants must also include credit the user who created it (by displaying their username) 

- there should be a link or reference back todevrant.io somewhere in the project 


- no apps with with the word devRant in the title should be published to the Google Play store or the Apple App Store 


For details, contact David directly at

info@devrant.io or david@hexicallabs.com


Report Page