* @param {string} referrer * @param {string} type * @return {?Promise<../api/propensity-api.PropensityScore>}
(referrer, type)
| 18559 | * @return {?Promise<../api/propensity-api.PropensityScore>} |
| 18560 | */ |
| 18561 | getPropensity(referrer, type) { |
| 18562 | const init = /** @type {!../utils/xhr.FetchInitDef} */ ({ |
| 18563 | method: 'GET', |
| 18564 | credentials: 'include', |
| 18565 | }); |
| 18566 | const url = |
| 18567 | adsUrl('/subopt/pts?products=') + |
| 18568 | this.publicationId_ + |
| 18569 | '&type=' + |
| 18570 | type + |
| 18571 | '&ref=' + |
| 18572 | referrer; |
| 18573 | return this.fetcher_ |
| 18574 | .fetch(this.propensityUrl_(url), init) |
| 18575 | .then((result) => result.json()) |
| 18576 | .then((response) => { |
| 18577 | return this.parsePropensityResponse_(response); |
| 18578 | }); |
| 18579 | } |
| 18580 | } |
| 18581 | |
| 18582 | /** |
nothing calls this directly
no test coverage detected