Google\Spreadsheet\Worksheet::getId PHP Method

getId() public method

Get the worksheet id. Returns the full url.
public getId ( ) : string
return string
    public function getId()
    {
        return $this->xml->id->__toString();
    }

Usage Example

 public function testGetId()
 {
     $xml = file_get_contents(__DIR__ . '/xml/worksheet.xml');
     $worksheet = new Worksheet(new SimpleXMLElement($xml));
     $this->assertEquals('https://spreadsheets.google.com/feeds/worksheets/tA3TdJ0RIVEem3xQZhG2Ceg/private/full/od8', $worksheet->getId());
 }