Dynalist is outlining app. there can write as tree structure and simply to control your ideas.
This is dynalist api client gem. support dynalist api version 1. Api document
gem 'dynalist'And then execute:
$ bundle
Or install it yourself as:
$ gem install dynalist
File information store FileTree class. FileTree find file to use find_by, where.
# Get files information.
FileApiClient.get_files
document = FileTree.where(title: 'document')
# => [#<Document: ... title: 'document'>]
folder = FileTree.find_by(title: 'diary')
# => [#<Folder: ... title: 'diary'>]
Edit query update document or folder title. Move query change to file move down parent folder.
Update succeeded when return true, and failed return false.
queries = [
FileApiClient::Edit.new(document, 'new_doument_title'),
FileApiClient::Move.new(document, folder)
]
FileApiClient.new.move_file(queries)
# => [true, true]
Document information access read method, and stored NodeTree class. NodeTree have find_by and where class.
NodeApiClient.new.read(document)
nodes = NodeTree.where(context: ['context01', 'some message'])
Check document update versions.
NodeApiClient.new.check_updates([document])
# => [document_id_01: 12, document_id_02: 32]
Support Insert, Move, Edit, Delete queries. Return new node ids.
insert_node = Node.new(context: 'new message')
queries = [
NodeApiClient::Insert.new(root_node, insert_node),
NodeApiClient::Move.new(root_node, move_node),
NodeApiClient::Edit.new(edit_node),
NodeApiClient::Delete.new(delete_node)
]
NodeApiClient.new.edit(document, queries)
# => ['insert_node_id']
After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/4geru/dynalist. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Dynalist project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.