{"id":44634620,"url":"https://github.com/flutter-news-app-full-source-code/data-api","last_synced_at":"2026-02-14T17:20:00.843Z","repository":{"id":289716880,"uuid":"972177968","full_name":"flutter-news-app-full-source-code/data-api","owner":"flutter-news-app-full-source-code","description":"A concrete implementation of the DataClient abstract class within the Flutter News App Full Source Code Toolkit","archived":false,"fork":false,"pushed_at":"2026-02-03T01:22:36.000Z","size":4046,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-08T08:55:28.031Z","etag":null,"topics":[],"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/flutter-news-app-full-source-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-04-24T16:51:31.000Z","updated_at":"2026-01-01T16:17:51.000Z","dependencies_parsed_at":"2025-05-30T00:24:45.699Z","dependency_job_id":"ececfca9-54b5-435f-b002-4514ad6f0efa","html_url":"https://github.com/flutter-news-app-full-source-code/data-api","commit_stats":null,"previous_names":["headlines-toolkit/ht-crud-api","headlines-toolkit/ht-data-api","flutter-news-app-full-source-code/ht-data-api","flutter-news-app-full-source-code/data-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flutter-news-app-full-source-code/data-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fdata-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fdata-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fdata-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fdata-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flutter-news-app-full-source-code","download_url":"https://codeload.github.com/flutter-news-app-full-source-code/data-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fdata-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29450850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2026-02-14T17:19:58.036Z","updated_at":"2026-02-14T17:20:00.835Z","avatar_url":"https://github.com/flutter-news-app-full-source-code.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://avatars.githubusercontent.com/u/202675624?s=400\u0026u=dc72a2b53e8158956a3b672f8e52e39394b6b610\u0026v=4\" alt=\"Flutter News App Toolkit Logo\" width=\"220\"\u003e\n  \u003ch1\u003eData API\u003c/h1\u003e\n  \u003cp\u003e\u003cstrong\u003eA concrete implementation of the `DataClient\u003cT\u003e` abstract class for interacting with data resource endpoints via HTTP.\u003c/strong\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/coverage-94%25-green?style=for-the-badge\" alt=\"coverage\"\u003e\n  \u003ca href=\"https://flutter-news-app-full-source-code.github.io/docs/\"\u003e\u003cimg src=\"https://img.shields.io/badge/LIVE_DOCS-VIEW-slategray?style=for-the-badge\" alt=\"Live Docs: View\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/flutter-news-app-full-source-code\"\u003e\u003cimg src=\"https://img.shields.io/badge/MAIN_PROJECT-BROWSE-purple?style=for-the-badge\" alt=\"Main Project: Browse\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThis `data_api` package serves as a concrete implementation of the `DataClient\u003cT\u003e` abstract class within the [**Flutter News App Full Source Code Toolkit**](https://github.com/flutter-news-app-full-source-code). It provides a robust and generic way to interact with RESTful data resource endpoints via HTTP, leveraging the `http_client` package for underlying communication and standardized error handling. This package ensures consistent data access across the Flutter mobile app, web dashboard, and Dart Frog backend API.\n\n## ⭐ Feature Showcase: Seamless Data Endpoint Interaction\n\nThis package offers a comprehensive set of features for interacting with API data resources.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🧱 Core Functionality\u003c/strong\u003e\u003c/summary\u003e\n\n### 🚀 Generic `DataClient` Implementation\n- **`DataApi\u003cT\u003e` Class:** A concrete implementation of the `DataClient\u003cT\u003e` abstract class, enabling type-safe interactions with various data models.\n- **Unified API Endpoint Interaction:** Configurable with a `modelName` (identifying the resource in the API) and `fromJson`/`toJson` functions for seamless serialization and deserialization of specific model types `T`.\n\n### 🌐 Comprehensive Data Operations\n- **CRUD Operations:** Implements `create`, `read`, `update` methods returning `Future\u003cSuccessApiResponse\u003cT\u003e\u003e`, and `delete` returning `Future\u003cvoid\u003e`.\n- **Advanced Querying:** Provides a unified `readAll` method returning `Future\u003cSuccessApiResponse\u003cPaginatedResponse\u003cT\u003e\u003e\u003e`, supporting rich, document-style filtering (`filter`), multi-field sorting (`sort`), and cursor-based pagination (`pagination`).\n- **Counting and Aggregation:** Includes `count` for efficient document counting and `aggregate` for executing complex data aggregation pipelines directly on the data source.\n\n### 🛡️ Integrated Error Handling\n- **`HttpException` Propagation:** Propagates standardized `HttpException` errors (e.g., `NetworkException`, `BadRequestException`, `NotFoundException`) from the underlying `http_client` package, ensuring consistent and predictable error management.\n\n### 💉 Dependency Injection Ready\n- **`HttpClient` Dependency:** Requires an instance of `HttpClient` (from the `http_client` package) via its constructor, promoting loose coupling and testability.\n\n\u003e **💡 Your Advantage:** You get a meticulously designed, production-quality data API client that simplifies interactions with your backend, ensures type safety, provides robust error handling, and supports advanced querying capabilities. This package accelerates development by providing a solid foundation for data access.\n\n\u003c/details\u003e\n\n## 🔑 Licensing\n\nThis source code is licensed for commercial use and is provided for local evaluation. A **Lifetime Commercial License** is required for any production or public-facing application.\n\nPlease visit the main [Flutter News App Full Source Code Toolkit](https://github.com/flutter-news-app-full-source-code) organization page to review the full license terms and to purchase.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutter-news-app-full-source-code%2Fdata-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflutter-news-app-full-source-code%2Fdata-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutter-news-app-full-source-code%2Fdata-api/lists"}