diff --git a/docs/table.md b/docs/table.md index ae8381b..192208b 100644 --- a/docs/table.md +++ b/docs/table.md @@ -1 +1,41 @@ -##OpenTable +YQL Open Table +============== + +## Table + +This class represents the **root** element of a YQL Table Definition File. You can read about the full documentation [here](https://developer.yahoo.com/yql/guide/yql-opentables-reference.html#yql-opentables-tables-element) + +```python +def __init__(self, name, author, apiKeyURL, documentationURL, sampleQuery=[], description=None, table_attr=None, bindings=[]) +``` + +```python +>>> from myql.contrib.table import Table +>>> mytable = Table('mytable', 'Josue Kouka', 'http://josuerunel.org/mytable/','http://josuerunel.org/mytable/docs.html',sampleQuery = ['SELECT * FROM mytable', 'SELECT name FROM mytable WHERE id = 77'], description='Just a simple tabe', table_attr={'xmlns':'http://query.yahooapis.com/v1/schema/table.xsd', 'securityLevel':'any', 'https':'false'}) +``` + +####Table.addBinder(binder_object) +Add a binder to the table +```python +>>> mytable.addBinder(select_binder) +``` +####Table.removeBinder(binder_object) +Remove a binder from the table +```python +>>> mytable.removeBinder(select_binder) +``` +####Table.save(name=None, path=None) +Save the table as a *xml file* with Table Object name if *name* is not provided. If *path*, saves the *xml file* to the specified location +```python +>>> mytable.save(name='test',path='/var/www/josuebrunel.org/mytable/') +``` + +## Binder + +## Inputs + +## Paging + + + + diff --git a/mkdocs.yml b/mkdocs.yml index 3bd74ac..43f7214 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: myql +site_name: MYQL pages: - [index.md, Home] - [table.md, OpenTable] diff --git a/myql/contrib/table/exceptions.py b/myql/contrib/table/exceptions.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/myql/contrib/table/exceptions.py @@ -0,0 +1 @@ +