Commit Graph

12 Commits

Author SHA1 Message Date
Aren Patel 3ea9ec4904 Testing and Documentation for UnmarshalManyPayload (#66)
* Added a test for UnmarshalManyPayload

* Document UnmarshalManyPayload in the Readme

* Update the example app to have a UnmarshalManyPayload usage.

* DRY the UnmarshalManyPayload implementation.

* Add a test for grabbing the Links out of a ManyPayload
2017-01-26 15:25:13 -08:00
Kyle Truscott 46a5b96356 Add support for 'links' via optional interfaces (#57)
* Implement `links` via optional interfaces

* Updating example app to include links

* Update readme with links information

* Exclude a slice relationship only if the slice is empty AND there are no defined links

* Remove `Link` in favor of vanilla `map[string]interface{}`. More flexible for different allowed links spec implementations.

* Update app.go with correct Links methods

* Use LinksObject and LinkObject types along with type assertion to provide errors when marshaling an invalid links JSON API object.

* Renamed LinksObject Links and LinkObject Link

* Added back the relationship link post merge.

* Renamed the JSON* Linkable functions JSONAPI* such that when a library user implements the interface it is clear the functions are used for JSON API as opposed to JSON

* Example cleanup.

* Refactor the example to use constants from jsonapi and http.
2017-01-20 17:55:59 -08:00
Aren Patel dd46e31eb5 Updated: build status badge, the go get installation instruction to account for the repo move, readme examples use ID instead of Id (so that they would be linter compliant if copy/pasted). shwoodard/jsonapi => google/jsonapi (#41) 2016-07-22 18:31:33 -07:00
Luke Young 57819f3b34 Follow Golang naming specifications 2016-07-05 20:32:15 -05:00
Harry Moreno 6c6ec44cd3 fix typo in example script 2016-03-27 14:44:52 -04:00
Sam Woodard a9c87c26ee allow instrumenting serialization and deserialization--event firehose 2015-07-31 16:30:54 -07:00
Sam Woodard 8d3954359b add show handler example 2015-07-19 10:32:07 -07:00
Sam Woodard 4216780137 yay! finally figured out how to accept []interface{} 2015-07-12 11:45:03 -07:00
Sam Woodard 8f7c63b9c4 change interface of MarshalManyPayload to include reflect.Value for models 2015-07-12 11:37:31 -07:00
Sam Woodard c7fa0d5728 reorg, add list blogs impl 2015-07-12 10:46:51 -07:00
Sam Woodard a6c9e05c33 marshal embedded payload now takes io rather than return struct 2015-07-10 17:34:04 -07:00
Sam Woodard ffcbb660c3 readme work and an example app 2015-07-10 13:50:51 -07:00