diff --git a/src/Adapters/Tableau.php b/src/Adapters/Tableau.php new file mode 100644 index 00000000..3d6fffee --- /dev/null +++ b/src/Adapters/Tableau.php @@ -0,0 +1,38 @@ +isValid() && $response->getUrl()->match([ + '*.public.tableau.com/views/*/*', + ]); + } + + /** + * {@inheritdoc} + */ + public function getCode() + { + $this->width = '100%'; + $this->height = '60vh'; + + // $this->url ends up not being the same one Tableau offers when you + // copy the share link. + $embed_url = $this->response->getStartingUrl() . '&:showVizHome=no&:embed=true'; + + return Utils::iframe($embed_url); + } +}