{"id":15014402,"url":"https://github.com/sayechu/laravel-twitch-api","last_synced_at":"2026-02-10T08:32:05.696Z","repository":{"id":245921622,"uuid":"777313452","full_name":"sayechu/laravel-twitch-api","owner":"sayechu","description":"PHP Twitch API using Laravel + unitary \u0026 integration tests","archived":false,"fork":false,"pushed_at":"2024-06-24T19:24:39.000Z","size":480,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-31T13:38:13.040Z","etag":null,"topics":["api","cleancode","database","feature-testing","hexagonal-architecture","laravel","php","phpunit","postgresql","testing","twitch","unitary-test"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/sayechu.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":"2024-03-25T16:04:57.000Z","updated_at":"2024-06-24T19:24:41.000Z","dependencies_parsed_at":"2024-06-24T21:01:58.939Z","dependency_job_id":"4b9c05f0-e42d-44f5-bdbb-ee5c0b9d6d54","html_url":"https://github.com/sayechu/laravel-twitch-api","commit_stats":null,"previous_names":["sayechu/twitch-api-laravel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sayechu/laravel-twitch-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayechu%2Flaravel-twitch-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayechu%2Flaravel-twitch-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayechu%2Flaravel-twitch-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayechu%2Flaravel-twitch-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sayechu","download_url":"https://codeload.github.com/sayechu/laravel-twitch-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayechu%2Flaravel-twitch-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29294598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T03:42:42.660Z","status":"ssl_error","status_checked_at":"2026-02-10T03:42:41.897Z","response_time":65,"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":["api","cleancode","database","feature-testing","hexagonal-architecture","laravel","php","phpunit","postgresql","testing","twitch","unitary-test"],"created_at":"2024-09-24T19:45:35.209Z","updated_at":"2026-02-10T08:32:05.682Z","avatar_url":"https://github.com/sayechu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://laravel.com\" target=\"_blank\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg\" width=\"400\" alt=\"Laravel Logo\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n## \u003cp style=\"text-align: center;\"\u003eTwitch API\u003c/p\u003e\n\nThis project is a **Twitch API** developed in `PHP` using the `Laravel` framework and `Docker` for containerization. It adheres to Clean Code principles, includes comprehensive testing, and incorporates regular code refactoring to maintain high code quality. The API provides the following endpoints: \n\n\u003e ### **/streamers:id** (`GET`): Retrieves data for a given Twitch streamer by id.\n\u003e\u003e```bash \n\u003e\u003e  curl -X GET 'http://localhost/analytics/streamers?id=459331509'\n\u003e\u003e```\n\u003e ### **/streams** (`GET`): Obtains live Twitch streams.\n\u003e\u003e```bash \n\u003e\u003e  curl -X GET 'http://localhost/analytics/streams'\n\u003e\u003e```\n\u003e ### **/topsofthetops:since** (`GET`): Retrieves data for the top 40 videos of each of the top three most popular games, with an optional integer parameter `since` to filter results based on time (seconds).\n\u003e\u003e```bash \n\u003e\u003e  curl -X GET 'http://localhost/analytics/topsofthetops'\n\u003e\u003e```\n\u003e\u003e```bash \n\u003e\u003e  curl -X GET 'http://localhost/analytics/topsofthetops?since=150'\n\u003e\u003e```\n\u003e ### **/timeline:username** (`GET`): Retrieves the list of recent streams from followed streamers.\n\u003e\u003e```bash \n\u003e\u003e  curl -X GET 'http://localhost/analytics/timeline?username=user_name'\n\u003e\u003e```\n\u003e ### **/follow** (`POST`): Allows registered users to follow a streamer.\n\u003e\u003e```bash \n\u003e\u003e  curl -X POST 'http://localhost/analytics/follow' \\\n\u003e\u003e  -H \"Content-Type: application/json\" \\\n\u003e\u003e  -d '{\"username\": \"user_name\", \"streamerId\": \"streamer_id\"}'\n\u003e\u003e```\n\u003e ### **/unfollow** (`DELETE`): Allows registered users to unfollow a streamer.\n\u003e\u003e```bash \n\u003e\u003e  curl -X DELETE 'http://localhost/analytics/unfollow' \\\n\u003e\u003e  -H \"Content-Type: application/json\" \\\n\u003e\u003e  -d '{\"username\": \"user_name\", \"streamerId\": \"streamer_id\"}'\n\u003e\u003e```\n\u003e ### **/users** (`POST`): Creates a new user with a specified username.\n\u003e\u003e```bash \n\u003e\u003e  curl -X POST 'http://localhost/analytics/users' \\\n\u003e\u003e  -H \"Content-Type: application/json\" \\\n\u003e\u003e  -d '{\"username\": \"user_name\", \"password\": \"password\"}'\n\u003e\u003e```\n\u003e ### **/users** (`GET`): Retrieves a list of all registered users, including the streamers each user follows.\n\u003e\u003e```bash \n\u003e\u003e  curl -X GET 'http://localhost/analytics/users'\n\u003e\u003e```\n---\n### How to run the project?\n#### 1. Clone Repository:\n```bash\n  git clone git@github.com:sayechu/laravel-twitch-api.git\n```\n#### 2. Move to directory and composer install:\n```bash\n  cd laravel-twitch-api\n  composer install\n```\n#### 3. Copy environment variables file:\n```bash\n  cp .env.example .env\n```\n#### 4. Run sail\nNote I: `alias sail='sh $([ -f sail ] \u0026\u0026 echo sail || echo vendor/bin/sail)'` \\\nNote II: run Docker Desktop before executing this command\n```bash\n  sail up -d\n```\n#### 5. Run migrations\n\n```bash\n  sail php artisan migrate\n```\n---\n- To **stop the running containers**, execute:\n```bash \n  sail down\n```\n- To run the **unitary and integrations tests**:\n```bash\n  ./vendor/bin/phpunit\n```\n- To rollback the migrations:\n```bash\n  sail php artisan migrate:rollback\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayechu%2Flaravel-twitch-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsayechu%2Flaravel-twitch-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayechu%2Flaravel-twitch-api/lists"}