Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Add plans and jetpack-modules endpoints #188

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Add plans and jetpack-modules endpoints #188

wants to merge 7 commits into from

Conversation

retrofox
Copy link
Contributor

@retrofox retrofox commented Apr 20, 2016

This PR adds:

WPCom#plansList()

import wpcomFactory from 'wpcom';

wpcom.plansList()
  .then( list => console.log( list ) )
  .catch( err => console.log( 'oh, no!' ) );

WPCom#plansFeatures()

Site#plansList()

Site#jetpackModules()

Site#jetpackModule( moduleId )

SiteJetPackModule#get()

SiteJetPackModule#update()

SiteJetPackModule#activate()

SiteJetPackModule#deactivate()

Testing

> make test wpcom.plans
> make test wpcom.site.plans

@retrofox retrofox changed the title Add plans endpoints Add plans and jetpacl-modules endpoints Apr 20, 2016
@retrofox retrofox changed the title Add plans and jetpacl-modules endpoints Add plans and jetpack-modules endpoints Apr 20, 2016
*
* @param {Object} [query] - query object
* @param {Function} fn - callback function
* @return {Function} request handler
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @return {Promise} Promise is returned correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@timmyc
Copy link
Contributor

timmyc commented Apr 20, 2016

Some minor documentation and formatting items listed above. Also a comment about why you have tests for the same endpoint under 3 different versions - just more curious than anything :)

@retrofox
Copy link
Contributor Author

thanks @timmyc

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants