coda_docs 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/coda_docs/entities/columns.rb +3 -3
- data/lib/coda_docs/entities/controls.rb +3 -3
- data/lib/coda_docs/entities/docs.rb +6 -17
- data/lib/coda_docs/entities/formulas.rb +3 -3
- data/lib/coda_docs/entities/miscellaneous.rb +1 -1
- data/lib/coda_docs/entities/pages.rb +3 -8
- data/lib/coda_docs/entities/rows.rb +4 -4
- data/lib/coda_docs/entities/tables.rb +3 -3
- data/lib/coda_docs/version.rb +1 -1
- metadata +1 -2
- data/lib/coda_docs/entities/folders.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6c86d0f9b3f01c8d4c676832e3d3184f0d5574beb7718d58a2a8fd92f8226ac
|
4
|
+
data.tar.gz: 6df83a22d5323097e7403af15b54105cd9823e8e69ffd9476ecc1a6456ee4f62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e50493d68a522e10bbe4b59ed0333506ae25dc81d4548bc842a97a1ac9b4de7900bc0701d7d03985ad13a94862366272abf154e3d960a7ae8db7f9438e6d8474
|
7
|
+
data.tar.gz: 40f00dd2fcd119e05cded8bdb80475b0674812ae88afebaa8c197ed12baf82c0dbe045b60956039351108e49b1f83028ff300f3ea90c20213c47030cefeeb05a
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
module CodaDocs
|
2
2
|
module Entities
|
3
3
|
class Columns < Entity
|
4
|
-
def all(doc_id
|
5
|
-
response = connection.get("/docs/#{doc_id}/tables/#{table_id}/columns")
|
4
|
+
def all(doc_id, table_id, options = nil)
|
5
|
+
response = connection.get("/docs/#{doc_id}/tables/#{table_id}/columns", query: options)
|
6
6
|
parse_response(response)
|
7
7
|
end
|
8
8
|
|
9
|
-
def find(doc_id
|
9
|
+
def find(doc_id, table_id, column_id)
|
10
10
|
connection.get("/docs/#{doc_id}/tables/#{table_id}/columns/#{column_id}")
|
11
11
|
end
|
12
12
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module CodaDocs
|
2
2
|
module Entities
|
3
3
|
class Controls < Entity
|
4
|
-
def all(doc_id)
|
5
|
-
response = connection.get("/docs/#{doc_id}/controls")
|
4
|
+
def all(doc_id, options = nil)
|
5
|
+
response = connection.get("/docs/#{doc_id}/controls", query: options)
|
6
6
|
parse_response(response)
|
7
7
|
end
|
8
8
|
|
9
|
-
def find(doc_id
|
9
|
+
def find(doc_id, control_id)
|
10
10
|
connection.get("/docs/#{doc_id}/controls/#{control_id}")
|
11
11
|
end
|
12
12
|
end
|
@@ -10,36 +10,25 @@ module CodaDocs
|
|
10
10
|
connection.get("/docs/#{doc_id}")
|
11
11
|
end
|
12
12
|
|
13
|
-
def create(
|
13
|
+
def create(options)
|
14
14
|
connection.post(
|
15
15
|
'/docs',
|
16
|
-
body:
|
17
|
-
title: title,
|
18
|
-
sourceDoc: source_doc,
|
19
|
-
timezone: timezone,
|
20
|
-
folderId: folder_id
|
21
|
-
}.to_json
|
16
|
+
body: options.to_json
|
22
17
|
)
|
23
18
|
end
|
24
19
|
|
25
|
-
def delete(doc_id
|
20
|
+
def delete(doc_id)
|
26
21
|
connection.delete("/docs/#{doc_id}")
|
27
22
|
end
|
28
23
|
|
29
|
-
def publish(doc_id
|
24
|
+
def publish(doc_id, options)
|
30
25
|
connection.put(
|
31
26
|
"/docs/#{doc_id}/publish",
|
32
|
-
body:
|
33
|
-
slug: slug,
|
34
|
-
discoverable: discoverable,
|
35
|
-
earnCredit: earn_credit,
|
36
|
-
categoryNames: category_names,
|
37
|
-
mode: mode
|
38
|
-
}.to_json
|
27
|
+
body: options.to_json
|
39
28
|
)
|
40
29
|
end
|
41
30
|
|
42
|
-
def unpublish(doc_id
|
31
|
+
def unpublish(doc_id)
|
43
32
|
connection.delete("/docs/#{doc_id}/publish")
|
44
33
|
end
|
45
34
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
module CodaDocs
|
2
2
|
module Entities
|
3
3
|
class Formulas < Entity
|
4
|
-
def all(doc_id)
|
4
|
+
def all(doc_id, options = nil)
|
5
5
|
response = connection.get("/docs/#{doc_id}/formulas", query: options)
|
6
6
|
parse_response(response)
|
7
7
|
end
|
8
8
|
|
9
|
-
def find(doc_id
|
10
|
-
connection.get("/docs/#{doc_id}/formulas/#{formula_id}"
|
9
|
+
def find(doc_id, formula_id)
|
10
|
+
connection.get("/docs/#{doc_id}/formulas/#{formula_id}")
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module CodaDocs
|
2
2
|
module Entities
|
3
3
|
class Miscellaneous < Entity
|
4
|
-
def resolve_browser_link(url
|
4
|
+
def resolve_browser_link(url, degrade_gracefully = true)
|
5
5
|
connection.get('/resolveBrowserLink', query: { url: url, degradeGracefully: degrade_gracefully })
|
6
6
|
end
|
7
7
|
end
|
@@ -6,19 +6,14 @@ module CodaDocs
|
|
6
6
|
parse_response(response)
|
7
7
|
end
|
8
8
|
|
9
|
-
def find(doc_id
|
9
|
+
def find(doc_id, page_id, options = nil)
|
10
10
|
connection.get("/docs/#{doc_id}/pages/#{page_id}", query: options)
|
11
11
|
end
|
12
12
|
|
13
|
-
def update(doc_id
|
13
|
+
def update(doc_id, page_id, options)
|
14
14
|
connection.put(
|
15
15
|
"/docs/#{doc_id}/pages/#{page_id}",
|
16
|
-
body:
|
17
|
-
name: name,
|
18
|
-
subtitle: subtitle,
|
19
|
-
iconName: icon_name,
|
20
|
-
imageUrl: image_url
|
21
|
-
}.to_json
|
16
|
+
body: options.to_json
|
22
17
|
)
|
23
18
|
end
|
24
19
|
end
|
@@ -1,16 +1,16 @@
|
|
1
1
|
module CodaDocs
|
2
2
|
module Entities
|
3
3
|
class Rows < Entity
|
4
|
-
def all(doc_id
|
5
|
-
response = connection.get("/docs/#{doc_id}/tables/#{table_id}/rows")
|
4
|
+
def all(doc_id, table_id, options = nil)
|
5
|
+
response = connection.get("/docs/#{doc_id}/tables/#{table_id}/rows", query: options)
|
6
6
|
parse_response(response)
|
7
7
|
end
|
8
8
|
|
9
|
-
def find(doc_id
|
9
|
+
def find(doc_id, table_id, row_id)
|
10
10
|
connection.get("/docs/#{doc_id}/tables/#{table_id}/rows/#{row_id}")
|
11
11
|
end
|
12
12
|
|
13
|
-
def delete(doc_id
|
13
|
+
def delete(doc_id, table_id, row_id)
|
14
14
|
connection.delete("/docs/#{doc_id}/tables/#{table_id}/rows/#{row_id}")
|
15
15
|
end
|
16
16
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module CodaDocs
|
2
2
|
module Entities
|
3
3
|
class Tables < Entity
|
4
|
-
def all(doc_id)
|
5
|
-
response = connection.get("/docs/#{doc_id}/tables")
|
4
|
+
def all(doc_id, options = nil)
|
5
|
+
response = connection.get("/docs/#{doc_id}/tables", query: options)
|
6
6
|
parse_response(response)
|
7
7
|
end
|
8
8
|
|
9
|
-
def find(doc_id
|
9
|
+
def find(doc_id, table_id)
|
10
10
|
connection.get("/docs/#{doc_id}/tables/#{table_id}")
|
11
11
|
end
|
12
12
|
end
|
data/lib/coda_docs/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coda_docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Muñoz
|
@@ -151,7 +151,6 @@ files:
|
|
151
151
|
- lib/coda_docs/entities/controls.rb
|
152
152
|
- lib/coda_docs/entities/docs.rb
|
153
153
|
- lib/coda_docs/entities/entity.rb
|
154
|
-
- lib/coda_docs/entities/folders.rb
|
155
154
|
- lib/coda_docs/entities/formulas.rb
|
156
155
|
- lib/coda_docs/entities/miscellaneous.rb
|
157
156
|
- lib/coda_docs/entities/pages.rb
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module CodaDocs
|
2
|
-
module Entities
|
3
|
-
class Folders < Entity
|
4
|
-
def all(doc_id)
|
5
|
-
response = connection.get("/docs/#{doc_id}/folders", query: options)
|
6
|
-
parse_response(response)
|
7
|
-
end
|
8
|
-
|
9
|
-
def find(doc_id:, folder_id:)
|
10
|
-
connection.get("/docs/#{doc_id}/folders/#{folder_id}", query: options)
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|