/** * Interact with an individual row. Either to retrieve it or to delete it; both actions use the same API endpoint * with the exception of what type of request is sent. * * @param string $rowID The 4x4 resource ID of the dataset to work with * @param string $method Either `get` or `delete` * * @return mixed */ private function individualRow($rowID, $method) { $headers = array(); // For a single row, the format is the `resourceID/rowID.json`, so we'll use that as the "location" of the Api URL $apiEndPoint = $this->buildApiUrl("resource", $this->resourceId . "/" . $rowID); $urlQuery = new UrlQuery($apiEndPoint, $this->sodaClient->getToken(), $this->sodaClient->getEmail(), $this->sodaClient->getPassword()); $urlQuery->setOAuth2Token($this->sodaClient->getOAuth2Token()); $result = $this->sendIndividualRequest($urlQuery, $method, $this->sodaClient->associativeArrayEnabled(), $headers); $this->setApiVersion($headers); return $result; }
public function testEmail() { $email = "*****@*****.**"; $sc = new SodaClient($this->domain, "", $email); $this->assertEquals($email, $sc->getEmail()); }