From d065e10c05d630f145ffd84a76582097184dfbf1 Mon Sep 17 00:00:00 2001 From: Josue Kouka Date: Thu, 20 Aug 2015 15:13:59 +0200 Subject: [PATCH] #1: updating documentation --- docs/index.md | 4 ++-- docs/myql.md | 23 ++++++----------------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/docs/index.md b/docs/index.md index a5a7ca2..49ce8bd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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. @@ -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 . diff --git a/docs/myql.md b/docs/myql.md index 44e0009..3dc1ece 100644 --- a/docs/myql.md +++ b/docs/myql.md @@ -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 @@ -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**. @@ -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