Skip to content

Commit

Permalink
Fix #74 (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
f3ath authored Jan 2, 2020
1 parent f653c14 commit d97f769
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
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

0 comments on commit d97f769

Please sign in to comment.