Index: trunk/extensions/MetricsReporting/fetchGoogleSpreadsheet.php |
— | — | @@ -61,20 +61,33 @@ |
62 | 62 | |
63 | 63 | $node = new SimpleXMLElement( $reader->readOuterXML() ); |
64 | 64 | |
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" ); |
68 | 78 | $worksheets[] = $src; |
69 | 79 | |
70 | 80 | // go to next <entry /> |
71 | 81 | $reader->next( 'entry' ); |
72 | 82 | } |
73 | 83 | |
| 84 | + $this->output( "\n" ); |
| 85 | + |
74 | 86 | foreach( $worksheets as $sheet ) { |
75 | 87 | $http = $this->buildAuthedRequest( $sheet, $authToken, $cookies ); |
76 | 88 | $http->execute(); |
77 | 89 | $content = $http->getContent(); |
78 | 90 | var_dump( $this->formatXmlString( $content ) ); |
| 91 | + $this->output( "\n" ); |
79 | 92 | } |
80 | 93 | |
81 | 94 | $this->output( "Finished!\n" ); |