node_modules/wpcom/History.md:224:  * site: fix query args for `statsVideo` and `statsPostViews`
node_modules/wpcom/build/wpcom.js:2:function t(e,n){return(0,i.default)(this,t),this instanceof t?(this._id=e,void(this.wpcom=n)):new t(e,n)}return(0,u.default)(t,[{key:"get",value:function(t,e){return this.wpcom.req.get(a+this._id,t,e)}},{key:"add",value:function(t,e,n){return this.wpcom.req.post(a+"new",t,e,n)}},{key:"update",value:function(t,e,n){return this.wpcom.req.put(a+this._id,t,e,n)}},{key:"delete",value:function(t,e){return this.wpcom.req.del(a+this._id+"/delete",t,e)}}]),t}();e.default=c,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t){return this instanceof o?void(this.wpcom=t):new o(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var i=n(80),s=r(i),u=n(79),a=r(u);o.prototype.get=function(t,e){return this.wpcom.req.get("/me/settings",t,e)},o.prototype.update=function(t,e,n){return this.wpcom.req.put("/me/settings/",t,e,n)},o.prototype.profileLinks=function(){return new s.default(this.wpcom)},o.prototype.password=function(){return new a.default(this.wpcom)},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=r(o),s=n(2),u=r(s),a="/me/settings/password/",c=function(){function t(e){return(0,i.default)(this,t),this instanceof t?void(this.wpcom=e):new t(e)}return(0,u.default)(t,[{key:"validate",value:function(t,e,n){return this.wpcom.req.post(a+"validate",e,{password:t},n)}}]),t}();e.default=c,t.exports=e.default},function(t,e){"use strict";function n(t){return this instanceof n?void(this.wpcom=t):new n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var r="/me/settings/profile-links";n.prototype.get=function(t,e){return this.wpcom.req.get(r,t,e)},n.prototype.mine=n.prototype.get,n.prototype.add=function(t,e,n){"function"==typeof e&&(n=e,e={}),t instanceof Array||(t=[t]),e.apiVersion="1.2";var o=r+"/new";return this.wpcom.req.post(o,e,{links:t},n)},n.prototype.del=function(t,e,n){var o=r+"/"+t+"/delete";return this.wpcom.req.del(o,e,n)},n.prototype.delete=n.prototype.del,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=r(o),s=n(2),u=r(s),a=n(82),c=r(a),f="/me/two-step/",l=function(){function t(e){return(0,i.default)(this,t),this instanceof t?void(this.wpcom=e):new t(e)}return(0,u.default)(t,[{key:"get",value:function(t,e){return this.wpcom.req.get(f,t,e)}},{key:"sms",value:function(){return new c.default(this.wpcom)}}]),t}();e.default=l,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=r(o),s=n(2),u=r(s),a="/me/two-step/sms/",c=function(){function t(e){return(0,i.default)(this,t),this instanceof t?void(this.wpcom=e):new t(e)}return(0,u.default)(t,[{key:"send",value:function(t,e){return this.wpcom.req.post(a+"new",t,e)}}]),t}();e.default=c,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=r(o),s=n(2),u=r(s),a="/plans",c=function(){function t(e){return(0,i.default)(this,t),this instanceof t?void(this.wpcom=e):new t(e)}return(0,u.default)(t,[{key:"list",value:function(t,e){return this.wpcom.req.get(a,t,e)}},{key:"features",value:function(t,e){return this.wpcom.req.get(a+"/features",t,e)}}]),t}();e.default=c,t.exports=e.default},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=[{name:"categoriesList",subpath:"categories"},{name:"commentsList",subpath:"comments"},{name:"domainsList",subpath:"domains"},{name:"embedsList",subpath:"embeds"},{name:"followsList",subpath:"follows"},{name:"mediaList",subpath:"media"},{name:"pageTemplates",subpath:"page-templates"},{name:"pluginsList",subpath:"plugins"},{name:"postsList",subpath:"posts"},{name:"postTypesList",subpath:"post-types"},{name:"shortcodesList",subpath:"shortcodes"},{name:"stats",subpath:"stats"},{name:"statsClicks",subpath:"stats/clicks"},{name:"statsCommentFollowers",subpath:"stats/comment-followers"},{name:"statsComments",subpath:"stats/comments"},{name:"statsCountryViews",subpath:"stats/country-views"},{name:"statsFollowers",subpath:"stats/followers"},{name:"statsInsights",subpath:"stats/insights"},{name:"statsPublicize",subpath:"stats/publicize"},{name:"statsReferrers",subpath:"stats/referrers"},{name:"statsSearchTerms",subpath:"stats/search-terms"},{name:"statsStreak",subpath:"stats/streak"},{name:"statsSummary",subpath:"stats/summary"},{name:"statsTags",subpath:"stats/tags"},{name:"statsTopAuthors",subpath:"stats/top-authors"},{name:"statsTopPosts",subpath:"stats/top-posts"},{name:"statsVideoPlays",subpath:"stats/video-plays"},{name:"statsVisits",subpath:"stats/visits"},{name:"tagsList",subpath:"tags"},{name:"usersList",subpath:"users"},{name:"wpcomPluginsList",subpath:"wpcom-plugins"}],t.exports=e.default},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=[{name:"likesList",subpath:"likes"},{name:"subscribersList",subpath:"subscribers"}],t.exports=e.default},function(t,e){"use strict";function n(t,e,r){if(!e)throw new Error("`site id` is not correctly defined");return this instanceof n?(this.wpcom=r,this._sid=e,void(this._slug=t)):new n(t,e,r)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n,n.prototype.slug=function(t){this._slug=t},n.prototype.get=function(t,e){var n="/sites/"+this._sid+"/categories/slug:"+this._slug;return this.wpcom.req.get(n,t,e)},n.prototype.add=function(t,e,n){var r="/sites/"+this._sid+"/categories/new";return this.wpcom.req.post(r,t,e,n)},n.prototype.update=function(t,e,n){var r="/sites/"+this._sid+"/categories/slug:"+this._slug;return this.wpcom.req.put(r,t,e,n)},n.prototype.delete=n.prototype.del=function(t,e){var n="/sites/"+this._sid+"/categories/slug:"+this._slug+"/delete";return this.wpcom.req.del(n,t,e)},t.exports=e.default},function(t,e){"use strict";function n(t,e,r){if(!e)throw new Error("`site id` is not correctly defined");if(!t)throw new Error("`comment id` is not correctly defined");return this instanceof n?(this.wpcom=r,this._cid=t,void(this._sid=e)):new n(t,e,r)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n,n.prototype.mine=n.prototype.state=function(t,e){var n="/sites/"+this._sid+"/comments/"+this._cid+"/likes/mine";return this.wpcom.req.get(n,t,e)},n.prototype.add=function(t,e){var n="/sites/"+this._sid+"/comments/"+this._cid+"/likes/new";return this.wpcom.req.post(n,t,e)},n.prototype.del=n.prototype.delete=function(t,e){var n="/sites/"+this._sid+"/comments/"+this._cid+"/likes/mine/delete";return this.wpcom.req.del(n,t,e)},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=r(o),s=n(2),u=r(s),a=function(){function t(e,n){if((0,i.default)(this,t),!e)throw new Error("`site id` is not correctly defined");return this instanceof t?(this.wpcom=n,this._sid=e,void(this.path="/sites/"+this._sid+"/vouchers")):new t(e,n)}return(0,u.default)(t,[{key:"list",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];return t.apiNamespace="wpcom/v2",this.wpcom.req.get(this.path,t,e)}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];return e.apiNamespace="wpcom/v2",this.wpcom.req.get(this.path+"/"+t,e,n)}},{key:"assign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];return e.apiNamespace="wpcom/v2",this.wpcom.req.post(this.path+"/"+t+"/assign",e,{},n)}}]),t}();e.default=a,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=r(o),s=n(2),u=r(s),a="/sites",c=function(){function t(e,n){return(0,i.default)(this,t),this instanceof t?(this._sid=e,this.path=a+"/"+this._sid+"/domains",void(this.wpcom=n)):new t(e,n)}return(0,u.default)(t,[{key:"getPrimary",value:function(t,e){return this.wpcom.req.get(this.path+"/primary",t,e)}},{key:"setPrimary",value:function(t,e){return this.wpcom.req.put(this.path+"/primary",{},{domain:t},e)}},{key:"getRedirect",value:function(t,e){return this.wpcom.req.get(this.path+"/redirect",t,e)}},{key:"setRedirect",value:function(t,e){return"string"==typeof t&&(t={location:t}),this.wpcom.req.put(this.path+"/redirect",{},t,e)}}]),t}();e.default=c,t.exports=e.default},function(t,e){"use strict";function n(t,e){if(!t)throw new Error("`site id` is not correctly defined");return this instanceof n?(this.wpcom=e,void(this._sid=t)):new n(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n,n.prototype.mine=n.prototype.state=function(t,e){var n="/sites/"+this._sid+"/follows/mine";return this.wpcom.req.get(n,t,e)},n.prototype.follow=n.prototype.add=function(t,e){var n="/sites/"+this._sid+"/follows/new";return this.wpcom.req.put(n,t,null,e)},n.prototype.unfollow=n.prototype.del=function(t,e){var n="/sites/"+this._sid+"/follows/mine/delete";return this.wpcom.req.del(n,t,null,e)},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=r(o),s=n(2),u=r(s),a=n(86),c=r(a),f=n(39),l=r(f),p=n(90),d=r(p),h=n(92),y=r(h),m=n(95),v=r(m),w=n(100),_=r(w),g=n(94),b=r(g),x=n(89),k=r(x),C=n(93),O=r(C),P=n(99),q=r(P),j=n(101),M=r(j),E=n(88),T=r(E),F=n(104),S=r(F),A=n(107),L=r(A),R=n(84),N=r(R),I=n(40),D=r(I),U=n(13),H=r(U),V=(0,H.default)("wpcom:site"),z="/sites",B=function(){function t(e,n){return(0,i.default)(this,t),this instanceof t?(this.wpcom=n,V("set %o site id",e),this._id=encodeURIComponent(e),void(this.path=z+"/"+this._id)):new t(e,n)}return(0,u.default)(t,[{key:"get",value:function(t,e){return this.wpcom.req.get(this.path,t,e)}},{key:"post",value:function(t){return new v.default(t,this._id,this.wpcom)}},{key:"addPost",value:function(t,e){var n=new v.default(null,this._id,this.wpcom);return n.add(t,e)}},{key:"deletePost",value:function(t,e){var n=new v.default(t,this._id,this.wpcom);return n.delete(e)}},{key:"media",value:function(t){return new y.default(t,this._id,this.wpcom)}},{key:"addMediaFiles",value:function(t,e,n){var r=new y.default(null,this._id,this.wpcom);return r.addFiles(t,e,n)}},{key:"addMediaUrls",value:function(t,e,n){var r=new y.default(null,this._id,this.wpcom);return r.addUrls(t,e,n)}},{key:"deleteMedia",value:function(t,e){var n=new y.default(t,this._id,this.wpcom);return n.del(e)}},{key:"comment",value:function(t){return new l.default(t,null,this._id,this.wpcom)}},{key:"follow",value:function(){return new d.default(this._id,this.wpcom)}},{key:"plugin",value:function(t){return new O.default(t,this._id,this.wpcom)}},{key:"wpcomPlugin",value:function(t){return new L.default(t,this._id,this.wpcom)}},{key:"category",value:function(t){return new c.default(t,this._id,this.wpcom)}},{key:"tag",value:function(t){return new _.default(t,this._id,this.wpcom)}},{key:"taxonomy",value:function(t){return new M.default(t,this._id,this.wpcom)}},{key:"creditVouchers",value:function(){return new T.default(this._id,this.wpcom)}},{key:"postType",value:function(t){return new b.default(t,this._id,this.wpcom)}},{key:"settings",value:function(){return new q.default(this._id,this.wpcom)}},{key:"domain",value:function(){return new k.default(this._id,this.wpcom)}},{key:"postCounts",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"post",e=arguments[1],n=arguments[2];return"function"==typeof e&&(n=e,e={}),this.wpcom.req.get(this.path+"/post-counts/"+t,e,n)}},{key:"renderShortcode",value:function(t,e,n){if("string"!=typeof t)throw new TypeError("expected a url String");return"function"==typeof e&&(n=e,e={}),e=e||{},e.shortcode=t,this.wpcom.req.get(this.path+"/shortcodes/render",e,n)}},{key:"renderEmbed",value:function(t,e,n){if("string"!=typeof t)throw new TypeError("expected an embed String");return"function"==typeof e&&(n=e,e={}),e=e||{},e.embed_url=t,this.wpcom.req.get(this.path+"/embeds/render",e,n)}},{key:"statsReferrersSpamNew",value:function(t,e){var n=this.path+"/stats/referrers/spam/new";return this.wpcom.req.post(n,{domain:t},null,e)}},{key:"statsReferrersSpamDelete",value:function(t,e){var n=this.path+"/stats/referrers/spam/delete";return this.wpcom.req.post(n,{domain:t},null,e)}},{key:"statsVideo",value:function(t,e,n){var r=this.path+"/stats/video/"+t;return"function"==typeof e&&(n=e,e={}),this.wpcom.req.get(r,e,n)}},{key:"statsPostViews",value:function(t,e,n){var r=this.path+"/stats/post/"+t;return"function"==typeof e&&(n=e,e={}),this.wpcom.req.get(r,e,n)}},{key:"wordAds",value:function(){return new S.default(this._id,this.wpcom)}}]),t}();(0,D.default)(B,N.default,function(t,e){return"/sites/"+e._id+"/"+t.subpath}),e.default=B,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t){var e=[],n=Array.isArray(t);t=n?t:[t];var r=void 0,o=void 0,i=void 0,s=void 0;for(r=0;r<t.length;r++){o=t[r],"string"==typeof o&&(o=(0,a.createReadStream)(o));var u=!!o._readableState,f="undefined"!=typeof File&&o instanceof File;if(c("isStream: %s",u),c("isFile: %s",f),!f&&!u){for(i in o)c("add %o => %o",i,o[i]),"file"!==i&&(s="attrs["+r+"]["+i+"]",e.push([s,o[i]]));o=o.file,"string"==typeof o&&(o=(0,a.createReadStream)(o))}e.push(["media[]",o])}return e}function i(t,e,n){return this instanceof i?(this.wpcom=n,this._sid=e,this._id=t,void(this._id||c("WARN: media `id` is not defined"))):new i(t,e,n)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var s=n(13),u=r(s),a=n(109),c=(0,u.default)("wpcom:media");i.prototype.get=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];t.apiVersion=t.apiVersion||"1.2";var n="/sites/"+this._sid+"/media/"+this._id;return this.wpcom.req.get(n,t,e)},i.prototype.update=function(t,e,n){var r={path:"/sites/"+this._sid+"/media/"+this._id};return this.wpcom.req.put(r,t,e,n)},i.prototype.edit=function(t,e,n){"function"!=typeof e&&e||(n=e,e=t,t={});var r={path:"/sites/"+this._sid+"/media/"+this._id+"/edit"};if(e&&e.media){r.formData=[["media",e.media]],delete e.media;for(var o in e)r.formData.push(["attrs["+o+"]",e[o]]);e=null}return this.wpcom.req.put(r,t,e,n)},i.prototype.addFiles=function(t,e,n){void 0===n&&(void 0===e?(e=t,t={}):"function"==typeof e&&(n=e,e=t,t={}));var r={path:"/sites/"+this._sid+"/media/new",formData:o(e)};return this.wpcom.req.post(r,t,null,n)},i.prototype.addUrls=function(t,e,n){void 0===n&&(void 0===e?(e=t,t={}):"function"==typeof e&&(n=e,e=t,t={}));var r="/sites/"+this._sid+"/media/new",o={me<response clipped><NOTE>Due to the max output limit, only part of the full response has been shown to you.</NOTE>AACL;;;;;;;AAOA,eAAa,EAAb,EAAiB,KAAjB,EAAyB;AAAA;;AACxB,MAAK,EAAI,gBAAgB,IAApB,CAAL,EAAkC;AACjC,UAAO,IAAI,IAAJ,CAAU,EAAV,EAAc,KAAd,CAAP;AACA;;AAED,OAAK,KAAL,GAAa,KAAb;;AAEA,QAAO,gBAAP,EAAyB,EAAzB;AACA,OAAK,GAAL,GAAW,mBAAoB,EAApB,CAAX;AACA,OAAK,IAAL,GAAgB,IAAhB,SAA0B,KAAK,GAA/B;AACA;;AAED;;;;;;;;;;;sBAOK,K,EAAO,E,EAAK;AAChB,UAAO,KAAK,KAAL,CAAW,GAAX,CAAe,GAAf,CAAoB,KAAK,IAAzB,EAA+B,KAA/B,EAAsC,EAAtC,CAAP;AACA;;AAED;;;;;;;;;uBAMM,E,EAAK;AACV,UAAO,IAAI,eAAJ,CAAU,EAAV,EAAc,KAAK,GAAnB,EAAwB,KAAK,KAA7B,CAAP;AACA;;AAED;;;;;;;;;;0BAOS,I,EAAM,E,EAAK;AACnB,OAAM,OAAO,IAAI,eAAJ,CAAU,IAAV,EAAgB,KAAK,GAArB,EAA0B,KAAK,KAA/B,CAAb;AACA,UAAO,KAAK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C,CAAP;AACA;;AAED;;;;;;;;;;;6BAQY,O,EAAS,K,EAAO,E,EAAK;AAChC,OAAM,OAAW,KAAK,IAAhB,qBAAsC,OAA5C;;AAEA,OAAK,eAAe,OAAO,KAA3B,EAAmC;AAClC,SAAK,KAAL;AACA,YAAQ,EAAR;AACA;;AAED,UAAO,KAAK,KAAL,CAAW,GAAX,CAAe,GAAf,CAAoB,IAApB,EAA0B,KAA1B,EAAiC,EAAjC,CAAP;AACA;;AAED;;;;;;;;;;;iCAQgB,M,EAAQ,K,EAAO,E,EAAK;AACnC,OAAM,OAAW,KAAK,IAAhB,oBAAqC,MAA3C;;AAEA,OAAK,eAAe,OAAO,KAA3B,EAAmC;AAClC,SAAK,KAAL;AACA,YAAQ,EAAR;AACA;;AAED,UAAO,KAAK,KAAL,CAAW,GAAX,CAAe,GAAf,CAAoB,IAApB,EAA0B,KAA1B,EAAiC,EAAjC,CAAP;AACA;;AAED;;;;;;;;;;;;;;;4BAYU;AACT,UAAO,IAAI,eAAJ,CAAiB,KAAK,GAAtB,EAA2B,KAAK,KAAhC,CAAP;AACA;;;;;AAGF;;;AACA,8BAAgB,IAAhB,EAAsB,eAAtB,EAAsC,UAAE,YAAF,EAAgB,GAAhB,EAAyB;AAC9D,oBAAkB,IAAI,GAAtB,SAA+B,aAAa,OAA5C;AACA,CAFD;;kBAIe,I","file":"site.js","sourcesContent":["/**\n * Module dependencies.\n */\nimport Category from './site.category';\nimport Comment from './site.comment';\nimport Follow from './site.follow';\nimport Media from './site.media';\nimport Post from './site.post';\nimport Tag from './site.tag';\nimport SitePostType from './site.post-type';\nimport SiteDomain from './site.domain';\nimport SitePlugin from './site.plugin';\nimport SiteSettings from './site.settings';\nimport SiteTaxonomy from './site.taxonomy';\nimport SiteCreditVouchers from './site.credit-vouchers';\nimport SiteWordAds from './site.wordads';\nimport SiteWPComPlugin from './site.wpcom-plugin';\n\nimport siteGetMethods from './runtime/site.get';\nimport runtimeBuilder from './util/runtime-builder';\nimport debugFactory from 'debug';\n\n/**\n * Module vars\n */\nconst debug = debugFactory( 'wpcom:site' );\nconst root = '/sites';\n\n/**\n * Site class\n */\nclass Site {\n\t/**\n\t * Create a Site instance\n\t *\n\t * @param {String} id - site id\n\t * @param {WPCOM} wpcom - wpcom instance\n\t * @return {Null} null\n\t */\n\tconstructor( id, wpcom ) {\n\t\tif ( ! ( this instanceof Site ) ) {\n\t\t\treturn new Site( id, wpcom );\n\t\t}\n\n\t\tthis.wpcom = wpcom;\n\n\t\tdebug( 'set %o site id', id );\n\t\tthis._id = encodeURIComponent( id );\n\t\tthis.path = `${ root }/${ this._id }`;\n\t}\n\n\t/**\n\t * Require site information\n\t *\n\t * @param {Object} [query] - query object parameter\n\t * @param {Function} fn - callback function\n\t * @return {Function} request handler\n\t */\n\tget( query, fn ) {\n\t\treturn this.wpcom.req.get( this.path, query, fn );\n\t}\n\n\t/**\n\t * Create a `Post` instance\n\t *\n\t * @param {String} id - post id\n\t * @return {Post} Post instance\n\t */\n\tpost( id ) {\n\t\treturn new Post( id, this._id, this.wpcom );\n\t}\n\n\t/**\n\t * Add a new blog post\n\t *\n\t * @param {Object} body - body object parameter\n\t * @param {Function} fn - callback function\n\t * @return {Function} request handler\n\t */\n\taddPost( body, fn ) {\n\t\tconst post = new Post( null, this._id, this.wpcom );\n\t\treturn post.add( body, fn );\n\t}\n\n\t/**\n\t * Delete a blog post\n\t *\n\t * @param {String} id - post id\n\t * @param {Function} fn - callback function\n\t * @return {Function} request handler\n\t */\n\tdeletePost( id, fn ) {\n\t\tconst post = new Post( id, this._id, this.wpcom );\n\t\treturn post.delete( fn );\n\t}\n\n\t/**\n\t * Create a `Media` instance\n\t *\n\t * @param {String} id - post id\n\t * @return {Media} Media instance\n\t */\n\tmedia( id ) {\n\t\treturn new Media( id, this._id, this.wpcom );\n\t}\n\n\t/**\n\t * Add a media from a file\n\t *\n\t * @param {Object} [query] - query object parameter\n\t * @param {Array|String} files - media files to add\n\t * @param {Function} fn - callback function\n\t * @return {Function} request handler\n\t */\n\taddMediaFiles( query, files, fn ) {\n\t\tconst media = new Media( null, this._id, this.wpcom );\n\t\treturn media.addFiles( query, files, fn );\n\t}\n\n\t/**\n\t * Add a new media from url\n\t *\n\t * @param {Object} [query] - query object parameter\n\t * @param {Array|String} files - media files to add\n\t * @param {Function} fn - callback function\n\t * @return {Function} request handler\n\t */\n\taddMediaUrls( query, files, fn ) {\n\t\tconst media = new Media( null, this._id, this.wpcom );\n\t\treturn media.addUrls( query, files, fn );\n\t}\n\n\t/**\n\t * Delete a blog media\n\t *\n\t * @param {String} id - media id\n\t * @param {Function} fn - callback function\n\t * @return {Function} request handler\n\t */\n\tdeleteMedia( id, fn ) {\n\t\tconst media = new Media( id, this._id, this.wpcom );\n\t\treturn media.del( fn );\n\t}\n\n\t/**\n\t * Create a `Comment` instance\n\t *\n\t * @param {String} id - comment id\n\t * @return {Comment} Comment instance\n\t */\n\tcomment( id ) {\n\t\treturn new Comment( id, null, this._id, this.wpcom );\n\t}\n\n\t/**\n\t * Create a `Follow` instance\n\t *\n\t * @return {Follow} Follow instance\n\t */\n\tfollow() {\n\t\treturn new Follow( this._id, this.wpcom );\n\t}\n\n\t/**\n\t * Create a `SitePlugin` instance\n\t *\n\t * @param {String} slug - plugin identifier\n\t * @return {SitePlugin} SitePlugin instance\n\t */\n\tplugin( slug ) {\n\t\treturn new SitePlugin( slug, this._id, this.wpcom );\n\t}\n\n\t/**\n\t * Create a `SiteWPComPlugin` instance\n\t *\n\t * @param {String} slug - plugin identifier\n\t * @return {SiteWPComPlugin} SiteWPComPlugin instance\n\t */\n\twpcomPlugin( slug ) {\n\t\treturn new SiteWPComPlugin( slug, this._id, this.wpcom );\n\t}\n\n\t/**\n\t * Create a `Category` instance\n\t * Set `cat` alias\n\t *\n\t * @param {String} [slug] - category slug\n\t * @return {Category} Category instance\n\t */\n\tcategory( slug ) {\n\t\treturn new Category( slug, this._id, this.wpcom );\n\t}\n\n\t/**\n\t * Create a `Tag` instance\n\t *\n\t * @param {String} [slug] - tag slug\n\t * @return {Tag} Tag instance\n\t */\n\ttag( slug ) {\n\t\treturn new Tag( slug, this._id, this.wpcom );\n\t}\n\n\t/**\n\t * Create a `Taxonomy` instance\n\t *\n\t * @param {String} [slug] - taxonomy slug\n\t * @return {SiteTaxonomy} SiteTaxonomy instance\n\t */\n\ttaxonomy( slug ) {\n\t\treturn new SiteTaxonomy( slug, this._id, this.wpcom );\n\t}\n\n\t/**\n\t * Create a `SiteCreditVouchers` instance\n\t *\n\t * @return {SiteCreditVouchers} SiteCreditVouchers instance\n\t */\n\tcreditVouchers() {\n\t\treturn new SiteCreditVouchers( this._id, this.wpcom );\n\t}\n\n\t/**\n\t * Create a `SitePostType` instance\n\t *\n\t * @param {String} [slug] - post type slug\n\t * @return {SitePostType} SitePostType instance\n\t */\n\tpostType( slug ) {\n\t\treturn new SitePostType( slug, this._id, this.wpcom );\n\t}\n\n\t/**\n\t * Create a `SiteSettings` instance\n\t *\n\t * @return {SiteSettings} SiteSettings instance\n\t */\n\tsettings() {\n\t\treturn new SiteSettings( this._id, this.wpcom );\n\t}\n\n\t/**\n\t * Create a `SiteDomain` instance\n\t *\n\t * @return {SiteDomain} SiteDomain instance\n\t */\n\tdomain() {\n\t\treturn new SiteDomain( this._id, this.wpcom );\n\t}\n\n\t/**\n\t * Get number of posts in the post type groups by post status\n\t *\n\t * *Example:*\n\t *   // Get number post of pages\n\t *    wpcom\n\t *    .site( 'my-blog.wordpress.com' )\n\t *    .postCounts( 'page', function( err, data ) {\n\t *      // `counts` data object\n\t *    } );\n\t *\n\t * @param {String} type - post type\n\t * @param {Object} [query] - query object parameter\n\t * @param {Function} fn - callback function\n\t * @return {Function} request handler\n\t */\n\tpostCounts( type = 'post', query, fn ) {\n\t\tif ( 'function' === typeof query ) {\n\t\t\tfn = query;\n\t\t\tquery = {};\n\t\t}\n\n\t\treturn this.wpcom.req.get( `${ this.path }/post-counts/${ type }`, query, fn );\n\t}\n\n\t/**\n\t * Get a rendered shortcode for a site.\n\t *\n\t * Note: The current user must have publishing access.\n\t *\n\t * @param {String} url - shortcode url\n\t * @param {Object} [query] - query object parameter\n\t * @param {Function} fn - callback function\n\t * @return {Function} request handler\n\t */\n\trenderShortcode( url, query, fn ) {\n\t\tif ( 'string' !== typeof url ) {\n\t\t\tthrow new TypeError( 'expected a url String' );\n\t\t}\n\n\t\tif ( 'function' === typeof query ) {\n\t\t\tfn = query;\n\t\t\tquery = {};\n\t\t}\n\n\t\tquery = query || {};\n\t\tquery.shortcode = url;\n\n\t\treturn this.wpcom.req.get( `${ this.path }/shortcodes/render`, query, fn );\n\t}\n\n\t/**\n\t * Get a rendered embed for a site.\n\t *\n\t * Note: The current user must have publishing access.\n\t *\n\t * @param {String} url - embed url\n\t * @param {Object} [query] - query object parameter\n\t * @param {Function} fn - callback function\n\t * @return {Function} request handler\n\t */\n\trenderEmbed( url, query, fn ) {\n\t\tif ( 'string' !== typeof url ) {\n\t\t\tthrow new TypeError( 'expected an embed String' );\n\t\t}\n\n\t\tif ( 'function' === typeof query ) {\n\t\t\tfn = query;\n\t\t\tquery = {};\n\t\t}\n\n\t\tquery = query || {};\n\t\tquery.embed_url = url;\n\n\t\treturn this.wpcom.req.get( `${ this.path }/embeds/render`, query, fn );\n\t}\n\n\t/**\n\t * Mark a referrering domain as spam\n\t *\n\t * @param {String} domain - domain\n\t * @param {Function} fn - callback function\n\t * @return {Function} request handler\n\t */\n\tstatsReferrersSpamNew( domain, fn ) {\n\t\tconst path = `${ this.path }/stats/referrers/spam/new`;\n\t\treturn this.wpcom.req.post( path, { domain }, null, fn );\n\t}\n\n\t/**\n\t * Remove referrering domain from spam\n\t *\n\t * @param {String} domain - domain\n\t * @param {Function} fn - callback function\n\t * @return {Function} request handler\n\t */\n\tstatsReferrersSpamDelete( domain, fn ) {\n\t\tconst path = `${ this.path }/stats/referrers/spam/delete`;\n\t\treturn this.wpcom.req.post( path, { domain }, null, fn );\n\t}\n\n\t/**\n\t * Get detailed stats about a VideoPress video\n\t *\n\t * @param {String} videoId - video id\n\t * @param {Object} [query] - query object parameter\n\t * @param {Function} fn - callback function\n\t * @return {Function} request handler\n\t */\n\tstatsVideo( videoId, query, fn ) {\n\t\tconst path = `${ this.path }/stats/video/${ videoId }`;\n\n\t\tif ( 'function' === typeof query ) {\n\t\t\tfn = query;\n\t\t\tquery = {};\n\t\t}\n\n\t\treturn this.wpcom.req.get( path, query, fn );\n\t}\n\n\t/**\n\t * Get detailed stats about a particular post\n\t *\n\t * @param {String} postId - post id\n\t * @param {Object} [query] - query object parameter\n\t * @param {Function} fn - callback function\n\t * @return {Function} request handler\n\t */\n\tstatsPostViews( postId, query, fn ) {\n\t\tconst path = `${ this.path }/stats/post/${ postId }`;\n\n\t\tif ( 'function' === typeof query ) {\n\t\t\tfn = query;\n\t\t\tquery = {};\n\t\t}\n\n\t\treturn this.wpcom.req.get( path, query, fn );\n\t}\n\n\t/**\n\t * Return a `SiteWordAds` instance.\n\t *\n\t * *Example:*\n\t *    // Create a SiteWordAds instance\n\t *\n\t *    const wordAds = wpcom\n\t *      .site( 'my-blog.wordpress.com' )\n\t *      .wordAds();\n\t *\n\t * @return {SiteWordAds} SiteWordAds instance\n\t */\n\twordAds() {\n\t\treturn new SiteWordAds( this._id, this.wpcom );\n\t}\n}\n\n// add methods in runtime\nruntimeBuilder( Site, siteGetMethods, ( methodParams, ctx ) => {\n\treturn `/sites/${ ctx._id }/${ methodParams.subpath }`;\n} );\n\nexport default Site;\n"]}
[The command completed with exit code 0.]
[Current working directory: /workspace/wp-calypso]
[Python interpreter: /usr/bin/python]
[Command finished with exit code 0]