{"id":21038725,"url":"https://github.com/ceribe/rest-pepper-plantation","last_synced_at":"2026-05-20T06:37:23.703Z","repository":{"id":109464414,"uuid":"481701150","full_name":"ceribe/rest-pepper-plantation","owner":"ceribe","description":"Silly REST project I did for a university class","archived":false,"fork":false,"pushed_at":"2022-06-14T07:11:48.000Z","size":145,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-20T16:28:08.903Z","etag":null,"topics":["kotlin","ktor","ktor-server","poznan-university-of-technology","rest","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ceribe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-04-14T17:59:47.000Z","updated_at":"2022-07-15T17:41:03.000Z","dependencies_parsed_at":"2023-05-24T17:45:45.136Z","dependency_job_id":null,"html_url":"https://github.com/ceribe/rest-pepper-plantation","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/ceribe%2Frest-pepper-plantation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceribe%2Frest-pepper-plantation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceribe%2Frest-pepper-plantation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceribe%2Frest-pepper-plantation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ceribe","download_url":"https://codeload.github.com/ceribe/rest-pepper-plantation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243482849,"owners_count":20297897,"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":["kotlin","ktor","ktor-server","poznan-university-of-technology","rest","rest-api"],"created_at":"2024-11-19T13:34:23.816Z","updated_at":"2025-12-30T07:17:15.803Z","avatar_url":"https://github.com/ceribe.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rest Pepper Plantation\n\n# Objects\n\n```kotlin\ndata class Pepper(var name: String, var potId: Int, var lastWatering: Long)\n```\n\n```kotlin\ndata class Pot(var name: String, var count: Int)\n```\n\n# Routes\n\n# /peppers\n\n### GET\n\nParameters:\n- start: Int\n- limit: Int\n- name: String\n\n```bash\ncurl -X GET \"http://localhost:8080/peppers?start=0\u0026limit=2\" -i\n```\n\n```\nHTTP/1.1 200 OK\nTotal-Count: 3\nNext-Page: /peppers?start=2\u0026limit=2\nContent-Length: 116\nContent-Type: application/json\n\n[{\"name\":\"Reaper\",\"potId\":1,\"lastWatering\":1652289366611},{\"name\":\"PepperX\",\"potId\":1,\"lastWatering\":1652289414355}]\n```\n\n### POST\n\n```bash\ncurl -X POST \"http://localhost:8080/peppers\" -i\n```\n\n```\nHTTP/1.1 201 Created\nETag: -1273670072\nContent-Length: 25\nContent-Type: text/plain; charset=UTF-8\n\nPepper created with id: 1\n```\n\n# /peppers{id}\n\n### GET\n\n```bash\ncurl -X GET \"http://localhost:8080/peppers/1\" -i\n```\n\n```\nHTTP/1.1 200 OK\nETag: -2064343519\nContent-Length: 56\nContent-Type: application/json\n\n{\"name\":\"Reaper\",\"potId\":1,\"lastWatering\":1652289366611}\n```\n\n### PUT\n```bash\ncurl -H Content-Type:application/json -H Etag:??? -X PUT --data {\"name\":\"Reaper\",\"potId\":1,\"lastWatering\":\"0\"} http://localhost:8080/peppers/1 -i\n```\n\n```\nHTTP/1.1 200 OK\nETag: -2064343519\nContent-Length: 14\nContent-Type: text/plain; charset=UTF-8\n\nPepper updated\n```\n\n### DELETE\n\n```bash\ncurl -X DELETE \"http://localhost:8080/peppers/1\" -i\n```\n\n```\nHTTP/1.1 200 OK\nContent-Length: 14\nContent-Type: text/plain; charset=UTF-8\n\nPepper deleted\n```\n\n# /peppers/{id}/waterings\n\n### POST\n\n```bash\ncurl -X POST \"http://localhost:8080/peppers/1/waterings\" -i -H Etag:???\n```\n\n```\nHTTP/1.1 200 OK\nETag: -285343108\nContent-Length: 14\nContent-Type: text/plain; charset=UTF-8\n\nPepper watered\n```\n\n# /pepper/{id}/repottings\n\n\"2\" is the id of the pot to which the pepper will be repotted\n\n```bash\ncurl -X POST \"http://localhost:8080/peppers/1/repottings\" -i -H Etag:??? --data \"2\"\n```\n\n```\nHTTP/1.1 200 OK\nETag: -2063367539\nContent-Length: 15\nContent-Type: text/plain; charset=UTF-8\n\nPepper repotted\n```\n\n# /warehouse\n\n### GET\n\n```bash\ncurl -X GET \"http://localhost:8080/warehouse\" -i\n```\n\n```\nHTTP/1.1 200 OK\nContent-Length: 77\nContent-Type: text/plain; charset=UTF-8\n\nWater: 9\nSoil: 9\nPots: [Pot(name=small, count=11), Pot(name=medium, count=9)]\n```\n\n# /warehouse/water\n\n### GET\n\n```bash\ncurl -X GET \"http://localhost:8080/warehouse/water\" -i\n```\n\n```\nHTTP/1.1 200 OK\nContent-Length: 1\nContent-Type: text/plain; charset=UTF-8\n\n9\n```\n\n### PUT\n\n```bash\ncurl -X PUT \"http://localhost:8080/warehouse/water\" -i --data \"100\"\n```\n\n```\nHTTP/1.1 200 OK\nContent-Length: 10\nContent-Type: text/plain; charset=UTF-8\n\nWater: 100\n```\n\n# /warehouse/soil\n\n### GET\n\n```bash\ncurl -X GET \"http://localhost:8080/warehouse/soil\" -i\n```\n\n```\nHTTP/1.1 200 OK\nContent-Length: 1\nContent-Type: text/plain; charset=UTF-8\n\n9\n```\n\n### PUT\n\n```bash\ncurl -X PUT \"http://localhost:8080/warehouse/soil\" -i --data \"100\"\n```\n\n```\nHTTP/1.1 200 OK\nContent-Length: 9\nContent-Type: text/plain; charset=UTF-8\n\nSoil: 100\n```\n\n# /warehouse/pots\n\n### GET\n\n```bash\ncurl -X GET \"http://localhost:8080/warehouse/pots\" -i\n```\n\n```\nHTTP/1.1 200 OK\nContent-Length: 57\nContent-Type: application/json\n\n[{\"name\":\"small\",\"count\":11},{\"name\":\"medium\",\"count\":9}]\n```\n\n### POST\n\n```bash\ncurl -X POST \"http://localhost:8080/warehouse/pots\" -i\n```\n\n```\nHTTP/1.1 201 Created\nETag: 0\nContent-Length: 22\nContent-Type: text/plain; charset=UTF-8\n\nPot created with id: 1\n```\n\n# /warehouse/pots/{id}\n\n### GET\n\n```bash\ncurl -X GET \"http://localhost:8080/warehouse/pots/1\" -i\n```\n\n```\nHTTP/1.1 200 OK\nETag: -898954268\nContent-Length: 27\nContent-Type: application/json\n\n{\"name\":\"small\",\"count\":11}\n```\n\n\n### PUT\n\n```bash\ncurl -H Content-Type:application/json -H Etag:??? -X PUT http://localhost:8080/warehouse/pots/1 --data {\"name\":\"small\",\"count\":10} -i\n```\n\n```\nHTTP/1.1 200 OK\nETag: -898954269\nContent-Length: 11\nContent-Type: text/plain; charset=UTF-8\n\nPot updated\n```\n\n### DELETE\n\n```bash\ncurl -X DELETE \"http://localhost:8080/warehouse/pots/1\" -i\n```\n\n```\nHTTP/1.1 200 OK\nContent-Length: 11\nContent-Type: text/plain; charset=UTF-8\n\nPot deleted\n```\n\n# /waterings\n\n### POST\n\n```bash\ncurl -X POST \"http://localhost:8080/waterings\" -i\n```\n\n```\nHTTP/1.1 200 OK\nContent-Length: 19\nContent-Type: text/plain; charset=UTF-8\n\nAll peppers watered\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceribe%2Frest-pepper-plantation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceribe%2Frest-pepper-plantation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceribe%2Frest-pepper-plantation/lists"}