Giter Site home page Giter Site logo

aspyre-api's Introduction

Aspyre API

This project is the backend portion of the Aspyre Chrome extension. It is a RESTful API built using the rails-api gem. A live version is hosted here (requires user authentication).

Endpoints

Users

POST /auth

Creates a new user. Requires email, password, and password_confirmation params. A verification email will be sent to the email address provided.

PUT /auth

Account updates. This route will update an existing user's account settings. The default accepted params are password and password_confirmation.

DELETE /auth

Account deletion. This route will destroy users identified by their uid and auth_token headers.

Sessions

POST /auth/sign_in

Starts a new user session. Requires email and password as params. This route will return a JSON representation of the User model on successful login along with the access-token and client in the header of the response.

DELETE /auth/sign_out

Ends the user's current session. Will invalidate the user's authentication token. Requires uid, client, and access-token in the request headers.

Goals

GET /goals

Returns a list of all current user goals (requires uid to be passed).

GET /goals/:id

Returns individual current user goal (requires uid to be passed).

POST /goals

Creates a new user goal.

PUT /goals/:id

DELETE /goals/:id

Tasks

GET /tasks

GET /tasks/:id

POST /tasks

PUT /tasks/:id

DELETE /tasks/:id

Installation

Clone the repo and install dependencies

git clone https://github.com/kylebuttner/aspyre-api.git
cd aspyre-api
bundle install

You will also need to create a development and testing database with PostgreSQL. If you don't have Postgres, use Homebrew to run brew install postgresql. Then, from the command line, use psql to create the following databases:

$ psql

psql (9.5.1)
Type "help" for help.

kylebuttner=# create database goals-api_development;
CREATE DATABASE
kylebuttner=# create database goals-api_test;
CREATE DATABASE

Testing

This app was built with RSpec. To run the test suite, simply type rspec into the command line from the root directory.

Contributors

Caspar Fischer-Zernin
Claudia Green
Han Fakira
Kyle Buttner

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.