Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipfs.pics API #33

Open
cloutier opened this issue Nov 10, 2015 · 1 comment
Open

ipfs.pics API #33

cloutier opened this issue Nov 10, 2015 · 1 comment

Comments

@cloutier
Copy link
Member

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.

@didiercf
Copy link
Collaborator

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.

cloutier added a commit that referenced this issue Jan 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants