{"id":22337226,"url":"https://github.com/dan1229/flutter_api_services","last_synced_at":"2026-03-01T14:35:10.081Z","repository":{"id":37939654,"uuid":"454940885","full_name":"dan1229/flutter_api_services","owner":"dan1229","description":"HTTP services for Flutter/Dart. Includes templates, helper methods, types and more to help interaction with external services of any sort.","archived":false,"fork":false,"pushed_at":"2025-02-03T04:49:21.000Z","size":69,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-02T22:38:20.577Z","etag":null,"topics":["dart","flutter","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dan1229.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2022-02-02T21:26:11.000Z","updated_at":"2025-02-03T04:49:02.000Z","dependencies_parsed_at":"2025-07-02T22:44:47.868Z","dependency_job_id":null,"html_url":"https://github.com/dan1229/flutter_api_services","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/dan1229/flutter_api_services","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan1229%2Fflutter_api_services","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan1229%2Fflutter_api_services/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan1229%2Fflutter_api_services/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan1229%2Fflutter_api_services/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dan1229","download_url":"https://codeload.github.com/dan1229/flutter_api_services/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan1229%2Fflutter_api_services/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29971001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T14:11:48.712Z","status":"ssl_error","status_checked_at":"2026-03-01T14:11:48.352Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["dart","flutter","rest-api"],"created_at":"2024-12-04T06:09:14.410Z","updated_at":"2026-03-01T14:35:10.060Z","avatar_url":"https://github.com/dan1229.png","language":"Dart","readme":"# Flutter API Services\n\n![Dart](https://img.shields.io/badge/dart-%230175C2.svg?style=for-the-badge\u0026logo=dart\u0026logoColor=white)\n![Flutter](https://img.shields.io/badge/Flutter-%2302569B.svg?style=for-the-badge\u0026logo=Flutter\u0026logoColor=white)\n\n![Analyze](https://github.com/dan1229/flutter_api_services/actions/workflows/analyze.yml/badge.svg)\n![Test](https://github.com/dan1229/flutter_api_services/actions/workflows/test.yml/badge.svg)\n[![codecov](https://codecov.io/gh/dan1229/flutter_api_services/branch/main/graph/badge.svg?token=4WK2ND8R75)](https://codecov.io/gh/dan1229/flutter_api_services)\n\n#### By: [Daniel Nazarian](https://danielnazarian) 🐧👹\n\n##### Contact me at \u003cdnaz@danielnazarian.com\u003e\n\n-------------------------------------------------------\n\nHTTP services for Flutter/Dart. Includes templates, helper methods, types and more to help\ninteraction with external services of any sort.\n\nCurrently supporting:\n\n- Django REST\n- Django Graph QL (coming soon)\n\n## Features\n\nSupport common HTTP REST methods, authentication, serialization, error handling and more to increase\nstability and reduce boilerplate. Declare a hardened and efficient API in as little as one simple\ndeclaration.\n\n### Classes Available\n\n- Django Auth Service\n    - Login\n    - Signup\n- Django Create Service\n    - POST\n    - PATCH (coming soon)\n    - DELETE (coming soon)\n- Django Results Service\n    - GET - List\n    - GET - Retrieve\n    - GET - Next/Prev\n- HTTP Client\n- APIResponse\n\n## Getting started\n\nThis package **is not** on pub.dev so to use the package declare it like so in your `pubspec.yaml`\n\n```yaml\nflutter_api_services:\n  git:\n    url: https://github.com/dan1229/flutter_api_services.git\n    ref: main # branch name\n```\n\nThen run `flutter pub get` to download and install it. Then, you're ready to get using!\n\n### Versioning\n\nVersioning for Git packages in Flutter isn't exactly the best - to work around this, each official\nrelease will need to be made into a branch on GitHub, then you can reference that branch. The format\nfor these branches is:\n`version/X.X.X`\n\n## Usage\n\nTo use, simple create your API classes as children of the included templates. To create\na `DjangoResultsService` API for example you might do something like the following:\n\n```dart\nclass PostsApi extends DjangoResultsService\u003cPost\u003e {\n  PostsApi({\n    required Client client,\n  }) : super(client: client,\n      uriApiBase: Uri.parse(\"https://example.com/posts/\"),\n      fromJson: (Map\u003cString, dynamic\u003e json) =\u003e Post.fromJson(json));\n}\n```\n\nNow, instances of `PostsApi` will have access to all the methods and functionality\nof `DjangoResultsService` including `list`, `retrieve`, `next`, `prev`, etc.\n\nTo create a `DjangoCreateService` API for example you might do something like the following:\n\n```dart\nimport 'package:http/http.dart';\n\nclass EmailApi extends DjangoCreateService\u003cEmail\u003e {\n  EmailApi({\n    required Client client,\n  }) : super(client: client,\n      uriApiBase: Uri.parse(\"https://example.com/email/\"),\n      fromJson: (Map\u003cString, dynamic\u003e json) =\u003e Email.fromJson(json));\n\n\n  Future\u003cApiResponse\u003cdynamic\u003e\u003e sendEmail({required String message, String? subject}) {\n    return super.postApi(\n        body: \u003cString, dynamic\u003e{\"subject\": subject, \"message\": message}, authenticated: false);\n  }\n}\n```\n\n## Examples\n\nTODO\n\n- `examples` folder\n    - just show each template\n\n## Tests\n\nTo run tests manually simply run:\n\n```bash\nflutter test\n```\n\nMore simply, to run tests and generate coverage report simply run `./scripts/test_coverage.sh`.\n\n## Deployment\n\nTo deploy/update simply run the GitHub Action for `deploy` - it will prompt you for a version number\nand create a branch with the most recent commit. It will also create an 'official' GitHub release to\ngive another way to find it. sNote, it will use said commits message as the release description.\n\n-------------------------------------------------------\n\n##### [https://danielnazarian.com](https://danielnazarian.com)\n\n##### Copyright 2023 © Daniel Nazarian.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan1229%2Fflutter_api_services","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdan1229%2Fflutter_api_services","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan1229%2Fflutter_api_services/lists"}