Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

dmitryrck/sinatra-redis-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sinatra-redis-api

This is an example REST API using sinatra and redis.

Requests

Get todos from a list

$ curl \
  -H "Content-Type: application/json" \
  --data '{ "description": "test#1" }' \
  http://localhost:3000/lists/1234/todos

Create a todo item

$ curl \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{ "uuid": 1234, "description": "test#1" }' \
  http://localhost:3000/lists/1234/todos

Update a todo item

$ curl \
  -X PUT \
  -H "Content-Type: application/json" \
  --data '{ "description": "test#2" }' \
  http://localhost:3000/lists/1234/todos/1234

Delete a todo item from a list

$ curl \
  -X DELETE \
  -H "Content-Type: application/json" \
  http://localhost:3000/lists/1234/todos/1234

About

API using Sinatra and Redis

Resources

Stars

Watchers

Forks

Languages