Changes to API
And here's an example of usage: https://github.com/stefanoverna/spike-datocms-example/blob/master/app.js
The main changes:
- Remove the API parsing logic from spike-datocms, reuse the datocms-client ItemsRepo for that. This means that in the views you can access to every content stored in the DatoCMS backend as described in the documentation (https://docs.datocms.com/other/accessing-records.html and later chapters).
- Change the way you declare single pages in app.js: https://github.com/stefanoverna/spike-datocms-example/blob/master/app.js#L29-L33
- Introduce a
dato-meta-tagsdirective that you can use in your views to populate the of your page (a similar thing should be made to generate favicon meta tags)
@jescalan if you like the overall direction of the proposed changes, I can finalize things and write tests. Let me know if I can start :)
@stefanoverna Yeah, I would say don't worry about the meta tags helper, I can take that section, but as far as the primary piece with using the client, I think this is good to start testing!
Interesting with the websockets though, this is really cool. I can also hook this up to the watcher, don't worry about that part.
Hi @jescalan, we're receiving requests regarding this PR on our support chat.. looking forward to close it! 😃 I'm not very familiar with the internals of spike so I would really need some help of yours :)

So, this is massively breaking and still has no tests at all, so I can't really merge it yet, it still needs a bunch of work. Also, what's being asked there can already be accomplished with the plugin as it exists - you're welcome to direct them here to the issues section in this repo with questions!