Author: Asim Liaquat (asimlqt22@gmail.com)
 public function testGetLinkHref()
 {
     $xml = new SimpleXMLElement(file_get_contents(__DIR__ . '/xml/worksheet.xml'));
     $expected = 'https://spreadsheets.google.com/feeds/worksheets/tA3TdJ0RIVEem3xQZhG2Ceg/private/full/od8';
     $actual = Util::getLinkHref($xml, 'self');
     $this->assertEquals($expected, $actual);
 }
 /**
  * Get the export csv url
  *
  * @return string
  * @throws Exception
  */
 public function getExportCsvUrl()
 {
     return Util::getLinkHref($this->xml, 'http://schemas.google.com/spreadsheets/2006#exportcsv');
 }
Example #3
0
 /**
  * 
  * @return string
  */
 public function getBatchUrl()
 {
     return Util::getLinkHref($this->xml, 'http://schemas.google.com/g/2005#batch');
 }
 /**
  * Get the edit url
  * 
  * @return string
  */
 public function getEditUrl()
 {
     return Util::getLinkHref($this->xml, 'edit');
 }
 /**
  * Get the post url for this feed
  * 
  * @return string
  */
 public function getPostUrl()
 {
     return Util::getLinkHref($this->xml, 'http://schemas.google.com/g/2005#post');
 }
 /**
  * Returns the feed url of the spreadsheet
  *
  * @return string
  */
 public function getWorksheetsFeedUrl()
 {
     return Util::getLinkHref($this->xml, self::REL_WORKSHEETS_FEED);
 }
 /**
  * Get the cell feed url
  * 
  * @return stirng
  */
 public function getCellFeedUrl()
 {
     return Util::getLinkHref($this->xml, 'http://schemas.google.com/spreadsheets/2006#cellsfeed');
 }
 /**
  * @expectedException Google\Spreadsheet\Exception\Exception
  */
 public function testGetLinkHrefException()
 {
     $xml = $this->getSimpleXMLElement("worksheet");
     $expected = "https://spreadsheets.google.com/feeds/worksheets/tA3TdJ0RIVEem3xQZhG2Ceg/private/full/od8";
     Util::getLinkHref($xml, "selfie");
 }
 /**
  * Returns the feed url of the spreadsheet
  * 
  * @return string
  */
 public function getWorksheetsFeedUrl()
 {
     // return Util::getLinkHref($this->xml, self::REL_WORKSHEETS_FEED);
     # added by @aravindanve
     return Util::getContentHref($this->xml);
 }