Skip to content

Commit

Permalink
#1 : OpenTable Table Doc OK
Browse files Browse the repository at this point in the history
  • Loading branch information
josuebrunel committed Apr 28, 2015
1 parent 399cda6 commit 05bed3f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
42 changes: 41 additions & 1 deletion docs/table.md
Original file line number Diff line number Diff line change
@@ -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




2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
site_name: myql
site_name: MYQL
pages:
- [index.md, Home]
- [table.md, OpenTable]
Expand Down
1 change: 1 addition & 0 deletions myql/contrib/table/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit 05bed3f

Please sign in to comment.