dynalist 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5288d5e7d1b03c29e1734a75752ce28adef262bbecff28c13005b60b488bdca6
4
- data.tar.gz: b670d8d8c3010fa1d4f198ea5fadbae4b37d8c7227457fe4bfac3d2a62fb7286
3
+ metadata.gz: f2b29ad34ed2fc6381a7e824f8d4aa089b3d6debc2651854948c42b1517fb5b3
4
+ data.tar.gz: dbcbf2523a2739dc332f6a02f7f98abd91d3c152855d407eee825177cc49a6fd
5
5
  SHA512:
6
- metadata.gz: 8ae32352a15314846171fcd409ebb129bb1cf663b57b2280af7327064976084bb918704c01723158876b2dd3993f92abf97faa0a6c0060e627cb6d9bbe942c7b
7
- data.tar.gz: 0e721921aaeee8dcaf8bac1b6ee8774e377b7aede8f79571f2badabc91d8fc3bbb9d6e55e3666af85f5db941e96d427b139cda1d4e819acd5506d24df08efa9c
6
+ metadata.gz: 0d8447fb178c0b2f9de886d242f7f728b2eecab8574f6b6279c1556af6bd1f63d97b635b47099ad526a5fa2160004bc6f70b89218cc3783e4c153f3e5de6f2e0
7
+ data.tar.gz: 717bc6e7e1baa495f06abeb6ce9634e2bc5717a2c2a795d8a76440b239c7e5bf4e4b88a3259ad56cdf0ff15d14cb05e68ccea27136dd5c377bd8f4f425eed945
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dynalist (1.0.1)
4
+ dynalist (1.0.2)
5
5
  faraday
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,12 +1,11 @@
1
1
  # Dynalist
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/dynalist`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Dynalist is outlining app. there can write as tree structure and simply to control your ideas.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ This is dynalist api client gem. support dynalist api version 1. [Api document](https://apidocs.dynalist.io/)
6
6
 
7
7
  ## Installation
8
8
 
9
- Add this line to your application's Gemfile:
10
9
 
11
10
  ```ruby
12
11
  gem 'dynalist'
@@ -22,7 +21,80 @@ Or install it yourself as:
22
21
 
23
22
  ## Usage
24
23
 
25
- TODO: Write usage instructions here
24
+ ### setup
25
+
26
+ ### File-level Api
27
+
28
+ #### Access to file information
29
+
30
+ File information store FileTree class. FileTree find file to use find_by, where.
31
+
32
+ ```
33
+ # Get files information.
34
+ FileApiClient.get_files
35
+
36
+ document = FileTree.where(title: 'document')
37
+ # => [#<Document: ... title: 'document'>]
38
+
39
+ folder = FileTree.find_by(title: 'diary')
40
+ # => [#<Folder: ... title: 'diary'>]
41
+ ```
42
+
43
+ #### Update files
44
+
45
+ Edit query update document or folder title.
46
+ Move query change to file move down parent folder.
47
+
48
+ Update succeeded when return true, and failed return false.
49
+
50
+ ```
51
+ queries = [
52
+ FileApiClient::Edit.new(document, 'new_doument_title'),
53
+ FileApiClient::Move.new(document, folder)
54
+ ]
55
+
56
+ FileApiClient.new.move_file(queries)
57
+ # => [true, true]
58
+ ```
59
+
60
+ ### Document-level Api
61
+
62
+ #### Get information
63
+
64
+ Document information access read method, and stored NodeTree class. NodeTree have find_by and where class.
65
+
66
+ ```
67
+ NodeApiClient.new.read(document)
68
+ nodes = NodeTree.where(context: ['context01', 'some message'])
69
+ ```
70
+
71
+ ### Check update
72
+
73
+ Check document update versions.
74
+
75
+ ```
76
+ NodeApiClient.new.check_updates([document])
77
+ # => [document_id_01: 12, document_id_02: 32]
78
+ ```
79
+
80
+ ### Update document
81
+
82
+ Support Insert, Move, Edit, Delete queries.
83
+ Return new node ids.
84
+
85
+ ```
86
+ insert_node = Node.new(context: 'new message')
87
+
88
+ queries = [
89
+ NodeApiClient::Insert.new(root_node, insert_node),
90
+ NodeApiClient::Move.new(root_node, move_node),
91
+ NodeApiClient::Edit.new(edit_node),
92
+ NodeApiClient::Delete.new(delete_node)
93
+ ]
94
+
95
+ NodeApiClient.new.edit(document, queries)
96
+ # => ['insert_node_id']
97
+ ```
26
98
 
27
99
  ## Development
28
100
 
@@ -32,7 +104,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
104
 
33
105
  ## Contributing
34
106
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/dynalist. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
107
+ 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](http://contributor-covenant.org) code of conduct.
36
108
 
37
109
  ## License
38
110
 
@@ -40,4 +112,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
40
112
 
41
113
  ## Code of Conduct
42
114
 
43
- Everyone interacting in the Dynalist project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/dynalist/blob/master/CODE_OF_CONDUCT.md).
115
+ Everyone interacting in the Dynalist project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/4geru/dynalist/blob/master/CODE_OF_CONDUCT.md).
@@ -1,3 +1,3 @@
1
1
  module Dynalist
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynalist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - 4geru