Skip to content

Fix #74 #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.2.1] - 2020-01-01
### Fixed
- issue [#74](https://github.com/f3ath/json-api-dart/issues/74)

## [3.2.0] - 2019-12-30
### Added
- `matchBase` option to `PathBasedUrlDesign`.
Expand Down Expand Up @@ -138,7 +142,8 @@ Most of the changes are **BC-BREAKING**.
### Added
- Client: fetch resources, collections, related resources and relationships

[Unreleased]: https://github.com/f3ath/json-api-dart/compare/3.2.0...HEAD
[Unreleased]: https://github.com/f3ath/json-api-dart/compare/3.2.1...HEAD
[3.2.0]: https://github.com/f3ath/json-api-dart/compare/3.2.0...3.2.1
[3.2.0]: https://github.com/f3ath/json-api-dart/compare/3.1.0...3.2.0
[3.1.0]: https://github.com/f3ath/json-api-dart/compare/3.0.0...3.1.0
[3.0.0]: https://github.com/f3ath/json-api-dart/compare/2.1.0...3.0.0
Expand Down
4 changes: 2 additions & 2 deletions example/fetch_collection.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import 'package:http/http.dart';
import 'package:json_api/client.dart';

/// Start the `cars_server.dart` first!
/// Start `dart example/cars_server.dart` first
void main() async {
final httpClient = Client();
final jsonApiClient = JsonApiClient(httpClient);
final url = Uri.parse('http://localhost:8080/companies/2');
final url = Uri.parse('http://localhost:8080/companies');
final response = await jsonApiClient.fetchCollection(url);
httpClient.close(); // Don't forget to close the http client
print('The collection page size is ${response.data.collection.length}');
Expand Down
3 changes: 2 additions & 1 deletion lib/src/client/json_api_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ import 'package:json_api/src/client/status_code.dart';
/// import 'package:http/http.dart';
/// import 'package:json_api/client.dart';
///
/// /// Start `dart example/cars_server.dart` first!
/// void main() async {
/// final httpClient = Client();
/// final jsonApiClient = JsonApiClient(httpClient);
/// final url = Uri.parse('http://localhost:8080/companies/2');
/// final url = Uri.parse('http://localhost:8080/companies');
/// final response = await jsonApiClient.fetchCollection(url);
/// httpClient.close(); // Don't forget to close the http client
/// print('The collection page size is ${response.data.collection.length}');
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: json_api
version: 3.2.0
version: 3.2.1
homepage: https://github.com/f3ath/json-api-dart
description: JSON:API Client for Flutter, Web and VM. Supports JSON:API v1.0 (http://jsonapi.org)
environment:
Expand Down