r94896 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94895‎ | r94896 | r94897 >
Date:15:03, 18 August 2011
Author:reedy
Status:deferred
Tags:
Comment:
Add some newlines to output

Add commented examples how to get Worksheet, list of cell based feeds from the google documents spreadhseet api
Modified paths:
  • /trunk/extensions/MetricsReporting/fetchGoogleSpreadsheet.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetricsReporting/fetchGoogleSpreadsheet.php
@@ -61,20 +61,33 @@
6262
6363 $node = new SimpleXMLElement( $reader->readOuterXML() );
6464
65 - //$src = (string)$node->content["src"];
66 - $src = $node->content->attributes()->src;
67 - $this->output( 'Worksheet found: ' . $src );
 65+ // Worksheet based feed
 66+ // $src = (string)$node->link[2]['href'];
 67+ //$src = $node->link[2]->attributes()->href;
 68+
 69+ // List based feed
 70+ // $src = (string)$node->content["src"];
 71+ // $src = $node->content->attributes()->src;
 72+
 73+ // Cell based feed
 74+ // $src = (string)$node->link["href"];
 75+ // $src = $node->link->attributes()->href;
 76+
 77+ $this->output( 'Worksheet found: ' . $src . "\n" );
6878 $worksheets[] = $src;
6979
7080 // go to next <entry />
7181 $reader->next( 'entry' );
7282 }
7383
 84+ $this->output( "\n" );
 85+
7486 foreach( $worksheets as $sheet ) {
7587 $http = $this->buildAuthedRequest( $sheet, $authToken, $cookies );
7688 $http->execute();
7789 $content = $http->getContent();
7890 var_dump( $this->formatXmlString( $content ) );
 91+ $this->output( "\n" );
7992 }
8093
8194 $this->output( "Finished!\n" );

Status & tagging log