File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export default {
1414 return this . wordpress . getWordpressFollowers ( {
1515 $,
1616 site : this . site ,
17+ type : this . type ,
1718 } ) ;
1819
1920 } ,
@@ -27,6 +28,22 @@ export default {
2728 "siteId" ,
2829 ] ,
2930 } ,
31+ type : {
32+ type : "string" ,
33+ label : "Follower Type" ,
34+ description : "Select the type of followers to fetch: those who clicked Subscribe or those manually added in the dashboard." ,
35+ options : [
36+ {
37+ label : "WordPress.com Followers" ,
38+ value : "wpcom" ,
39+ } ,
40+ {
41+ label : "Email-only Followers" ,
42+ value : "email" ,
43+ } ,
44+ ] ,
45+ default : "wpcom" ,
46+ } ,
3047 timer : {
3148 type : "$.interface.timer" ,
3249 label : "Timer" ,
Original file line number Diff line number Diff line change @@ -139,11 +139,12 @@ export default {
139139 } ,
140140 getWordpressFollowers ( {
141141 site,
142+ type,
142143 ...opts
143144 } ) {
144145 return this . _makeRequest ( {
145146 method : "GET" ,
146- path : `/sites/${ site } /followers/ ` ,
147+ path : `/sites/${ site } /stats/followers?type= ${ type } ` ,
147148 ...opts ,
148149 } ) ;
149150 } ,
You can’t perform that action at this time.
0 commit comments