Skip to content
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
@MurhafSousli

Description

@MurhafSousli

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:

  1. 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.
  2. 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?
  3. Can I get a single post using Models ? if so please show me how to use
  4. Do I have to dispose the service wp.api.collections after I finish using it? before using this library I used to use Observable 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions