Skip to content

Commit

Permalink
Initial documentation for TSC (#98)
Browse files Browse the repository at this point in the history
* First cut at API docs

* Update jquery version for bootstrap compatibility

* Incorporate review feedback

* Add pagination docs

* Add dev guide

* Add docs for populating views and connections

* Continue adding to api ref

* Edits for existing content

* Update readme to point to docs

* Incorporate edits from PR
  • Loading branch information
jdomingu authored and Russell Hay committed Nov 3, 2016
1 parent 818645b commit 78b9684
Show file tree
Hide file tree
Showing 28 changed files with 2,341 additions and 11 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,8 @@ $RECYCLE.BIN/
*.msp

# Windows shortcuts
*.lnk
*.lnk

# Documentation
docs/_site/
docs/.jekyll-metadata
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# server-client-python
Tableau Server Client is a client library for the Tableau REST API. The Server Client is delightful to use and easy to love because it requires writing much less code than working directly with the REST API.
# Tableau Server Client (Python)

This repository contains Python source and sample files.
Use the Tableau Server Client (TSC) library to increase your productivity as you interact with the Tableau Server REST API. With the TSC library you can do almost everything that you can do with the REST API, including:

###Getting Started
You must have Python installed. You can use either 2.7.X or 3.3 and later.
* Publish workbooks and data sources.
* Create users and groups.
* Query projects, sites, and more.

#### Installing the latest stable version (preferred)
This repository contains Python source code and sample files.

```text
pip install tableauserverclient
```
For more information on installing and using TSC, see the documentation:

#### Installing From Source

Expand Down Expand Up @@ -66,4 +64,4 @@ Initialize Server | [initialize_server.py](./samples/initialize_server.py) | Sho
1. Create an endpoint class for the new feature, following the structure of the other endpoints. Each endpoint usually has get, post, update, and delete operations that require making the url, creating the xml request if necesssary, sending the request and creating the target item object based on the server response.
2. Create an item class for the new feature, following the structure of the other item classes. Each item has properties that correspond to what attributes are sent to/received from the server (refer to docs amd Postman for attributes). Some items also require constants for user input that are limited to specific strings. After making all the properties, make the parsing method that takes the server response and creates an instances of the target item. If the corresponding endpoint class has an update function, then parsing is broken into multiple parts (refer to another item like workbook or datasource for example).
3. Add testing by getting real xml responses from the server, and asserting that all properties are parsed and set correctly.
4. Add samples to show users how to use the new feature.
4. Add samples to show users how to use the new feature.
3 changes: 3 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins

129 changes: 129 additions & 0 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.6)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.4.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
colorator (0.1)
ethon (0.9.0)
ffi (>= 1.3.0)
execjs (2.7.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
ffi (1.9.10)
ffi (1.9.10-x86-mingw32)
gemoji (2.1.0)
github-pages (80)
github-pages-health-check (= 1.1.0)
jekyll (= 3.1.6)
jekyll-coffeescript (= 1.0.1)
jekyll-feed (= 0.5.1)
jekyll-gist (= 1.4.0)
jekyll-github-metadata (= 1.11.1)
jekyll-mentions (= 1.1.2)
jekyll-paginate (= 1.1.0)
jekyll-redirect-from (= 0.10.0)
jekyll-sass-converter (= 1.3.0)
jekyll-seo-tag (= 1.4.0)
jekyll-sitemap (= 0.10.0)
jemoji (= 0.6.2)
kramdown (= 1.10.0)
liquid (= 3.0.6)
listen (= 3.0.6)
mercenary (~> 0.3)
rouge (= 1.10.1)
terminal-table (~> 1.4)
github-pages-health-check (1.1.0)
addressable (~> 2.3)
net-dns (~> 0.8)
octokit (~> 4.0)
public_suffix (~> 1.4)
typhoeus (~> 0.7)
html-pipeline (2.4.1)
activesupport (>= 2, < 5)
nokogiri (>= 1.4)
i18n (0.7.0)
jekyll (3.1.6)
colorator (~> 0.1)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-coffeescript (1.0.1)
coffee-script (~> 2.2)
jekyll-feed (0.5.1)
jekyll-gist (1.4.0)
octokit (~> 4.2)
jekyll-github-metadata (1.11.1)
octokit (~> 4.0)
jekyll-mentions (1.1.2)
html-pipeline (~> 2.3)
jekyll (~> 3.0)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.10.0)
jekyll (>= 2.0)
jekyll-sass-converter (1.3.0)
sass (~> 3.2)
jekyll-seo-tag (1.4.0)
jekyll (~> 3.0)
jekyll-sitemap (0.10.0)
jekyll-watch (1.4.0)
listen (~> 3.0, < 3.1)
jemoji (0.6.2)
gemoji (~> 2.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0)
json (1.8.3)
kramdown (1.10.0)
liquid (3.0.6)
listen (3.0.6)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9.7)
mercenary (0.3.6)
mini_portile2 (2.0.0)
minitest (5.9.0)
multipart-post (2.0.0)
net-dns (0.8.0)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
nokogiri (1.6.7.2-x86-mingw32)
mini_portile2 (~> 2.0.0.rc2)
octokit (4.3.0)
sawyer (~> 0.7.0, >= 0.5.3)
public_suffix (1.5.3)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rouge (1.10.1)
safe_yaml (1.0.4)
sass (3.4.22)
sawyer (0.7.0)
addressable (>= 2.3.5, < 2.5)
faraday (~> 0.8, < 0.10)
terminal-table (1.5.2)
thread_safe (0.3.5)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)

PLATFORMS
ruby
x86-mingw32

DEPENDENCIES
github-pages

BUNDLED WITH
1.12.5
17 changes: 17 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Site settings
title: Tableau Server Client Library (Python)
email: github@tableau.com
description: Simplify interactions with the Tableau Server REST API.
baseurl: "/server-client-python"
permalinks: pretty
defaults:
-
scope:
path: "" # Apply to all files
values:
layout: "default"

# Build settings
markdown: kramdown
highlighter: rouge

31 changes: 31 additions & 0 deletions docs/_includes/docs_menu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<div class="well docs-menu col-xs-12 col-sm-4 col-md-3">
<ul class="nav nav-list">
<li>
<a href="{{ site.baseurl }}/docs">Get Started</a>
</li>
<li>
<a href="{{ site.baseurl }}/docs/sign-in-out">Sign In and Out</a>
</li>
<li>
<a href="{{ site.baseurl }}/docs/versions">Versions</a>
</li>
<li>
<a href="{{ site.baseurl }}/docs/page-through-results">Page through Results</a>
</li>
<li>
<a href="{{ site.baseurl }}/docs/populate-connections-views">Populate Connections and Views</a>
</li>
<li>
<a href="{{ site.baseurl }}/docs/filter-sort">Filter and Sort</a>
</li>
<li>
<a href="{{ site.baseurl }}/docs/samples">Samples</a>
</li>
<li>
<a href="{{ site.baseurl }}/docs/api-ref">API Reference</a>
</li>
<li>
<a href="{{ site.baseurl }}/docs/dev-guide">Developer Guide</a>
</li>
</ul>
</div>
8 changes: 8 additions & 0 deletions docs/_includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!-- Footer -->
<footer>
<div class="row">
<hr class="footer-hr">
<p>This site is open source. Suggestions and pull requests are welcome on our <a href="https://github.com/tableau/server-client-python">GitHub page</a>.</p>
<p>&copy; 2016 Tableau.</p>
</div>
</footer>
15 changes: 15 additions & 0 deletions docs/_includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">

<link rel="shortcut icon" type="image/png" href="{{ site.baseurl }}/assets/logo.png">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css">
<link rel="stylesheet" href="{{ site.baseurl }}/css/github-highlight.css">

<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
29 changes: 29 additions & 0 deletions docs/_includes/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<header class="site-header">
<div class="wrapper">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand navbar-brand-logo" href="{{ site.baseurl }}/#">Tableau Server Client (Python)</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="{{ site.baseurl }}/docs/">Docs</a></li>
<li><a href="{{ site.baseurl }}/docs/api-ref">API Reference</a></li>
<li><a target="_blank" href="https://community.tableau.com/community/developers/content">Forum</a></li>
<!-- <li><a href="{{ site.baseurl }}/news/">What's New?</a></li> -->
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="tableauIcon"><a target="_blank" href="http://tableau.com"><img src="{{ site.baseurl }}/assets/logo.png" alt="Tableau Developers" class="logo" /></a></li>
<li><a target="_blank" href="https://github.com/tableau/server-client-python"><span class="icon icon--github" title="Tableau Server Client on GitHub" alt="Tableau Server Client on GitHub">{% include icon-github.svg %}</span></a></li>
</ul>
</div>
</div>
</nav>
</div>
</header>
1 change: 1 addition & 0 deletions docs/_includes/icon-github.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>

<head>
{% include head.html %}
</head>

<body>
<div class="container">
{% include header.html %}
<ul class="blogul">
{% for post in site.posts %}
<div class="row">
<h1>{{ post.title }}</h1>
<hr>
<p><span class="glyphicon glyphicon-time"></span> Posted on {{ post.date | date: "%-d %B %Y" }}</p>
<hr>
<p class="lead">
{{ post.abstract }}
</p>
{% if post.photoname %}
<img class="img-responsive" src="{{ site.baseurl }}/assets/{{ post.photoname}}" alt=""> {% endif %}
<hr>
<div class="blog-content">
{{ post.content }}
</div>
</div>
{% endfor %}
</ul>
{% include footer.html %}
</div>
</body>

</html>
31 changes: 31 additions & 0 deletions docs/_layouts/docs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
layout: docs
---

<!DOCTYPE html>
<html>

<head>
{% include head.html %}
</head>

<body>
<div class="container">
{% include header.html %}
{% include docs_menu.html %}

<div class="content .col-xs-12 .col-sm-8 .col-md-9">
<h1>{{ page.title }}</h1>
<div class="edit-container">
<a href="https://github.com/tableau/server-client-python/edit/master/docs/{{ page.path }}" class="edit-links"><span class="glyphicon glyphicon-pencil"></span> Edit this page</a>
&nbsp;
<a href="https://github.com/tableau/server-client-python/issues" class="edit-links"><span class="glyphicon glyphicon-flag"></span> Submit an issue</a>
</div>
<br />
{{ content }}
{% include footer.html %}
</div>
</div>
</body>

</html>
19 changes: 19 additions & 0 deletions docs/_layouts/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
layout: home
---
<!DOCTYPE html>
<html>

<head>
{% include head.html %}
</head>

<body>
<div class="container">
{% include header.html %}
{{ content }}
{% include footer.html %}
</div>
</body>

</html>
Binary file added docs/assets/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 78b9684

Please sign in to comment.