{"id":26382834,"url":"https://github.com/minikin/twitter-rs","last_synced_at":"2026-04-13T08:31:53.807Z","repository":{"id":46064506,"uuid":"382925298","full_name":"minikin/twitter-rs","owner":"minikin","description":"Simple Twitter API  Clone in Rust.","archived":false,"fork":false,"pushed_at":"2021-11-16T21:51:29.000Z","size":45,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T14:27:34.094Z","etag":null,"topics":["postgresql","rust","twitter"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/minikin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-04T18:46:22.000Z","updated_at":"2021-11-16T21:51:29.000Z","dependencies_parsed_at":"2022-08-01T11:47:26.476Z","dependency_job_id":null,"html_url":"https://github.com/minikin/twitter-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/minikin/twitter-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minikin%2Ftwitter-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minikin%2Ftwitter-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minikin%2Ftwitter-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minikin%2Ftwitter-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minikin","download_url":"https://codeload.github.com/minikin/twitter-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minikin%2Ftwitter-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31746101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T06:26:45.479Z","status":"ssl_error","status_checked_at":"2026-04-13T06:26:44.645Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["postgresql","rust","twitter"],"created_at":"2025-03-17T06:19:15.429Z","updated_at":"2026-04-13T08:31:53.784Z","avatar_url":"https://github.com/minikin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eTwitter API Clone in Rust\u003c/h1\u003e\n\n[![Rust](https://github.com/minikin/twitter-rs/actions/workflows/rust.yml/badge.svg)](https://github.com/minikin/twitter-rs/actions/workflows/rust.yml)\n\n# Content\n- [Requirements](#requirements)\n- [Development](#development)\n- [API](#api)\n- [Support](#support)\n- [License](#license)\n\n### Requirements\n\n- Rust on the stable channel\n- PostgreSQL\n\n### Development\n\n1. Clone this repository \u0026 open in terminal.\n2. Set `DATABASE_URL` env varibale.\n\n```sh\nexport DATABASE_URL=postgres://user:password@localhost/twitter\n```\n2. Configure database\n\n```sh\ndiesel setup\ndiesel migration run\n```\n\n4. Run program\n\n```sh\ncargo run\n```\n\n5. Call API:\n\n```sh\ncurl -X POST -d '{\"message\": \"Hello world!\"}' -H \"Content-type: application/json\" http://localhost:9090/tweets\n```\n\n## API\n\n- Create (`POST`) a tweet\n\n```sh\ncurl -X POST -d '{\"message\": \"Hello world!\"}' -H \"Content-type: application/json\" http://localhost:9090/tweets\n```\n\nreturns:\n\n```json\n{\n    \"id\": \"584bca73-9d63-4801-bafc-ded7241a159f\",\n    \"created_at\": \"2020-07-04T13:35:48.059039Z\",\n    \"message\": \"Hello world\",\n    \"likes\": []\n}\n```\n\n- `DELETE` a tweet with `id`:\n\n```sh\ncurl -X DELETE http://localhost:9090/tweets/90c76a57-8d6f-46cb-b68a-ef7dc67fdc6e\n```\n\nReturn status code: 204 in any case.\n\n- `GET` all tweets:\n\n```sh\ncurl http://localhost:9090/tweets\n```\n\nreturns list of tweets:\n\n```json\n{\n    \"results\": [{\n        \"id\": \"90c76a57-8d6f-46cb-b68a-ef7dc67fdc6e\",\n        \"created_at\": \"2020-07-04T19:10:47.856376Z\",\n        \"message\": \"Hello world!\",\n        \"likes\": []\n    }, {\n        \"id\": \"584bca73-9d63-4801-bafc-ded7241a159f\",\n        \"created_at\": \"2020-07-04T19:04:01.448201Z\",\n        \"message\": \"Hey world!\",\n        \"likes\": []\n    }]\n}\n```\n\n- `GET` Tweet by `id`:\n\n```sh\ncurl http://localhost:9090/tweets/90c76a57-8d6f-46cb-b68a-ef7dc67fdc6e\n```\n\nif tweet exists returns:\n\n```json\n{\n    \"id\": \"90c76a57-8d6f-46cb-b68a-ef7dc67fdc6e\",\n    \"created_at\": \"2020-07-04T19:10:47.856376Z\",\n    \"message\": \"Hello world!\",\n    \"likes\": [{\n        \"id\": \"08a5f40f-4639-4882-8e0d-84ff84621461\",\n        \"created_at\": \"2020-07-04T19:22:29.095815Z\"\n    }]\n}\n```\n\notherwise it returns status code `204`.\n\n- `GET` list of likes for tweet with `id`:\n\n```sh\ncurl http://localhost:9090/tweets/90c76a57-8d6f-46cb-b68a-ef7dc67fdc6e/likes\n```\n\nreturn list of like for tweet with `id`:\n\n```json\n{\n    \"results\": [{\n        \"id\": \"08a5f40f-4639-4882-8e0d-84ff84621461\",\n        \"created_at\": \"2020-07-04T19:22:29.095815Z\"\n    }]\n}\n```\n\n- ADD (`POST`) one like to a tweet:\n\n```sh\ncurl -X POST http://localhost:9090/tweets/90c76a57-8d6f-46cb-b68a-ef7dc67fdc6e/likes\n```\n\nreturns:\n\n```json\n{\n    \"id\": \"08a5f40f-4639-4882-8e0d-84ff84621461\",\n    \"created_at\": \"2020-07-04T19:22:29.095815Z\"\n}\n```\n\n- `DELETE` one like to a tweet\n\n```sh\ncurl -X DELETE http://localhost:9090/tweets/90c76a57-8d6f-46cb-b68a-ef7dc67fdc6e/likes\n```\n\n## Support\n\nPost issues and feature requests on the GitHub [issue tracker](https://github.com/minikin/twitter-rs/issues).\n\n## License\n\nThe source code of a project is available under the MIT license.\nSee the [LICENSE](https://github.com/minikin/twitter-rs/LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminikin%2Ftwitter-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminikin%2Ftwitter-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminikin%2Ftwitter-rs/lists"}