Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel committed Feb 2, 2014
1 parent 2c7369f commit 99f5505
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@ A client side adapter that converts resource representations from [Siren JSON](h

## Basic Use

To use Backbone.Siren:

```
bbSirenModel = new Backbone.Siren.Model(sirenObject);
// or
bbSirenCollection = new Backbone.Siren.Collection(sirenObject);
```

Or, you can just point Backbone.Siren to a url that returns a Siren resource and let it do the rest:

```
Backbone.Siren.resolve('http://my.api.io/user/123');
```

If you're building an app that uses a Siren API on the backend:

```
Expand All @@ -34,6 +20,20 @@ userModel = sirenApi.resolve(['user/123', 'basket/111']).done(function (userMode
```

Or, you can just point Backbone.Siren to a url that returns a Siren resource and let it do the rest:

```
Backbone.Siren.resolve('http://my.api.io/user/123');
```

You can also just manually parse a Siren Model or Collection into a Backbone object:

```
bbSirenModel = new Backbone.Siren.Model(sirenObject);
// or
bbSirenCollection = new Backbone.Siren.Collection(sirenObject);
```

## Example

```
Expand Down Expand Up @@ -214,4 +214,4 @@ Changes should follow existing patterns and pass jshint.
* Improved test coverage
* Other [bug fixes](https://github.com/kiva/backbone.siren/issues?milestone=1&page=1&state=closed)

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/kiva/backbone.siren/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/kiva/backbone.siren/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

0 comments on commit 99f5505

Please sign in to comment.