Skip to content

Commit

Permalink
Mediaviews: Fix API proxy to point to new location
Browse files Browse the repository at this point in the history
  • Loading branch information
MusikAnimal committed Jun 18, 2018
1 parent 9c7e839 commit 3f43a67
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion javascripts/mediaviews/mediaviews.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ class MediaViews extends mix(Pv).with(ChartHelpers, ListHelpers) {
* @return {string} URL
*/
getMPCApiUrl(file, startDate, endDate, category = false) {
const endpoint = 'https://partnermetrics.wmflabs.org/mediaplaycounts/api/2/file_playcount/' +
const endpoint = 'https://tools.wmflabs.org/mediaviews-api/api/2/file_playcount/' +
`date_range/${file}/${startDate.format(this.config.mpcDateFormat)}/${endDate.format(this.config.mpcDateFormat)}`;
return `/mediaviews/api.php?endpoint=${endpoint}`;
}
Expand Down
1 change: 1 addition & 0 deletions public_html/mediaviews/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept: application/json']);
curl_setopt($ch, CURLOPT_URL, $_GET['endpoint']);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mediaviews Analysis; https://tools.wmflabs.org/mediaviews / https://en.wikipedia.org/wiki/User_talk:MusikAnimal');
$result = curl_exec($ch);
curl_close($ch);
2 changes: 1 addition & 1 deletion public_html/mediaviews/application.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion public_html/metaviews/application.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3f43a67

Please sign in to comment.