diff --git a/README.md b/README.md index 5f8537f..19c446e 100755 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Yahoo! Query Language Documentation and Support * Authenticated YQL Query ( OAuth ) * StockScraper * YQL Open Table (Classes and Metaclasses) Generator +* Response prettyfier ### Installation @@ -60,6 +61,7 @@ Full Documentation is [here](http://myql.readthedocs.org/en/latest/) * Fixed format issue [#82](https://github.com/josuebrunel/myql/issues/82) * Added useful functions in utils [#81](https://github.com/josuebrunel/myql/issues/81) * Default access to community tables +* Response prettyfier : *pretty_json, pretty_xml* ##### v 1.2.1 ------ diff --git a/docs/index.md b/docs/index.md index 8d4f0cd..2c7f4ba 100644 --- a/docs/index.md +++ b/docs/index.md @@ -133,8 +133,9 @@ Same as ***SELECT***, but instead returns data. Insert values into a table. Arguments 2 and 3 may be **tuples** or **list**. ```python +>>> from myql.utils import pretty_json >>> response = yql.insert('yql.storage.admin',('value',),('http://josuebrunel.org',)) ->>> response.json() # result prettyfied just for the example +>>> print(pretty_json(response.content)) { "query": { "count": 1, @@ -155,8 +156,9 @@ Insert values into a table. Arguments 2 and 3 may be **tuples** or **list**. Update fields values. This method __is always followed by ***where()***__. Arguments 2 and 3 may be **tuples** or **list**. ```python +>>> from myql.utils import pretty_json >>> response = yql.update('yql.storage',('value',),('https://josuebrunel.org',)).where(['name','=','store://Rqb5fbQyDvrfHJiClWnZ6q']) ->>> response.json() # result prettyfied just for the example +>>> print(pretty_json(response.content)) { "query": { "count": 1, @@ -172,8 +174,9 @@ Update fields values. This method __is always followed by ***where()***__. Argum ####delete(table).where(filters, ...) Delete records ```python +>>> from myql.utils import pretty_json >>> response = self.yql.delete('yql.storage').where(['name','=','store://Rqb5fbQyDvrfHJiClWnZ6q']) ->>> response.json() # result prettyfied just for the example +>>> print(pretty_json(response.content)) { "query": { "count": 1,