{"id":18098558,"url":"https://github.com/makiftutuncu/trump","last_synced_at":"2026-05-17T17:03:58.577Z","repository":{"id":111314001,"uuid":"187991549","full_name":"makiftutuncu/trump","owner":"makiftutuncu","description":"Simple REST API to shout out tweets","archived":false,"fork":false,"pushed_at":"2023-12-15T20:31:56.000Z","size":93,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-11T07:12:04.180Z","etag":null,"topics":["akka-http","redis","scala","tweets","twitter-api"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/makiftutuncu.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":"2019-05-22T08:01:19.000Z","updated_at":"2019-11-18T18:11:08.000Z","dependencies_parsed_at":"2024-10-31T20:11:52.398Z","dependency_job_id":null,"html_url":"https://github.com/makiftutuncu/trump","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/makiftutuncu/trump","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiftutuncu%2Ftrump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiftutuncu%2Ftrump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiftutuncu%2Ftrump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiftutuncu%2Ftrump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makiftutuncu","download_url":"https://codeload.github.com/makiftutuncu/trump/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiftutuncu%2Ftrump/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273651121,"owners_count":25143966,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["akka-http","redis","scala","tweets","twitter-api"],"created_at":"2024-10-31T20:11:47.359Z","updated_at":"2026-05-17T17:03:53.534Z","avatar_url":"https://github.com/makiftutuncu.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trump\n\n## Table of Contents\n\n1. [Introduction](#introduction)\n2. [Configuration](#configuration)\n3. [Development and Running](#development-and-running)\n4. [Testing](#testing)\n5. [API](#api)\n6. [Notes](#notes)\n\n## Introduction\n\nTrump is an API written in Scala with Akka Http and backed by Redis cache. It is for \"shouting out\" recent tweets from a Twitter account.\n\n## Configuration\n\nTrump can be configured via [application.conf](src/main/resources/application.conf) and [test.conf](src/test/resources/test.conf) files for running and testing respectively. You can also override config values with following environment variables.\n\n| Variable Name            | Data Type | Description                                       | Required                    |\n| ------------------------ | --------- | ------------------------------------------------- | --------------------------- |\n| PORT                     | Int       | Running port of Trump                             | No, defaults to `9000`      |\n| REDIS_ENABLED            | Boolean   | Switch to enable Redis                            | No, defaults to `true`      |\n| REDIS_HOST               | String    | Host of Redis                                     | No, defaults to `localhost` |\n| REDIS_PORT               | Int       | Port of Redis                                     | No, defaults to `6379`      |\n| REDIS_TTL                | Int       | Default time-to-live in seconds for Redis entries | No, defaults to `300`       |\n| TWITTER_ACCESS_TOKEN_TTL | Int       | Time-to-live for Twitter access key in seconds    | No, defaults to `3600`      |\n| TWITTER_API_KEY          | String    | API key for Twitter APIs                          | Yes, unless mock is enabled |\n| TWITTER_API_SECRET       | String    | API secret for Twitter APIs                       | Yes, unless mock is enabled |\n| TWITTER_MOCK             | Boolean   | Switch to mock Twitter APIs                       | No, defaults to `false`     |\n\nAPI key and secret values can also be provided by creating a [secret.conf](src/main/resources/secret.conf) which is gitignored by default.\n\n## Development and Running\n\nTrump is built with SBT. So, standard SBT tasks like `clean`, `compile` and `run` can be used.\n\nIn order to get the Redis set up, you may simply use `docker-compose` by doing\n\n```docker-compose up -d```\n\nThis will fire up a Redis cache for running the application.\n\n## Testing\n\nTo run all the tests, use `test` task of SBT.\n\nTo run specific test(s), use `testOnly fullyQualifiedTestClassName1 fullyQualifiedTestClassName2 ...`\n\n## API\n\nHere is an overview of the APIs:\n\n| Method | URL                             | Link                                 |\n| ------ | ------------------------------- | ------------------------------------ |\n| GET    | /shout/`username`?limit=`limit` | [Jump](#get-shoutusernamelimitlimit) |\n\nAll handled errors return an error Json in following format:\n\n```json\n{\n  \"error\": \"some-error-type\",\n  \"details\": \"A human readable description of the error\"\n}\n```\n\nwith a corresponding HTTP status code depending on the error.\n\nAll successful responses will have `200 OK` status unless explicitly mentioned.\n\n---\n\n### GET /shout/`username`?limit=`limit`\n\nReturns a list of shouted tweets of user `username` as a Json array limited to `limit` items\n\n#### Example Successful Response\n\n```json\n[\n  \"COOKIE 😻 #KEDI #CAT HTTPS://T.CO/BOZULKJEK6 HTTPS://T.CO/OM817MBLED!\",\n  \"@SELCUKERMAYA EN AZINDAN ZSH KULLANIYOR. ÇOK DA ŞEY YAPMAMAK LAZIM. 😄!\",\n  \"@THUSEYINSAHIN DÜN YAŞADIM BEN DE. HALA ÇOK IYI DEĞILIM. GEÇMIŞ OLSUN!\",\n  \"I'M AT ETIKET KEBAP IN OSMANGAZI, BURSA HTTPS://T.CO/02067VPNK1!\",\n  \"THE BIG BANG THEORY FINALI ÇOK GÜZEL OLMUŞ. DARISI GAME OF THRONES'UN BAŞINA!\"\n]\n```\n\n#### Possible Errors\n\n| What               | When                                   |\n| ------------------ | -------------------------------------- |\n| Invalid Limit      | Limit is not between configured values |\n| Twitter Connection | An error occurs with Twitter APIs      |\n\n## Notes\n\n* It only works with public accounts. If an account is locked, the result will be empty.\n* Capitalizing does not handle all types of tweets well, especially tweets with links and emojis.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakiftutuncu%2Ftrump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakiftutuncu%2Ftrump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakiftutuncu%2Ftrump/lists"}