storyblok 2.0.3 → 2.0.4
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 +4 -4
- data/examples/example_queries.rb +2 -1
- data/lib/storyblok/client.rb +11 -1
- data/lib/storyblok/version.rb +1 -1
- data/storyblok-2.0.3.gem +0 -0
- metadata +3 -3
- data/storyblok-2.0.2.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c997a24b49f1144f4c6a4fef322cd10328627a4063bade8ac8fc8f5c73b352fa
|
|
4
|
+
data.tar.gz: 155cff879f86f38ce3181e0053ee907ccb23afa2b08064427b5d21c8ace3a08d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2820713268b897df31fc3705e5fef177f40719b7729ae3f1a2daed9f158220906834d3c875376daf1e6ddfe746dc190f3347987e6f088c7f17377fa4b5ab5e6
|
|
7
|
+
data.tar.gz: 36a26ab2e9c1ec77fbd187f1b6e05c7fadde46c21d6c2a4e8afbb99fb27b1281f31aaa876f74ce1d9f07f31f3ee722e87c4c2fc4ae55ecedf5a05b350b2a5d9e
|
data/examples/example_queries.rb
CHANGED
|
@@ -5,12 +5,13 @@ require 'storyblok'
|
|
|
5
5
|
logger = Logger.new(STDOUT)
|
|
6
6
|
|
|
7
7
|
client = Storyblok::Client.new(
|
|
8
|
-
token: '
|
|
8
|
+
token: 'FtyUE8zLpZox3ptNYz3dgQtt',
|
|
9
9
|
api_url: 'localhost:3001',
|
|
10
10
|
secure: false,
|
|
11
11
|
logger: logger
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
p client.datasources
|
|
14
15
|
p client.stories(starts_with: 'en/news')
|
|
15
16
|
p client.story('demo1')
|
|
16
17
|
p client.datasource_entries(datasource: 'labels', per_page: 10)
|
data/lib/storyblok/client.rb
CHANGED
|
@@ -41,6 +41,16 @@ module Storyblok
|
|
|
41
41
|
setup_logger
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
# Dynamic cdn endpoint call
|
|
45
|
+
#
|
|
46
|
+
# @param [String] id
|
|
47
|
+
# @param [Hash] query
|
|
48
|
+
#
|
|
49
|
+
# @return [Hash]
|
|
50
|
+
def get_from_cdn(slug, query = {}, id = nil)
|
|
51
|
+
Request.new(self, "/cdn/#{slug}", query, id).get
|
|
52
|
+
end
|
|
53
|
+
|
|
44
54
|
# Gets the space info
|
|
45
55
|
#
|
|
46
56
|
# @param [Hash] query
|
|
@@ -208,7 +218,7 @@ module Storyblok
|
|
|
208
218
|
|
|
209
219
|
# Patches a query hash with the client configurations for queries
|
|
210
220
|
def request_query(query)
|
|
211
|
-
query[:token] = configuration[:token]
|
|
221
|
+
query[:token] = configuration[:token] if query[:token].nil?
|
|
212
222
|
query[:version] = configuration[:version] if query[:version].nil?
|
|
213
223
|
query[:cv] = configuration[:cache_version] if query[:cache_version].nil?
|
|
214
224
|
query
|
data/lib/storyblok/version.rb
CHANGED
data/storyblok-2.0.3.gem
ADDED
|
Binary file
|
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.4
|
|
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-07-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|
|
@@ -82,7 +82,7 @@ files:
|
|
|
82
82
|
- lib/storyblok/links.rb
|
|
83
83
|
- lib/storyblok/request.rb
|
|
84
84
|
- lib/storyblok/version.rb
|
|
85
|
-
- storyblok-2.0.
|
|
85
|
+
- storyblok-2.0.3.gem
|
|
86
86
|
- storyblok.gemspec
|
|
87
87
|
homepage: https://github.com/storyblok/storyblok-ruby
|
|
88
88
|
licenses:
|
data/storyblok-2.0.2.gem
DELETED
|
Binary file
|