Skip to content

Commit

Permalink
doc(readme): Fix Resource#related docs
Browse files Browse the repository at this point in the history
Reorder entries and turn `.` into `#`.
  • Loading branch information
passy committed Oct 27, 2014
1 parent 458b600 commit a639ae8
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,16 +363,7 @@ An object containing all embedded resource, created lazily on access.
An object containing all properties on the current resource. This includes all
properties of the resource, except `_links` and `_embedded`.

### Resource.resolveUrl(oldUrl, newUrl)

Combines an old with a new URL:

```javascript
var res = Hyperagent.Resource.resolveUrl('http://example.com/foo', '/bar');
assert.equal(res, 'http://example.com/bar');
```

### Resource.related(rel[, params])
### Resource#related(rel[, params])

Navigates the link identified by the given `rel` regardless of whether
it is in the `_embedded` or `_links` section. If `params` are given
Expand All @@ -394,6 +385,14 @@ var me = api.related('me', { username: 'sindresorhus' });
assert(me.url() === 'http://example.com/users/sindresorhus');
```

### Resource.resolveUrl(oldUrl, newUrl)

Combines an old with a new URL:

```javascript
var res = Hyperagent.Resource.resolveUrl('http://example.com/foo', '/bar');
assert.equal(res, 'http://example.com/bar');
```

## Contributing

Expand Down

0 comments on commit a639ae8

Please sign in to comment.