Skip to content

Commit

Permalink
#1: updating documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
josuebrunel committed Aug 20, 2015
1 parent 1898659 commit d065e10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ Allows you to directly type your query
```


####select(table, fields, limit).where(filters, ...)
####select(table, fields, limit, **kwargs).where(filters, ...)

***NB*** : A simple select doesn't return any data. Use ***GET*** instead.

Expand Down Expand Up @@ -283,7 +283,7 @@ Allows you to directly type your query
>>>
```

####get(table, fields, limit)
####get(table, fields, limit, **kwargs)
Same as ***SELECT***, but instead returns data.

**REMINDER** : Some tables require a **where clause**, therefore ***GET*** won't work on those tables, use *select(...).where(...)* instead .
Expand Down
23 changes: 6 additions & 17 deletions docs/myql.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,27 @@ MYQL

### **Methods**

#### *MYQL.payloadBuilder(query, format='json')*
#### *MYQL.payload_builder(query, format='json')*

Return a dictionary of parameters

* ***query*** : the YQL Query
* ***format*** : xml or json

#### *MQYL.executeQuery(payload)*
#### *MQYL.execute_query(payload)*

Execute the query and returns and response

* ***payload*** : Dict of parameters


#### *MYQL.rawQuery(query, format=None, pretty=False)*
#### *MYQL.raw_query(query, format=None, pretty=False)*

Call *payloadBuilder* to build paramaters and *executeQuery* to execute que *query* then return a response.

* ***query*** : the YQL Query
* ***format*** : xml or json

#### *MYQL.clauseFormatter(condition)*

Formats conditions.

* ***condition*** : list of ['column', 'operator', 'value']
```python
cond = ['yid', '=', 'josue_brunel']
```


#### *MQYL.use(yql_table_url, name=yql_table_name)*

Change the service provider
Expand All @@ -62,14 +52,13 @@ Set variable to use in your YQL statement
>>> states = yql.select('geo.states', remote_filter=(5,)).where(['place', '=', '@home'])
```

#### *MQYL.desc(table=None)*
#### *MQYL.desc(table)*

Get the description of a table.
If no table name is provided, the **self.table** will be used.

* ***table*** : Table name

#### *MQYL.get(table=None, items=[], limit=None)*
#### *MQYL.get(table, items=[], limit=None, **kwargs)*

Get **items** from **table**.

Expand All @@ -78,7 +67,7 @@ Get **items** from **table**.
* ***limit*** : limit of element to fetch


#### *MQYL.select(table=None, items=[], limit=None)*
#### *MQYL.select(table, items=[], limit=None, **kwargs)*
This method is always followed by a **where**. It doesn't return a response if called alone.

* ***table*** : Table name
Expand Down

0 comments on commit d065e10

Please sign in to comment.