Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 947e4e7

Browse files
committed
updated readme
1 parent 455017b commit 947e4e7

File tree

1 file changed

+54
-3
lines changed

1 file changed

+54
-3
lines changed

readme.md

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Cloudant.py [![Build Status](https://travis-ci.org/cloudant-labs/cloudant-python.png)](https://travis-ci.org/cloudant-labs/cloudant-python) [![Coverage Status](https://coveralls.io/repos/cloudant-labs/cloudant-python/badge.png)](https://coveralls.io/r/cloudant-labs/cloudant-python) [![PyPi version](https://pypip.in/v/cloudant/badge.png)](https://crate.io/packages/cloudant/) [![PyPi downloads](https://pypip.in/d/cloudant/badge.png)](https://crate.io/packages/cloudant/)
22

3+
[wiki]: http://en.wikipedia.org/wiki/Cloudant.py_(furniture\)
4+
[wiki_img]: http://upload.wikimedia.org/wikipedia/commons/e/ea/FrancisLevettLiotard.jpg
5+
36
An effortless Cloudant / CouchDB interface for Python.
47

58
## Install
@@ -124,9 +127,13 @@ If you use one object to create another, the child will inherit the parents' set
124127
- [Document.attachment](#Document.attachment)
125128
- [Document.delete](#Document.delete)
126129
- [Document.get](#Document.get)
130+
- [Document.index](#Document.index)
131+
- [Document.list](#Document.list)
127132
- [Document.merge](#Document.merge)
128133
- [Document.post](#Document.post)
129134
- [Document.put](#Document.put)
135+
- [Document.search](#Document.search)
136+
- [Document.show](#Document.show)
130137
- [Document.view](#Document.view)
131138
- [View](#View)
132139
- [View.delete](#View.delete)
@@ -345,6 +352,28 @@ Delete the given revision of the current document. For example:
345352
Make a GET request against the object's URI joined
346353
with `path`. `kwargs` are passed directly to Requests.
347354

355+
<a name="Document.index"></a>
356+
#### Document.index(function, **kwargs)
357+
358+
Create a `View` object referencing the secondary index at `_view/{function}`. For example:
359+
360+
view = doc.index('index-name')
361+
# refers to /DB/_design/DOC/_view/index-name
362+
363+
For more on secondary indices, see
364+
[Querying a View](http://docs.cloudant.com/api/design-documents-querying-views.html#querying-a-view)
365+
366+
<a name="Document.list"></a>
367+
#### Document.list(function, index, **kwargs)
368+
369+
Make a GET request to the list function at `_list/{function}/{index}`. For example:
370+
371+
future = doc.list('list-name', 'index-name')
372+
# refers to /DB/_design/DOC/_list/list-name/index-name
373+
374+
For more details on list functions, see
375+
[Querying List Functions](http://docs.cloudant.com/api/design-documents-shows-lists.html#querying-list-functions).
376+
348377
<a name="Document.merge"></a>
349378
#### Document.merge(change, **kwargs)
350379

@@ -371,12 +400,34 @@ with `path`.
371400
passed to Requests. If you want to indicate the message
372401
body without it being modified, use `kwargs['data']`.
373402

403+
<a name="Document.search"></a>
404+
#### Document.search(function, **kwargs)
405+
406+
Creates a `View` object referencing the search index at `_search/{function}`. For example:
407+
408+
view = doc.search('index-name')
409+
# refers to /DB/_design/DOC/_search/search-name
410+
411+
For more details on search indexes, see
412+
[Searching for documents using Lucene queries](http://docs.cloudant.com/api/search.html#searching-for-documents-using-lucene-queries)
413+
414+
<a name="Document.show"></a>
415+
#### Document.show(function, id, **kwargs)
416+
417+
Make a GET request to the show function at `_show/{function}/{id}`. For example:
418+
419+
future = doc.show('show-name', 'document-id')
420+
# refers to /DB/_design/DOC/_show/show-name/document-id
421+
422+
For more details on show functions, see
423+
[Querying Show Functions](http://docs.cloudant.com/api/design-documents-shows-lists.html#querying-show-functions).
424+
374425
<a name="Document.view"></a>
375-
#### Document.view(method, function, **kwargs)
426+
#### Document.view(path, **kwargs)
376427

377-
Create a `View` object by joining `method` and `function`. For example:
428+
Create a `View` object referencing the function at `path`. For example:
378429

379-
view = doc.view('_view', 'index-name')
430+
view = doc.view('_view/index-name')
380431
# refers to /DB/_design/DOC/_view/index-name
381432

382433
<a name="View"></a>

0 commit comments

Comments
 (0)