{"id":21204722,"url":"https://github.com/linx64/truecaller","last_synced_at":"2025-03-14T22:47:00.710Z","repository":{"id":168323101,"uuid":"534734783","full_name":"LinX64/TrueCaller","owner":"LinX64","description":"Find 10th char, repeated words and etc","archived":false,"fork":false,"pushed_at":"2022-09-29T14:48:56.000Z","size":146,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T15:23:18.439Z","etag":null,"topics":["kotlin","kotlin-android","mvvm-architecture","sealed-class"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/LinX64.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":"2022-09-09T17:08:35.000Z","updated_at":"2022-09-24T11:46:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"36203a74-9ff1-4e95-a7f0-fee13b68ac11","html_url":"https://github.com/LinX64/TrueCaller","commit_stats":null,"previous_names":["linx64/truecaller"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinX64%2FTrueCaller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinX64%2FTrueCaller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinX64%2FTrueCaller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinX64%2FTrueCaller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinX64","download_url":"https://codeload.github.com/LinX64/TrueCaller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243658186,"owners_count":20326465,"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","kotlin-android","mvvm-architecture","sealed-class"],"created_at":"2024-11-20T20:39:06.467Z","updated_at":"2025-03-14T22:47:00.681Z","avatar_url":"https://github.com/LinX64.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Task - Making three requests simultaneously \n\n## Teck stack and Technologies\n\n- MVVM\n- LiveData\n- Retrofit\n- Mockito\n- JUnit\n- Hilt-dagger\n- Enum class\n- Sealed class\n\n# Preview\n\n\u003cimg src=\"https://i.imgur.com/xwdRtNc.gif \" width=\"200\" /\u003e\n\n# Solution\n\nI used `Async()` along with `await()` to get the data from the API with three different requests simultaneously as requested. Data is being handled by the Repository. Logic is being handled by the ViewModel.\n\n1. In The first question; I used a function for splitting the split the `\u003cbody` tag, and then\nchecked the end of the tag by [0]. After that, I used [10] to get the first 10 characters of the\nstring.\n\n2. In The second question; I used a function for splitting the `\u003cbody` tag, just like the previous method,\nand using a loop to start from 10 until the end of the body length and added 10 steps to go by 10\nsteps. At the end, I used `append()` to add the string to the `StringBuilder`.\n\n3. For The third question; I used the same function for splitting the `\u003cbody` tag, and also used regex (`\\\\s+`) to\nsplit the string by the space, and then used a loop to check the string if it contains the word and\nthen added it to the list.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinx64%2Ftruecaller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinx64%2Ftruecaller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinx64%2Ftruecaller/lists"}