Created
November 20, 2011 18:43
-
-
Save bohde/1380679 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| joshbohde@mu:~ $ echo '{"name":"foo"}' | branch: (master) | |
| curl -H 'Content-Type: application/json' -X PUT --data @- "http://localhost:8000/api/v1/artists/1/" | |
| joshbohde@mu:~ $ echo '{"album": {"id": "1", "title": "Physical Graffiti", "artist":"/api/v1/artists/1/"}, "id": "1", "resource_uri": "/playlist/api/v1/tracks/1/", "title": "Custard Pie", "track_number": 1}' | | |
| curl -H 'Content-Type: application/json' -X PUT --data @- "http://localhost:8000/api/v1/tracks/1/" | |
| joshbohde@mu:~ $ curl -H 'Accept: application/json' "http://localhost:8000/api/v1/albums/1/" branch: (master) | |
| {"artist": "/api/v1/artists/1/", "id": "1", "resource_uri": "/api/v1/albums/1/", "title": "Physical Graffiti"} | |
| joshbohde@mu:~ $ echo '{"album": {"id": "1", "title": "OMG Changed Name", "artist":"/api/v1/artists/1/"}, "id": "1", "resource_uri": "/playlist/api/v1/tracks/1/", "title": "Custard Pie", "track_number": 1}' | branch: (master) | |
| curl -H 'Content-Type: application/json' -X PUT --data @- "http://localhost:8000/api/v1/tracks/1/" | |
| joshbohde@mu:~ $ curl -H 'Accept: application/json' "http://localhost:8000/api/v1/albums/1/" branch: (master) | |
| {"artist": "/api/v1/artists/1/", "id": "1", "resource_uri": "/api/v1/albums/1/", "title": "OMG Changed Name"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| joshbohde@mu:~ $ echo '{"name":"foo"}' | branch: (master) | |
| curl -H 'Content-Type: application/json' -X PUT --data @- "http://localhost:8000/api/v1/artists/1/" | |
| joshbohde@mu:~ $ echo '{"album": {"id": "1", "title": "Physical Graffiti", "artist":"/api/v1/artists/1/"}, "id": "1", "resource_uri": "/playlist/api/v1/tracks/1/", "title": "Custard Pie", "track_number": 1}' | | |
| curl -H 'Content-Type: application/json' -X PUT --data @- "http://localhost:8000/api/v1/tracks/1/" | |
| joshbohde@mu:~ $ curl -H 'Accept: application/json' "http://localhost:8000/api/v1/albums/1/" branch: (master) | |
| {"artist": "/api/v1/artists/1/", "id": "1", "resource_uri": "/api/v1/albums/1/", "title": "Physical Graffiti"} | |
| joshbohde@mu:~ $ echo '{"album": {"id": "1", "title": "OMG Changed Name", "artist":"/api/v1/artists/1/"}, "id": "1", "resource_uri": "/playlist/api/v1/tracks/1/", "title": "Custard Pie", "track_number": 1}' | branch: (master) | |
| curl -H 'Content-Type: application/json' -X PUT --data @- "http://localhost:8000/api/v1/tracks/1/" | |
| joshbohde@mu:~ $ curl -H 'Accept: application/json' "http://localhost:8000/api/v1/albums/1/" branch: (master) | |
| {"artist": "/api/v1/artists/1/", "id": "1", "resource_uri": "/api/v1/albums/1/", "title": "OMG Changed Name"} | |
| joshbohde@mu:~ $ echo '{"album": {"id": "1", "title": "Fuzz bizz", "artist":"/api/v1/artists/1/", "resource_uri":"/api/v1/albums/1/"}, "id": "1", "resource_uri": "/playlist/api/v1/tracks/1/", "title": "Custard Pie", "track_number": 1}' | | |
| curl -H 'Content-Type: application/json' -X PUT --data @- "http://localhost:8000/api/v1/tracks/1/" | |
| joshbohde@mu:~ $ curl -H 'Accept: application/json' "http://localhost:8000/api/v1/albums/1/" branch: (master) | |
| {"artist": "/api/v1/artists/1/", "id": "1", "resource_uri": "/api/v1/albums/1/", "title": "Fuzz bizz"}% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment