MCPcopy Create free account
hub / github.com/ampproject/amphtml / fetchCount

Method fetchCount

extensions/amp-pinterest/0.1/save-button.js:80–83  ·  view source on GitHub ↗

* Fetch the remote Pin count for the source URL * @return {Promise}

()

Source from the content-addressed store, hash-verified

78 * @return {Promise}
79 */
80 fetchCount() {
81 const url = `https://widgets.pinterest.com/v1/urls/count.json?return_jsonp=false&url=${this.url}`;
82 return this.xhr.fetchJson(url, {}).then((res) => res.json());
83 }
84
85 /**
86 * Pretty print the Pin count with english suffixes

Callers 1

renderMethod · 0.95

Calls 3

fetchJsonMethod · 0.80
thenMethod · 0.45
jsonMethod · 0.45

Tested by

no test coverage detected