{"id":16529512,"url":"https://github.com/leonardofaria/todo-api","last_synced_at":"2025-04-10T09:40:27.126Z","repository":{"id":139464771,"uuid":"62175056","full_name":"leonardofaria/todo-api","owner":"leonardofaria","description":"REST API created using Sinatra and ActiveRecord - http://sinatra-todo-api.herokuapp.com","archived":false,"fork":false,"pushed_at":"2016-07-25T19:51:38.000Z","size":305,"stargazers_count":4,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T08:41:09.395Z","etag":null,"topics":["activerecord","api","heroku","rest","ruby","sinatra"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leonardofaria.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-28T21:19:46.000Z","updated_at":"2021-11-08T18:11:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"4748332a-be97-4d5e-a50f-e969788e442d","html_url":"https://github.com/leonardofaria/todo-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonardofaria%2Ftodo-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonardofaria%2Ftodo-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonardofaria%2Ftodo-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonardofaria%2Ftodo-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leonardofaria","download_url":"https://codeload.github.com/leonardofaria/todo-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248193542,"owners_count":21062887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activerecord","api","heroku","rest","ruby","sinatra"],"created_at":"2024-10-11T17:45:12.598Z","updated_at":"2025-04-10T09:40:27.118Z","avatar_url":"https://github.com/leonardofaria.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Todo API\n\nThis is an assignment of Server Side course, from [Web and Mobile App Design and Development](http://langara.ca/programs-and-courses/programs/web-and-mobile-app/index.html) program, performed in [Langara College](http://langara.bc.ca).\n\nIt's a simple REST API, created using Sinatra and ActiveRecord.\n\n## Installation\n\nClone, install dependencies, setup database (`config/environments.rb`), run migrations, add initial data, start server\n\n* `git clone git@github.com:leonardofaria/todo-api.git`\n* `bundle install`\n* `rake db:migrate`\n* `rake db:seed`\n* `shotgun config.ru`\n\n## Deployment\n\nThis app is ready to use in Heroku.\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\n## Usage\n\nOpen your favourite HTTP client and start your requests.\n\n### Create a list (post)\n\n`curl -d \"name=test\u0026color=cccccc\" http://localhost:9393/lists`\n\n`name` and `color` are required parameters. `color` must be a hexadecimal color (ex.: cccccc)\n\n### Read all lists (get)\n\n`curl http://localhost:9393/lists`\n\n### Update a list (put)\n\n`curl -X PUT -d \"name=test\u0026color=cccccc\" http://localhost:9393/lists/:id`\n\n### Delete a list (delete)\n\n`curl -X DELETE http://localhost:9393/lists/:id`\n\nDeleting a list will also deleted all its tasks\n\n### Create a task (post)\n\n`curl -d \"name=task\u0026list_id=1\" http://localhost:9393/tasks`\n\n`name` and `list_id` are required parameters.\n\n### Read all tasks (get)\n\n`curl http://localhost:9393/tasks`\n\n### Update a task (update)\n\n`curl -X PUT -d \"name=test\u0026list_id=1\" http://localhost:9393/tasks/:id`\n\n### Delete a task (delete)\n\n`curl -X DELETE http://localhost:9393/tasks/:id`\n\n*****\n\n### Notes\n\n* If you want to restore the initial data go to http://localhost:9393/refresh\n* If you don't like cURL you can use [httpie](https://github.com/jkbrzt/httpie) or [Postman](https://www.getpostman.com/):\n\n#### httpie\n\n![httpie](https://raw.github.com/leonardofaria/todo-api/master/public/httpie.png)\n\n#### Postman\n\n![Postman](https://raw.github.com/leonardofaria/todo-api/master/public/postman.png)\n\n\n## Group\n\n* Leonardo Faria\n* Sabrina Silveira","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonardofaria%2Ftodo-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleonardofaria%2Ftodo-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonardofaria%2Ftodo-api/lists"}