{"id":16864974,"url":"https://github.com/nathanfallet/apirequest","last_synced_at":"2025-11-11T14:30:20.893Z","repository":{"id":51412090,"uuid":"261977732","full_name":"nathanfallet/apirequest","owner":"nathanfallet","description":"A swift package/android library to interact with a REST API.","archived":false,"fork":false,"pushed_at":"2023-01-23T19:03:13.000Z","size":188,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T22:09:23.558Z","etag":null,"topics":["android","api","http","http-client","kotlin","spm","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nathanfallet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["NathanFallet"]}},"created_at":"2020-05-07T07:16:02.000Z","updated_at":"2024-11-03T09:52:30.000Z","dependencies_parsed_at":"2023-02-13T02:15:31.599Z","dependency_job_id":null,"html_url":"https://github.com/nathanfallet/apirequest","commit_stats":null,"previous_names":["GroupeMINASTE/APIRequest.swift","groupeminaste/apirequest.swift"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanfallet%2Fapirequest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanfallet%2Fapirequest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanfallet%2Fapirequest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanfallet%2Fapirequest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nathanfallet","download_url":"https://codeload.github.com/nathanfallet/apirequest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239593060,"owners_count":19664855,"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":["android","api","http","http-client","kotlin","spm","swift"],"created_at":"2024-10-13T14:44:44.652Z","updated_at":"2025-11-11T14:30:20.845Z","avatar_url":"https://github.com/nathanfallet.png","language":"Swift","funding_links":["https://github.com/sponsors/NathanFallet","https://paypal.me/paynathanfallet"],"categories":[],"sub_categories":[],"readme":"# APIRequest\n\n[![License](https://img.shields.io/github/license/NathanFallet/APIRequest)](LICENSE)\n[![Issues](https://img.shields.io/github/issues/NathanFallet/APIRequest)]()\n[![Pull Requests](https://img.shields.io/github/issues-pr/NathanFallet/APIRequest)]()\n[![Code Size](https://img.shields.io/github/languages/code-size/NathanFallet/APIRequest)]()\n[![CodeFactor](https://www.codefactor.io/repository/github/NathanFallet/APIRequest/badge)](https://www.codefactor.io/repository/github/NathanFallet/APIRequest)\n[![Open Source Helpers](https://www.codetriage.com/nathanfallet/apirequest/badges/users.svg)](https://www.codetriage.com/nathanfallet/apirequest)\n\nA swift package/android library to interact with a REST API.\n\n## Installation\n\n### iOS\n\nAdd `https://github.com/NathanFallet/APIRequest.git` to your Swift Package configuration (or using the Xcode menu: `File` \u003e `Swift Packages` \u003e `Add Package Dependency`)\n\n### Android\n\nAdd the following to your `build.gradle` file:\n\n```groovy\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation 'me.nathanfallet.apirequest:apirequest:1.0.4'\n}\n```\n\n## Usage\n\n### iOS\n\n```swift\n// Import the package\nimport APIRequest\n\n// When your app starts, set the default configuration\nAPIConfiguration.current = APIConfiguration(host: \"api.example.com\")\n\n// And then call your API\n// This is an equivalent to get `https://api.example.com/path/to/api?custom=parameter` and parse the response from JSON to a dictionary [String: String]\nAPIRequest(\"GET\", path: \"/path/to/api\").with(name: \"custom\", value: \"parameter\").execute([String: String].self) { data, status in\n    // Check the data and status\n    if let data = data, status == .ok {\n        // Do what you want with your data\n        \n    } else {\n        // Something went wrong, check the value of `status`\n        \n    }\n}\n```\n\nSee the [full documentation](DOCUMENTATION_IOS.md) for a complete guide.\n\n### Android\n\n```kotlin\n// When your app starts, set the default configuration\nAPIConfiguration.current = APIConfiguration(\"api.example.com\")\n\n// And then call your API\n// This is an equivalent to get `https://api.example.com/path/to/api?custom=parameter` and parse the response from JSON\nAPIRequest(\"GET\", \"/path/to/api\")\n    .with(\"custom\", \"parameter\")\n    .execute { result, status -\u003e\n        \n    }\n```\n\nSee the [full documentation](DOCUMENTATION_ANDROID.md) for a complete guide.\n\n## Examples\n\n### Full example project\n\nCheck out the [full example project](https://github.com/NathanFallet/APIRequestExample) made in a [youtube tutorial](https://youtu.be/HBbrZJ0f5gg).\n\n## Donate to the developer\n\nFeel free to make a donation to help the developer to make more great content! [Donate now](https://paypal.me/paynathanfallet)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanfallet%2Fapirequest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathanfallet%2Fapirequest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanfallet%2Fapirequest/lists"}