Skip to content

Commit 3b220f7

Browse files
author
Josh Holtz
committed
Update README.md
1 parent ade1c82 commit 3b220f7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66

77
A library for loading data from a [JSON API](http://jsonapi.org) datasource. Parses JSON API data into models with support for linking of properties and other resources.
88

9+
### Quick Usage
10+
```objc
11+
NSDictionary *json = [self responseFromAPIRequest];
12+
JSONAPI *jsonAPI = [JSONAPI jsonAPIWithDictionary:json];
13+
14+
ArticleResource *article = jsonAPI.resource;
15+
NSLog(@"Title: %@", article.title);
16+
```
17+
18+
For some full examples on how to use everything, please see the tests - https://github.com/joshdholtz/jsonapi-ios/blob/master/Project/JSONAPITests/JSONAPITests.m
19+
920
### Updates
1021
1122
Version | Changes
@@ -38,6 +49,7 @@ it simply add the following line to your Podfile:
3849
pod 'JSONAPI', '~> 1.0.0'
3950
4051
## Usage
52+
For some full examples on how to use everything, please see the tests - https://github.com/joshdholtz/jsonapi-ios/blob/master/Project/JSONAPITests/JSONAPITests.m
4153
4254
### JSONAPI
4355
`JSONAPI` parses and validates a JSON API document into a usable object. This object holds the response as an NSDictionary but provides methods to accomdate the JSON API format such as `meta`, `errors`, `linked`, `resources`, and `includedResources`.

0 commit comments

Comments
 (0)