Skip to content

Commit 3223ef7

Browse files
committed
Updated README.md and CHANGELOG.md
1 parent 06877d2 commit 3223ef7

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ This project adheres to [Semantic Versioning](http://semver.org/).
55

66
## [Unreleased][]
77

8+
### Added
9+
10+
- Documentation (see docs/ folder)
11+
- Every object has got a `get()` and `has()` method for better value access
12+
- Every object can list his own keys with `keyKeys()`
13+
14+
### Removed
15+
16+
- All old getter like `getMeta()` or `hasId()` were removed
17+
818
## 0.1 - 2015-08-11
919

1020
### Added

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Software License][ico-license]](LICENSE)
55
[![Build Status][ico-travis]][link-travis]
66

7-
JSON API Client is a PHP Library to handle the response body from a [JSON API](http://jsonapi.org) Server.
7+
JSON API Client is a PHP Library to validate and handle the response body from a [JSON API](http://jsonapi.org) Server.
88

99
Format: [JSON API](http://jsonapi.org/format) 1.0
1010

@@ -28,12 +28,17 @@ $jsonapi_string = '{"meta":{"info":"Testing the JSON API Client."}}';
2828

2929
$document = \Art4\JsonApiClient\Utils\Helper::parse($jsonapi_string);
3030

31-
if ($document->hasMeta() and $document->getMeta()->hasInfo())
31+
if ($document->has('meta') and $document->get('meta')->has('info'))
3232
{
33-
echo $document->getMeta()->getInfo();
33+
echo $document->get('meta')->get('info'); // "Testing the JSON API Client."
3434
}
3535

36-
// "Testing the JSON API Client."
36+
// List all keys
37+
var_dump($document->getKeys());
38+
39+
// array(
40+
// 0 => "meta"
41+
// )
3742
```
3843

3944
### Using as validator

0 commit comments

Comments
 (0)