ipfspics-server
ipfspics-server copied to clipboard
ipfs.pics API
The basic of the API are already there and working:
- ipfs.pics/api/v1/upvote/$hash
- ipfs.pics/api/v1/downvote/$hash
- ipfs.pics/api/v1/report/$hash
I'd like to make an API for @didiercf's upcoming backup application, instead of using MySQL directly:
- ipfs.pics/api/v1/backup/sfw/random
- ipfs.pics/api/v1/backup/nsfw/random
- ipfs.pics/api/v1/backup/sfw/all (requires authentication)
- ipfs.pics/api/v1/backup/nsfw/all (requires authentication)
- ipfs.pics/api/v1/backup/sfw/since/$unixtime (requires authentication)
- ipfs.pics/api/v1/backup/nsfw/since/$unixtime (requires authentication)
Same thing for the current administration application:
- ipfs.pics/api/v1/administration/sfw/$hash (requires authentication)
- ipfs.pics/api/v1/administration/nsfw/$hash (requires authentication)
- ipfs.pics/api/v1/administration/ban/$hash (requires authentication)
Maybe we could merge in the database the admnistration in the vote table. Ex: a vote by admin_1 of type ban for $hash. It would be more scalable if we add more admninistrators with different priority and maybe different optional type of votes (ex: voting "notInteresting" to remove it from the random feature).
I also want to make the upload smarter:
- ipfs.pics/api/v1/upload Where you can
- POST an image and it redirects to the upload
- POST text and it will return you the hash of the text
- POST a json object and it will make an album
I'll update this post as things get implemented.
I would put what the query does instead of the application that would use it in the URL, here is a list of what I would need :
For the administration
- ipfs.pics/api/v1/update/sfw/$hash
- ipfs.pics/api/v1/update/nsfw/$hash
- ipfs.pics/api/v1/update/ban/$hash
- ipfs.pics/api/v1/select/notadmin
- ipfs.pics/api/v1/select/all
- ipfs.pics/api/v1/select/nsfw
- ipfs.pics/api/v1/select/ban
Upcoming list for the backup application, there are still things I'm trying to figure out for that one.