Spotify Web API v0.4.0 Spotify.ObjectModel behaviour View Source

A behavior for implementing the as/0 callback for Spotify object models that are returned from the web api.

Link to this section Summary

Callbacks

Returns each Object Models’ model for json decoding

Link to this section Callbacks

Returns each Object Models’ model for json decoding.

This callback is passed into Poison.decode :as option for formatting incoming json as structs. Each Object Model should implement it, and nest other Object Models’ as functions in their own as needed.