This repository was archived by the owner on Sep 5, 2018. It is now read-only.
This repository was archived by the owner on Sep 5, 2018. It is now read-only.
couple of questions about usage #109
Closed
Description
Hi, first of all thank you for the great job you do in this library, I'm currently using only Collections
to get everything I need from wordpress, but there are some things I want to confirm.
What I understood till now:
- Load is for wp authentication.
- Collections is used to fetch data from wp.
- Models is used for Create/Update/Delete operations.
- Utils has the utility functions like changing date format.. etc
because I want to get the most out of this great library, I have couple of questions:
- for example I get a collection of posts which have undesired date format, and I've noticed that there is a function in
utils.js
converts the date format but couldn't figure out if I can use it. - I had to make my own SinglePost class to handle a post response while I think (but I'm not sure) that the library offers one.
wp.api.models.Posts.defaults
is this the class? - Can I get a single post using
Models
? if so please show me how to use - Do I have to dispose the service
wp.api.collections
after I finish using it? before using this library I used to useObservable
from rxjs 5 and they don't need to be disposed
you can check how I'm using the library in my service file here
Metadata
Metadata
Assignees
Labels
No labels