Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alexandra Rogova
jio_mebibou
Commits
17015e67
Commit
17015e67
authored
Oct 12, 2012
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add allDocs examples to README.md
parent
3dc144e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
README.md
README.md
+13
-0
No files found.
README.md
View file @
17015e67
...
...
@@ -105,6 +105,8 @@ my_jio_instance.close(); // close this instance
Examples:
```
var jio = jIO.newJio({"type":"local","username":"myname","applicationname":"myappname"});
// jio.get (docid, options, callback)
jio.get ('myfile',{max_retry:3},function (err,val) {
if (err) {
console.error (err);
...
...
@@ -112,11 +114,22 @@ jio.get ('myfile',{max_retry:3},function (err,val) {
console.log (val.content);
}
});
// jio.put (doc, success, error)
jio.put ({_id:'myotherfile',content:'and his content'},function (val) {
console.log ('success');
},function (err) {
console.error (err);
});
// jio.allDocs (options, success, error)
jio.allDocs ({metadata_only:false},function (val) {
var i;
for (i=0; i < val.total_rows; i++) {
console.log ('Filename: ' + val.rows[i].id);
console.log ('Content: ' + val.rows[i].value.content);
}
}, function (err) {});
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment