Skip to content

Allow share and upload photo files for the frontend

License

Notifications You must be signed in to change notification settings

NARO-TW/DFans-api

Repository files navigation

DFans API

API to store,retrieve, and share confidential photos to unspecific users.

Routes

All routes return Json

  • GET /: Root route shows if Web API is running
  • GET api/v1/accounts/[username]: Get account details
  • POST api/v1/accounts: Create a new account
  • GET api/v1/albums/[album_id]/photos/[photo_id]: Get a photo in an album
  • GET api/v1/albums/[album_id]/photos: Get the list of photos for an album
  • POST api/v1/albums/[album_id]/photos: Upload photos to an album
  • GET api/v1/albums/[album_id]: Get information about an album
  • GET api/v1/albums: Get list of all albums
  • POST api/v1/albums: Create a new album

Install

Install this API by cloning the relevant branch and use bundler to install specified gems from Gemfile.lock:

bundle install

Setup development database once:

rake db:migrate

Test

Setup test database once:

RACK_ENV=test rake db:migrate

Run the test specification script in Rakefile:

rake spec

Develop/Debug

Add fake data to the development database to work on this project:

rake db:seed

Execute

Launch the API using:

rake run:dev

Release check

Before submitting pull requests, please check if specs, style, and dependency audits pass (will need to be online to update dependency database):

rake release?

About

Allow share and upload photo files for the frontend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published