storyblok 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -2
- data/lib/storyblok/client.rb +9 -0
- data/lib/storyblok/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cc0af02e95e11ec5a5005961961ccf3be36a8528a62060f54635af5bf00c2eb
|
4
|
+
data.tar.gz: acd3f0941986cd28b4d042422307ef1fcaf306c0f4d6d56e3e57d2c4b1b1fecb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1eff69c57c58277c1f3b10043632eed1ce1996c4a18a81ca07827fedb8a2032dd1491158727fec777641cccb94e83e02ab6cf07e7c5381b67143d9c93b9fbee
|
7
|
+
data.tar.gz: 1c259a64bbac30f4bad1beef80a02845baa541eeae6dedb1b19ee4cb2afab93c563b4c5aa0578afc9c7125766f6c5bf3b2ccef0e932875906acb130cffe719ab
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ Storyblok::Client.new(version: 'draft')
|
|
19
19
|
Storyblok::Client.new(version: 'published')
|
20
20
|
```
|
21
21
|
|
22
|
-
### Load a
|
22
|
+
### Load a story
|
23
23
|
|
24
24
|
```ruby
|
25
25
|
# Without cache
|
@@ -34,7 +34,7 @@ client = Storyblok::Client.new(cache: cache, token: 'YOUR_TOKEN')
|
|
34
34
|
client.story('home')
|
35
35
|
```
|
36
36
|
|
37
|
-
### Load a list of
|
37
|
+
### Load a list of stories
|
38
38
|
|
39
39
|
```ruby
|
40
40
|
# Get all Stories that start with news
|
@@ -63,6 +63,12 @@ client.tags({
|
|
63
63
|
|
64
64
|
```
|
65
65
|
|
66
|
+
### Load a list of links
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
client.links
|
70
|
+
```
|
71
|
+
|
66
72
|
## Generate a navigation tree
|
67
73
|
|
68
74
|
```ruby
|
@@ -85,6 +91,12 @@ end
|
|
85
91
|
puts '</ul>'
|
86
92
|
```
|
87
93
|
|
94
|
+
### Get the space info
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
client.space
|
98
|
+
```
|
99
|
+
|
88
100
|
## How to flush the cache
|
89
101
|
|
90
102
|
Following an example of how to flush the client cache:
|
data/lib/storyblok/client.rb
CHANGED
@@ -41,6 +41,15 @@ module Storyblok
|
|
41
41
|
setup_logger
|
42
42
|
end
|
43
43
|
|
44
|
+
# Gets the space info
|
45
|
+
#
|
46
|
+
# @param [Hash] query
|
47
|
+
#
|
48
|
+
# @return [Hash]
|
49
|
+
def space(query = {})
|
50
|
+
Request.new(self, '/cdn/spaces/me', query).get
|
51
|
+
end
|
52
|
+
|
44
53
|
# Gets a collection of stories
|
45
54
|
#
|
46
55
|
# @param [Hash] query
|
data/lib/storyblok/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: storyblok
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Storyblok (Alexander Feiglstorfer)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -65,6 +65,7 @@ executables: []
|
|
65
65
|
extensions: []
|
66
66
|
extra_rdoc_files: []
|
67
67
|
files:
|
68
|
+
- ".DS_Store"
|
68
69
|
- ".editorconfig"
|
69
70
|
- ".gitignore"
|
70
71
|
- ".ruby-version"
|