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

Add site.domain #163

Merged
merged 2 commits into from
Mar 28, 2016
Merged

Add site.domain #163

merged 2 commits into from
Mar 28, 2016

Conversation

retrofox
Copy link
Contributor

Add site domain methods

import wpcomFactory from 'wpcom';

const wpcom = wpcomFactory();
const site = wpcom.site( '<your-testing-blog>' );

// get domains list for the site
site.domainsList().then( list => {
  console.log( 'domains list %o', list );
} );

// create domains handler
const domain = site.domain();

// get primary domain for the website
domain.getPrimary().then( data => {
  // data response
} );

Added methods

Site#domainsList()

SiteDomain#getPrimary()

SiteDomain#setPrimary()

SiteDomain#getRedirect()

SiteDomain#setRedirect()

@retrofox retrofox merged commit 6b6faa4 into master Mar 28, 2016
@retrofox retrofox deleted the add/site.domain branch March 28, 2016 19:32
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.

1 participant