{"id":19842485,"url":"https://github.com/zelflod/classifieds-api","last_synced_at":"2026-04-09T21:52:02.799Z","repository":{"id":121231300,"uuid":"233146681","full_name":"zelflod/classifieds-api","owner":"zelflod","description":"Classifieds JSON API","archived":false,"fork":false,"pushed_at":"2020-01-15T11:17:33.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-11T11:46:15.569Z","etag":null,"topics":["docker","golang","postgres"],"latest_commit_sha":null,"homepage":"","language":"Go","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/zelflod.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":"2020-01-10T23:22:59.000Z","updated_at":"2020-01-15T11:17:35.000Z","dependencies_parsed_at":"2023-05-03T17:51:41.700Z","dependency_job_id":null,"html_url":"https://github.com/zelflod/classifieds-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/zelflod%2Fclassifieds-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zelflod%2Fclassifieds-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zelflod%2Fclassifieds-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zelflod%2Fclassifieds-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zelflod","download_url":"https://codeload.github.com/zelflod/classifieds-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241211972,"owners_count":19927882,"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":["docker","golang","postgres"],"created_at":"2024-11-12T12:34:44.116Z","updated_at":"2025-10-13T14:34:09.564Z","avatar_url":"https://github.com/zelflod.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Classifieds JSON API\n\nRun:\n\n- `docker-compose up` \n\nUsing Dockerfile: \n\n- собрать контейнер `sudo docker build -t nozimdev/classifieds-api .`\n- запустить контейнер `sudo docker run -p 5000:5000 --name classifieds-api -t nozimdev/classifieds-api`\n- остановить работу контейнера `docker stop classifieds-api`\n- удалить контейнер `docker rm classifieds-api`\n\n### GET /api/items\n \nМетод получения списка объявлений\n\nПараметры: \n\n- `sort` : date | price\n- `desc`: true | false\n- `page`: [0-9]+\n\nПример запроса: \n\n```\ncurl -X GET \\\n  'http://localhost:5000/api/items?desc=true\u0026sort=price\u0026page=1' \\\n  -H 'Accept: */*' \\\n  -H 'Accept-Encoding: gzip, deflate' \\\n  -H 'Cache-Control: no-cache' \\\n  -H 'Connection: keep-alive' \\\n  -H 'Host: localhost:5000' \\\n  -H 'cache-control: no-cache'\n```\n\n### GET /api/item/:id \n\nМетод получения конкретного объявления\n\nПараметры:\n\n- `fields`: [description,photos]\n\nПример запроса: \n\n```\ncurl -X GET \\\n  'http://localhost:5000/api/item/1?fields=description,photos' \\\n  -H 'Accept: */*' \\\n  -H 'Accept-Encoding: gzip, deflate' \\\n  -H 'Cache-Control: no-cache' \\\n  -H 'Connection: keep-alive' \\\n  -H 'Host: localhost:5000' \\\n  -H 'cache-control: no-cache'\n```\n\n### POST /items \n\nМетод создания объявления\n\nBody:\n\n- name: string\n- price: float\n- photos: string[]\n- description: string\n\nПример запроса: \n\n```\ncurl -X POST \\\n  http://localhost:5000/api/items \\\n  -H 'Accept: */*' \\\n  -H 'Accept-Encoding: gzip, deflate' \\\n  -H 'Cache-Control: no-cache' \\\n  -H 'Connection: keep-alive' \\\n  -H 'Content-Length: 185' \\\n  -H 'Content-Type: application/json' \\\n  -H 'Host: localhost:5000' \\\n  -H 'cache-control: no-cache' \\\n  -d '{\n\t\"name\":\"продается квартира 1м 23\",\n\t\"description\":\"писание продается квартира 1м\",\n\t\"price\": 100,\n\t\"photos\": [\"image1.png\", \"image2.png\"]\n}'\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzelflod%2Fclassifieds-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzelflod%2Fclassifieds-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzelflod%2Fclassifieds-api/lists"}