Closed davestewart closed 5 years ago
can you add information on the README to document this enhancement
Great! Thanks for responding so quickly.
There is also an omission in the docs, which I only realised about a week after using the library, that you don't need to use link()
to get links - prop()
also returns a link if it's the same name!
await sites.prop('site').fetch()
console.log(sites.prop('site').props)
{href: "https://spaceinvaders.bookingbug.com/api/v1/site", name: "DEV", companies: Array(1)}
await sites.link('site').fetch()
console.log(sites.link('site').props)
{href: "https://spaceinvaders.bookingbug.com/api/v1/site", name: "DEV", companies: Array(1)}
sites.prop('site').props === sites.link('site').props
// true
Do you want me to document that whilst I am at it?
I have some additional structural / process improvements for the docs; I can add all this in a separate PR if you like?
Oh crap I missed an await
here:
Want me to update that now?
Thank you for documentation upgrde :)
Don't forget to publish to NPM !
travis should do that... But it failed because npm has changed :'( I have no time to look at this now...
npm publish
in the terminal should do the trick!
this release has been published
As-per #32, I looked to add support for arrays of links.
This seems to work for me on real world URLs.