Skip to content

fritzvl/10ideas_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to 10ideas API

This is the 10ideas API Rails application for the masterofcode.com 10ideas application contest

API methods

POST /ideas.json - Create new idea

GET /ideas/:id.json - Get the specific idea

PUT /ideas/:id.json - Update the existing idea

DELETE /ideas/:id.json - Update the existing idea

PUT /ideas/:id/publish.json - Make idea public

PUT /ideas/:id/vote.json - Vote for idea

GET /ideas.json - Get my ideas for today

GET /ideas/public.json - Get all public ideas for today

GET /ideas/winners.json - Get the list of top 10 ideas

GET /ideas/by_date.json?date=yyyy-mm-dd - Get my ideas by date

GET /ideas/public_by_date.json?date=yyyy-mm-dd - Get all public ideas by date

GET /ideas/winners_by_date.json?date=yyyy-mm-dd - Get the list of top 10 ideas

Registartion methods

POST /users - Register user, mandatory fields user, user, user PUT /users - Update user, if you change password mandatory field is user

Authentication

For all calls except registration user should be authenticated.Authentication is stateless, token-based. On registration you will get JSON {:authentication_token=>“some_token”}, you should save it and use in all calls like POST /users/sign_in, :user=>{:login,:password}

Update profile

PUT /users, :user=>{some_fields},:auth_token=>“your token”

Response statuses

In case of invalid request API will return status 422 - unprocessible entity

Format

all requests to the API should be made with .json format, requestiong data in json format

About

10 ideas app contest api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published