Skip to content

Commit 694a059

Browse files
author
pemrouz
committed
docs: update readme
1 parent 62acefe commit 694a059

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![Coverage Status](https://coveralls.io/repos/rijs/hypermedia/badge.svg?branch=master&service=github)](https://coveralls.io/github/rijs/hypermedia?branch=master)
33
[![Build Status](https://travis-ci.org/rijs/hypermedia.svg)](https://travis-ci.org/rijs/hypermedia)
44

5-
Enhances Ripple to be able to register subresources, traverse links in responses and cache them.
5+
Extends [core](https://github.com/rijs/core#ripple--core) to register a HATEOAS API as a resource, traverse links to other resources, and cache them.
66

77
Normally, you can register some array/object/function/whatever against a key:
88

@@ -27,13 +27,13 @@ ripple('github.current_user_url.repos_url.0.owner.login')
2727

2828
If it hits a property whose value is a URL (in the GitHub API, all those suffixed with `*_url`), it resolves and caches them as an intermediate resource. So accessing `ripple('github.current_user_url.id')`, would also populate the resource `ripple('github.current_user_url')`.
2929

30-
You can pass any extra headers you want (in this case, basic auth) to be used in the request by setting the `http` header.
30+
You can pass any extra headers you want (in this case, basic auth) to be used in the request by setting the `http` header (accessing subresource will automatically inherit headers).
3131

3232
```js
3333
ripple('github', 'https://api.github.com', { http })
3434
```
3535

36-
You expand parameterised routes and also alias resources:
36+
You can expand parameterised routes and also alias resources:
3737

3838
```js
3939
ripple('repo', { owner: 'pemrouz', repo: 'ripple' }, { link: 'github.repository_url' })
@@ -50,4 +50,4 @@ ripple('issue', { owner: 'pemrouz', repo: 'ripple', number: 1 }, { link: 'github
5050
* [ ] Add profiles for dot notation to be able to traverse other hypermedia formats (HTML, HAL, Siren, Collection, etc) - see [Jon Moore's presentation](http://www.infoq.com/presentations/web-api-html) for HTML example.
5151
* [ ] Test use in declarative usage `<visualise-repos data="github.repos">`
5252
* [ ] Alias subresources `ripple('repos', 'github.current_user_url.repos_url')`
53-
* [ ] Use same syntax to `POST` messages back: `ripple('github.current_user_url.repos_url', { new repo details })`
53+
* [ ] Use same syntax to `POST` messages back: `ripple('github.current_user_url.repos_url', { body: new repo details })`

0 commit comments

Comments
 (0)