Skip to content

Commit

Permalink
Fixed some spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Jul 15, 2015
1 parent 74a9f95 commit 939c195
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

[JSON API](http://jsonapi.org/) specification reached 1.0 in 29th May 2015 and we believe it is a big day for RESTful
API-s as this specification makes APIs more robust and future-proof than they have ever been. Woohoo Labs. Yin (named
after Yin-Yang) was born to bring efficiency and elegance into you JSON API definitions.
after Yin-Yang) was born to bring efficiency and elegance for your JSON API definitions.

#### Features

Expand Down Expand Up @@ -56,16 +56,15 @@ now) which you have to extend:
And there is an ``AbstractResourceTransformer`` class for resource transformation.

Have a look at the [examples](https://github.com/woohoolabs/yin/tree/master/examples) if you want to get to know more
how Yin works: the controllers contain the resources which will be transformed according to the JSON API spec.

Visit ``index.php?example={{ EXAMPLE_NAME }}``, where ``EXAMPLE_NAME`` can be "book" or "users". But don't forget first
to run ``composer install`` in Yin's root directory. You can also restrict which fields and attributes should be
fetched. Let's see two example URIs:
how Yin works: controllers contain the resources which will be transformed according to the JSON API spec. Set up a
web server and visit ``examples/index.php?example={{ EXAMPLE_NAME }}``, where ``EXAMPLE_NAME`` can be "book" or "users".
But don't forget first to run ``composer install`` in Yin's root directory. You can also restrict which fields and
attributes should be fetched. Let's see two example URIs:

- ``index.php?example=book&fields[book]=title,authors,publisher&fields[author]=name&fields[publisher]=name&include=authors,publisher``
- ``index.php?example=users&fields[user]=firstname,lastname,contacts&fields[contact]=phone_number,email&include=contacts``

Notice how transformation of resource attributes and relationships works (e.g. in
Notice how transformation of resource attributes and relationships works (e.g.:
[`BookResourceTransformer`](https://github.com/woohoolabs/yin/blob/master/examples/JsonApi/Resource/BookResourceTransformer.php#L75)):
you have to define anonymous functions for each attribute and relationship. This design allows us
to transform an attribute or a relationship only and if only it is requested. This is extremely advantageous when there
Expand Down

0 comments on commit 939c195

Please sign in to comment.