Skip to content

Commit

Permalink
#1 documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
josuebrunel committed Aug 16, 2014
1 parent ca1c22b commit d9b5371
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,83 @@ lokingYQL
=========

LokingYQL is a Yahoo Query Language Wrapper written in Python

version
=======

0.5

installation
============

Surely through ***pipe*** or something like

```shell
$ python setup.py install
```

how to use
==========

```python
>>> import lokingyql
>>> yql = lokingyql.LokingYQL()
>>> yql.diagnostics = True # To turn diagnostics on
```

#
Methods
-------

* use()
-------

Changes the data provider

```python
>>> yql.use('http://myserver.com/mytables.xml')
```


* rawQuery()
------------

Allows you to directly type your query

```python
>>> response = yql.rawQuery("select * from geo.countries where place='North America'")
>>> # deal with the response
```

* select(table, fields).where(filters, ...)
-----------------------

Select a table i.e *weather.forecast*.
If *table* not provided, it will use the default table. If there's no such thing as a default table, it will raise a *NoTableSelectedError*

```python
>>> response = yql.select('geo.countries', [name, code, woeid]).where(['name', '=', 'Canada'])
>>> response.json()
{u'query': {u'count': 1, u'lang': u'en-US', u'results': {u'place': {u'woeid': u'23424775', u'name': u'Canada'}}, u'created': u'2014-08-16T19:04:08Z'}}
>>> ...
```

* create()
----------

* insert()
----------

* update()
----------

* delete()
----------

Voila






0 comments on commit d9b5371

Please sign in to comment.