contentstack 0.1.0 → 0.4.1
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/.gitignore +2 -1
- data/CHANGELOG.md +65 -0
- data/CODE_OF_CONDUCT.md +1 -2
- data/Gemfile +1 -5
- data/Gemfile.lock +55 -37
- data/LICENSE.txt +1 -1
- data/README.md +103 -17
- data/contentstack.gemspec +7 -5
- data/lib/contentstack.rb +4 -0
- data/lib/contentstack/api.rb +7 -2
- data/lib/contentstack/client.rb +24 -2
- data/lib/contentstack/content_type.rb +1 -1
- data/lib/contentstack/entry.rb +180 -2
- data/lib/contentstack/query.rb +27 -0
- data/lib/contentstack/sync_result.rb +30 -0
- data/lib/contentstack/version.rb +1 -1
- data/spec/content_type_spec.rb +5 -0
- data/spec/entry_spec.rb +74 -3
- data/spec/fixtures/category_content_type.json +1 -0
- data/spec/fixtures/category_entry.json +1 -1
- data/spec/fixtures/product_entry.json +1 -1
- data/spec/fixtures/sync_init.json +2975 -0
- data/spec/query_spec.rb +5 -0
- data/spec/spec_helper.rb +16 -3
- data/spec/sync_spec.rb +27 -0
- metadata +64 -43
data/lib/contentstack/client.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'contentstack/api'
|
2
2
|
require 'contentstack/content_type'
|
3
3
|
require 'contentstack/asset_collection'
|
4
|
-
|
4
|
+
require 'contentstack/sync_result'
|
5
5
|
module Contentstack
|
6
6
|
class Client
|
7
7
|
attr_reader :region, :host
|
@@ -11,7 +11,6 @@ module Contentstack
|
|
11
11
|
@host = options[:host].nil? ? get_default_region_hosts(@region) : options[:host]
|
12
12
|
API.init_api(api_key, delivery_token, environment, @host)
|
13
13
|
end
|
14
|
-
|
15
14
|
|
16
15
|
def content_types
|
17
16
|
ContentType.all
|
@@ -29,6 +28,29 @@ module Contentstack
|
|
29
28
|
Asset.new(uid)
|
30
29
|
end
|
31
30
|
|
31
|
+
|
32
|
+
# Syncs your Contentstack data with your app and ensures that the data is always up-to-date by providing delta updates
|
33
|
+
#
|
34
|
+
# Stack.sync({'init': true}) // For initializing sync
|
35
|
+
#
|
36
|
+
# Stack.sync({'init': true, 'locale': 'en-us'}) //For initializing sync with entries of a specific locale
|
37
|
+
#
|
38
|
+
# Stack.sync({'init': true, 'start_date': '2018-10-22'}) //For initializing sync with entries published after a specific date
|
39
|
+
#
|
40
|
+
# Stack.sync({'init': true, 'content_type_uid': 'session'}) //For initializing sync with entries of a specific content type
|
41
|
+
#
|
42
|
+
# Stack.sync({'init': true, 'type': 'entry_published'}) // Use the type parameter to get a specific type of content.Supports 'asset_published', 'entry_published', 'asset_unpublished', 'entry_unpublished', 'asset_deleted', 'entry_deleted', 'content_type_deleted'.
|
43
|
+
#
|
44
|
+
# Stack.sync({'pagination_token': '<btlsomething>'}) // For fetching the next batch of entries using pagination token
|
45
|
+
#
|
46
|
+
# Stack.sync({'sync_token': '<btlsomething>'}) // For performing subsequent sync after initial sync
|
47
|
+
#
|
48
|
+
# @param params [Hash] params is an object that supports ‘locale’, ‘start_date’, ‘content_type_uid’, and ‘type’ queries.
|
49
|
+
def sync(params)
|
50
|
+
sync_result = API.get_sync_items(params)
|
51
|
+
SyncResult.new(sync_result)
|
52
|
+
end
|
53
|
+
|
32
54
|
private
|
33
55
|
def get_default_region_hosts(region='us')
|
34
56
|
case region
|
data/lib/contentstack/entry.rb
CHANGED
@@ -2,14 +2,191 @@ require 'active_support/core_ext'
|
|
2
2
|
|
3
3
|
module Contentstack
|
4
4
|
class Entry
|
5
|
-
attr_reader :fields, :content_type, :uid, :owner
|
5
|
+
attr_reader :fields, :content_type, :uid, :owner, :query, :schema, :content_type
|
6
6
|
def initialize(attrs, content_type_uid=nil)
|
7
7
|
setup(attrs, content_type_uid)
|
8
8
|
end
|
9
9
|
|
10
|
+
# Get entries from the specified locale.
|
11
|
+
#
|
12
|
+
# @param [String] code The locale code of the entry
|
13
|
+
#
|
14
|
+
# Example
|
15
|
+
# @entry = @stack.content_type('category').entry(entry_uid)
|
16
|
+
# @entry.locale('en-us')
|
17
|
+
#
|
18
|
+
# @return [Contentstack::Entry]
|
19
|
+
def locale(code)
|
20
|
+
@query[:locale] = code
|
21
|
+
self
|
22
|
+
end
|
23
|
+
|
24
|
+
# Specifies an array of 'only' keys in BASE object that would be 'included' in the response.
|
25
|
+
#
|
26
|
+
# @param [Array] fields Array of the 'only' reference keys to be included in response.
|
27
|
+
# @param [Array] fields_with_base Can be used to denote 'only' fields of the reference class
|
28
|
+
#
|
29
|
+
# Example
|
30
|
+
# # Include only title and description field in response
|
31
|
+
# @entry = @stack.content_type('category').entry(entry_uid)
|
32
|
+
# @entry.only(['title', 'description'])
|
33
|
+
#
|
34
|
+
# # Query product and include only the title and description from category reference
|
35
|
+
# @entry = @stack.content_type('product').entry(entry_uid)
|
36
|
+
# @entry.include_reference('category')
|
37
|
+
# .only('category', ['title', 'description'])
|
38
|
+
#
|
39
|
+
# @return [Contentstack::Entry]
|
40
|
+
def only(fields, fields_with_base=nil)
|
41
|
+
q = {}
|
42
|
+
if [Array, String].include?(fields_with_base.class)
|
43
|
+
fields_with_base = [fields_with_base] if fields_with_base.class == String
|
44
|
+
q[fields.to_sym] = fields_with_base
|
45
|
+
else
|
46
|
+
fields = [fields] if fields.class == String
|
47
|
+
q = {BASE: fields}
|
48
|
+
end
|
49
|
+
|
50
|
+
@query[:only] = q
|
51
|
+
self
|
52
|
+
end
|
53
|
+
|
54
|
+
# Specifies list of field uids that would be 'excluded' from the response.
|
55
|
+
#
|
56
|
+
# @param [Array] fields Array of field uid which get 'excluded' from the response.
|
57
|
+
# @param [Array] fields_with_base Can be used to denote 'except' fields of the reference class
|
58
|
+
#
|
59
|
+
# Example
|
60
|
+
# # Exclude 'description' field in response
|
61
|
+
# @entry = @stack.content_type('category').entry(entry_uid)
|
62
|
+
# @entry.except(['description'])
|
63
|
+
#
|
64
|
+
# # Query product and exclude the 'description' from category reference
|
65
|
+
# @entry = @stack.content_type('product').entry(entry_uid)
|
66
|
+
# @entry.include_reference('category')
|
67
|
+
# .except('category', ['description'])
|
68
|
+
#
|
69
|
+
# @return [Contentstack::Entry]
|
70
|
+
def except(fields, fields_with_base=nil)
|
71
|
+
q = {}
|
72
|
+
if [Array, String].include?(fields_with_base.class)
|
73
|
+
fields_with_base = [fields_with_base] if fields_with_base.class == String
|
74
|
+
q[fields.to_sym] = fields_with_base
|
75
|
+
else
|
76
|
+
fields = [fields] if fields.class == String
|
77
|
+
q = {BASE: fields}
|
78
|
+
end
|
79
|
+
|
80
|
+
@query[:except] = q
|
81
|
+
self
|
82
|
+
end
|
83
|
+
|
84
|
+
# Add a constraint that requires a particular reference key details.
|
85
|
+
#
|
86
|
+
# @param [String/Array] reference_field_uids Pass string or array of reference fields that must be included in the response
|
87
|
+
#
|
88
|
+
# Example
|
89
|
+
#
|
90
|
+
# # Include reference of 'category'
|
91
|
+
# @entry = @stack.content_type('product').entry(entry_uid)
|
92
|
+
# @entry.include_reference('category')
|
93
|
+
#
|
94
|
+
# # Include reference of 'category' and 'reviews'
|
95
|
+
# @entry = @stack.content_type('product').entry(entry_uid)
|
96
|
+
# @entry.include_reference(['category', 'reviews'])
|
97
|
+
#
|
98
|
+
# @return [Contentstack::Entry]
|
99
|
+
def include_reference(reference_field_uids)
|
100
|
+
self.include(reference_field_uids)
|
101
|
+
end
|
102
|
+
|
103
|
+
# Include schemas of all returned objects along with objects themselves.
|
104
|
+
#
|
105
|
+
# Example
|
106
|
+
#
|
107
|
+
# @entry = @stack.content_type('product').entry(entry_uid)
|
108
|
+
# @entry.include_schema
|
109
|
+
#
|
110
|
+
# @return [Contentstack::Entry]
|
111
|
+
def include_schema(flag=true)
|
112
|
+
@query[:include_schema] = flag
|
113
|
+
self
|
114
|
+
end
|
115
|
+
|
116
|
+
# Include object owner's profile in the objects data.
|
117
|
+
#
|
118
|
+
# Example
|
119
|
+
#
|
120
|
+
# @entry = @stack.content_type('product').entry(entry_uid)
|
121
|
+
# @entry.include_owner
|
122
|
+
#
|
123
|
+
# @return [Contentstack::Entry]
|
124
|
+
def include_owner(flag=true)
|
125
|
+
@query[:include_owner] = flag
|
126
|
+
self
|
127
|
+
end
|
128
|
+
|
129
|
+
# Include object's content_type in response
|
130
|
+
#
|
131
|
+
# Example
|
132
|
+
#
|
133
|
+
# @entry = @stack.content_type('product').entry(entry_uid)
|
134
|
+
# @entry.include_content_type
|
135
|
+
#
|
136
|
+
# @return [Contentstack::Entry]
|
137
|
+
def include_content_type(flag=true)
|
138
|
+
@query[:include_content_type] = flag
|
139
|
+
self
|
140
|
+
end
|
141
|
+
|
142
|
+
# Include the fallback locale publish content, if specified locale content is not publish.
|
143
|
+
#
|
144
|
+
# Example
|
145
|
+
#
|
146
|
+
# @entry = @stack.content_type('product').entry(entry_uid)
|
147
|
+
# @entry.include_fallback
|
148
|
+
#
|
149
|
+
# @return [Contentstack::Entry]
|
150
|
+
def include_fallback(flag=true)
|
151
|
+
@query[:include_fallback] = flag
|
152
|
+
self
|
153
|
+
end
|
154
|
+
|
155
|
+
# Include Embedded Objects (Entries and Assets) along with entry/entries details.
|
156
|
+
#
|
157
|
+
# Example
|
158
|
+
#
|
159
|
+
# @entry = @stack.content_type('product').entry(entry_uid)
|
160
|
+
# @entry.include_embedded_items
|
161
|
+
#
|
162
|
+
# @return [Contentstack::Query]
|
163
|
+
def include_embedded_items()
|
164
|
+
@query[:include_embedded_items] = ['BASE']
|
165
|
+
self
|
166
|
+
end
|
167
|
+
|
168
|
+
#
|
169
|
+
# @return [Contentstack::Query]
|
170
|
+
def include(field_uids)
|
171
|
+
field_uids = [field_uids] if field_uids.class == String
|
172
|
+
@query[:include] ||= []
|
173
|
+
@query[:include] = @query[:include] | field_uids
|
174
|
+
self
|
175
|
+
end
|
176
|
+
|
177
|
+
# Execute entry
|
178
|
+
#
|
179
|
+
# Example
|
180
|
+
#
|
181
|
+
# @entry = @stack.content_type('product').entry(entry_uid)
|
182
|
+
# @entry.fetch
|
183
|
+
#
|
184
|
+
# @return [Contentstack::EntryCollection]
|
10
185
|
def fetch
|
11
|
-
entry = API.fetch_entry(@content_type, self.fields[:uid])
|
186
|
+
entry = API.fetch_entry(@content_type, self.fields[:uid], @query)
|
12
187
|
setup(entry["entry"])
|
188
|
+
@schema = entry["schema"].symbolize_keys if entry["schema"]
|
189
|
+
@content_type = entry["content_type"].symbolize_keys if entry["content_type"]
|
13
190
|
self
|
14
191
|
end
|
15
192
|
|
@@ -24,6 +201,7 @@ module Contentstack
|
|
24
201
|
@content_type = content_type_uid if !content_type_uid.blank?
|
25
202
|
@owner = attrs[:_owner] if attrs[:_owner]
|
26
203
|
@uid = attrs[:uid]
|
204
|
+
@query = {}
|
27
205
|
end
|
28
206
|
end
|
29
207
|
end
|
data/lib/contentstack/query.rb
CHANGED
@@ -502,6 +502,33 @@ module Contentstack
|
|
502
502
|
self
|
503
503
|
end
|
504
504
|
|
505
|
+
|
506
|
+
# Include the fallback locale publish content, if specified locale content is not publish.
|
507
|
+
#
|
508
|
+
# Example
|
509
|
+
#
|
510
|
+
# @query = @stack.content_type('product').query
|
511
|
+
# @query.include_fallback
|
512
|
+
#
|
513
|
+
# @return [Contentstack::Query]
|
514
|
+
def include_fallback(flag=true)
|
515
|
+
@query[:include_fallback] = flag
|
516
|
+
self
|
517
|
+
end
|
518
|
+
|
519
|
+
# Include Embedded Objects (Entries and Assets) along with entry/entries details.
|
520
|
+
#
|
521
|
+
# Example
|
522
|
+
#
|
523
|
+
# @query = @stack.content_type('product').query
|
524
|
+
# @query.include_embedded_items
|
525
|
+
#
|
526
|
+
# @return [Contentstack::Query]
|
527
|
+
def include_embedded_items()
|
528
|
+
@query[:include_embedded_items] = ['BASE']
|
529
|
+
self
|
530
|
+
end
|
531
|
+
|
505
532
|
# Include objects in 'Draft' mode in response
|
506
533
|
#
|
507
534
|
# Example
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'active_support/core_ext'
|
2
|
+
|
3
|
+
module Contentstack
|
4
|
+
class SyncResult
|
5
|
+
attr_reader :items
|
6
|
+
attr_reader :sync_token
|
7
|
+
attr_reader :pagination_token
|
8
|
+
attr_reader :total_count
|
9
|
+
attr_reader :skip
|
10
|
+
attr_reader :limit
|
11
|
+
|
12
|
+
def initialize(sync_result)
|
13
|
+
if sync_result.nil?
|
14
|
+
@items = []
|
15
|
+
@sync_token = nil
|
16
|
+
@pagination_token = nil
|
17
|
+
@total_count = 0
|
18
|
+
@skip = 0
|
19
|
+
@limit = 100
|
20
|
+
else
|
21
|
+
@items = sync_result["items"] || []
|
22
|
+
@sync_token = sync_result["sync_token"] || nil
|
23
|
+
@pagination_token = sync_result["pagination_token"] || nil
|
24
|
+
@total_count = sync_result["total_count"] || 0
|
25
|
+
@skip = sync_result["skip"] || 0
|
26
|
+
@limit = sync_result["limit"] || 100
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/contentstack/version.rb
CHANGED
data/spec/content_type_spec.rb
CHANGED
@@ -46,6 +46,11 @@ describe Contentstack::ContentType do
|
|
46
46
|
@data = client.content_types.first
|
47
47
|
expect(@data.attributes).not_to be nil
|
48
48
|
end
|
49
|
+
|
50
|
+
it "Should get content type from uid" do
|
51
|
+
@data = client.content_type("category").fetch
|
52
|
+
expect(@data.attributes).not_to be nil
|
53
|
+
end
|
49
54
|
end
|
50
55
|
|
51
56
|
describe "Initialized using class" do
|
data/spec/entry_spec.rb
CHANGED
@@ -3,6 +3,9 @@ require_relative '../lib/contentstack.rb'
|
|
3
3
|
|
4
4
|
describe Contentstack::Entry do
|
5
5
|
let(:client) { create_client }
|
6
|
+
let(:uid) { "blt05056a2f5e0ebf76" }
|
7
|
+
let(:category) {client.content_type("category").entry(uid)}
|
8
|
+
let(:product) {client.content_type("product").entry(uid)}
|
6
9
|
|
7
10
|
it "Contentstack::EntryCollection should have Contentstack::Entry instance" do
|
8
11
|
data = client.content_type("category").query.fetch
|
@@ -11,13 +14,81 @@ describe Contentstack::Entry do
|
|
11
14
|
end
|
12
15
|
|
13
16
|
it "is an instance of Contentstack::Entry if single entry is fetched" do
|
14
|
-
data =
|
17
|
+
data = category.fetch
|
15
18
|
expect(data.class).to eq Contentstack::Entry
|
16
19
|
end
|
17
20
|
|
18
21
|
it 'has a method `get` to get attributes data' do
|
19
|
-
|
20
|
-
data = client.content_type("category").entry(uid).fetch
|
22
|
+
data = category.fetch
|
21
23
|
expect(data.get('uid')).to eq uid
|
22
24
|
end
|
25
|
+
|
26
|
+
it "should set locale the in the request entry" do
|
27
|
+
data = category.locale('en-us')
|
28
|
+
expect(data.query[:locale]).to eq 'en-us'
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should get data using `only` method with string parameter" do
|
32
|
+
data = category.fetch
|
33
|
+
expect(data.fields[:title]).not_to be nil
|
34
|
+
expect(data.fields[:uid]).not_to be nil
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should get data using `only` method with array parameter" do
|
38
|
+
data = category.only(["title"]).fetch
|
39
|
+
expect(data.fields[:title]).not_to be nil
|
40
|
+
expect(data.fields[:uid]).not_to be nil
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should get data using `except` method with string parameter" do
|
44
|
+
data = category.except("category_tags").fetch
|
45
|
+
expect(data.fields[:category_tags]).to be nil
|
46
|
+
end
|
47
|
+
|
48
|
+
it "should get data using `except` method with array parameter" do
|
49
|
+
data = category.except(["description"]).fetch
|
50
|
+
expect(data.fields[:description]).to be nil
|
51
|
+
end
|
52
|
+
|
53
|
+
it "should get data using `only` method for reference fields" do
|
54
|
+
data = product.include_reference('categories').only("categories", ["title", "description"]).fetch
|
55
|
+
expect(data.fields[:categories][0][:title]).to eq "Smartphones"
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should get data using `except` method for reference fields" do
|
59
|
+
data = product.include_reference('categories').except("categories", "title").fetch
|
60
|
+
expect(data.fields[:categories][0][:title]).to eq 'Smartphones'
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should get data using `include_schema` method" do
|
64
|
+
data = category.include_schema.fetch
|
65
|
+
expect(data.schema).not_to be nil
|
66
|
+
end
|
67
|
+
|
68
|
+
it "should get data using `include_owner` method" do
|
69
|
+
data = product.include_owner.fetch
|
70
|
+
expect(data.fields[:_owner]).not_to be nil
|
71
|
+
end
|
72
|
+
|
73
|
+
it "should get data using `include_owner` method" do
|
74
|
+
data = product.include_fallback.fetch
|
75
|
+
expect(data.fields[:locale]).not_to be nil
|
76
|
+
end
|
77
|
+
|
78
|
+
it "should get data using `include_content_type` method" do
|
79
|
+
data = category.include_content_type.fetch
|
80
|
+
expect(data.content_type).not_to be nil
|
81
|
+
end
|
82
|
+
|
83
|
+
it "should get data using `include_reference` method" do
|
84
|
+
data = product.include_reference('categories').fetch
|
85
|
+
puts data.get("categories.title")
|
86
|
+
expect(data.fields[:categories][0][:title]).not_to be nil
|
87
|
+
end
|
88
|
+
|
89
|
+
it "should get data using `include_embedded_items` method" do
|
90
|
+
data = product.include_embedded_items().fetch
|
91
|
+
puts data.get("categories.title")
|
92
|
+
expect(data.fields[:categories][0][:title]).not_to be nil
|
93
|
+
end
|
23
94
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
{"content_type":{"created_at":"2017-09-28T06:04:02.500Z","updated_at":"2017-09-28T07:13:13.612Z","title":"Product","uid":"product","inbuilt_class":false,"schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false},{"display_name":"URL","uid":"url","data_type":"text","mandatory":false,"field_metadata":{"_default":true},"multiple":false,"unique":false},{"data_type":"text","display_name":"Price","uid":"price","field_metadata":{"description":"","default_value":""},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"text","display_name":"Discounted Price","uid":"discounted_price","field_metadata":{"description":"","default_value":""},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"file","display_name":"Featured Image","uid":"featured_image","extensions":[],"field_metadata":{"description":"","rich_text_type":"standard"},"multiple":false,"mandatory":false,"unique":false},{"data_type":"file","display_name":"Product Images","uid":"product_images","extensions":[],"field_metadata":{"description":"","rich_text_type":"standard"},"multiple":true,"mandatory":false,"unique":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"","default_value":"","multiline":true},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false},{"data_type":"reference","display_name":"Categories","reference_to":"category","field_metadata":{"ref_multiple":true},"uid":"categories","multiple":false,"mandatory":false,"unique":false},{"data_type":"reference","display_name":"Related Products","reference_to":"product","field_metadata":{"ref_multiple":true},"uid":"related_products","mandatory":false,"multiple":false,"unique":false}],"last_activity":{"environments":[{"uid":"blt922581483b3573b4","details":[{"locale":"en-us","time":"2017-09-28T09:43:24.028Z"}]}]},"maintain_revisions":true,"description":"","options":{"is_page":true,"singleton":false,"title":"title","sub_title":[],"url_pattern":"/:unique_id","url_prefix":"/products/"},"abilities":{"get_one_object":true,"get_all_objects":true,"create_object":true,"update_object":true,"delete_object":true,"delete_all_objects":true},"DEFAULT_ACL":{"others":{"read":false,"create":false},"users":[{"uid":"blt249905a2fc79092e","read":true,"sub_acl":{"read":true}}]},"SYS_ACL":{"others":{"read":false,"create":false,"update":false,"delete":false,"sub_acl":{"read":false,"create":false,"update":false,"delete":false,"publish":false}},"roles":[{"uid":"bltdbf78d599f92b0c9","read":true,"create":false,"update":false,"delete":false,"sub_acl":{"read":true,"create":true,"update":true,"delete":true,"publish":true}},{"uid":"blt344db9f3f8011ce2","read":true,"create":true,"update":true,"delete":true,"sub_acl":{"read":true,"create":true,"update":true,"delete":true,"publish":true}}]}}}
|
@@ -1 +1 @@
|
|
1
|
-
{"entry":{"title":"Apple Products","tags":[],"locale":"en-us","uid":"blt05056a2f5e0ebf76","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","created_at":"2017-09-28T06:08:21.276Z","updated_at":"2017-09-28T06:08:21.276Z","ACL":{},"_version":1}}
|
1
|
+
{"entry":{"title":"Apple Products","tags":[],"locale":"en-us","uid":"blt05056a2f5e0ebf76","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","created_at":"2017-09-28T06:08:21.276Z","updated_at":"2017-09-28T06:08:21.276Z","ACL":{},"_version":1}, "schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"","default_value":"","multiline":true},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false}],"content_type":{"created_at":"2017-08-28T11:26:16.005Z","updated_at":"2017-08-28T11:26:28.217Z","title":"Category","uid":"category","inbuilt_class":false,"schema":[{"display_name":"Title","uid":"title","data_type":"text","mandatory":true,"unique":true,"field_metadata":{"_default":true},"multiple":false},{"data_type":"text","display_name":"Description","uid":"description","field_metadata":{"description":"","default_value":"","multiline":true},"format":"","error_messages":{"format":""},"multiple":false,"mandatory":false,"unique":false}],"last_activity":{"environments":[{"uid":"bltc5173a61bc94f944","details":[{"locale":"en-us","time":"2017-09-28T09:37:14.441Z"}]}]},"maintain_revisions":true,"description":"","options":{"is_page":false,"singleton":false,"title":"title","sub_title":[]},"abilities":{"get_one_object":true,"get_all_objects":true,"create_object":true,"update_object":true,"delete_object":true,"delete_all_objects":true},"DEFAULT_ACL":{"others":{"read":false,"create":false},"users":[{"uid":"blt8360496f808a5408","read":true,"sub_acl":{"read":true}}]}}}
|
@@ -1 +1 @@
|
|
1
|
-
{"entry":{"title":"Motorola Moto X4","url":"/products/blt70d3d8c86c566079","price":"500","discounted_price":"450","featured_image":{"uid":"bltcf9489a3cf1eaa00","created_at":"2017-09-28T07:02:20.745Z","updated_at":"2017-09-28T07:02:20.745Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"311812","tags":[],"filename":"1.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/bltcf9489a3cf1eaa00/59cc9e7c75d9f7760dfc33eb/download","ACL":{},"is_dir":false,"_version":1,"title":"1.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"sys_bltcbfe73b68603b243"}},"product_images":[{"uid":"bltcf9489a3cf1eaa00","created_at":"2017-09-28T07:02:20.745Z","updated_at":"2017-09-28T07:02:20.745Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"311812","tags":[],"filename":"1.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/bltcf9489a3cf1eaa00/59cc9e7c75d9f7760dfc33eb/download","ACL":{},"is_dir":false,"_version":1,"title":"1.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"sys_bltcbfe73b68603b243"}},{"uid":"blt49a8b46c6839be12","created_at":"2017-09-28T07:02:30.108Z","updated_at":"2017-09-28T07:02:30.108Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"4226","tags":[],"filename":"2.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/blt49a8b46c6839be12/59cc9e86462a293417404402/download","ACL":{},"is_dir":false,"_version":1,"title":"2.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"sys_bltcbfe73b68603b243"}},{"uid":"bltb545ae58b0ab72bb","created_at":"2017-09-28T07:02:32.375Z","updated_at":"2017-09-28T07:02:32.375Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"5755","tags":[],"filename":"3.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/bltb545ae58b0ab72bb/59cc9e8895fd2a0a0daa742a/download","ACL":{},"is_dir":false,"_version":1,"title":"3.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"sys_bltcbfe73b68603b243"}},{"uid":"blt6af2dddde9d35e3c","created_at":"2017-09-28T07:02:36.507Z","updated_at":"2017-09-28T07:02:36.507Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"312464","tags":[],"filename":"4.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/blt6af2dddde9d35e3c/59cc9e8c75d9f7760dfc33f1/download","ACL":{},"is_dir":false,"_version":1,"title":"4.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"sys_bltcbfe73b68603b243"}}],"description":"dual cameras.\nsingular design.\nAdvanced dual rear cameras for your best photos yet. Plus, a beautiful contoured glass and metal frame with an IP68 water resistance rating.* Coming soon.","categories":[{"title":"Smartphones","tags":[],"locale":"en-us","uid":"bltccd0ea06c1da94fd","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","created_at":"2017-09-28T06:07:37.132Z","updated_at":"2017-09-28T06:07:37.132Z","ACL":{},"_version":1,"publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.932Z","user":"sys_bltcbfe73b68603b243"},"_publish_environment":"blt922581483b3573b4","_publish_locale":"en-us","_publish_scheduled":false}],"related_products":[{"title":"OnePlus 3T A3000 64GB Gunmetal","url":"/products/bltc37f44d9bc85f3ec","price":"539","discounted_price":"499","featured_image":{"uid":"blt2f02748d62b5d9df","created_at":"2017-09-28T06:56:13.016Z","updated_at":"2017-09-28T06:56:13.016Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"40674","tags":[],"filename":"one-plus-three-1x.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/blt2f02748d62b5d9df/59cc9d0d95fd2a0a0daa7424/download","ACL":{},"is_dir":false,"_version":1,"title":"one-plus-three-1x.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:42:37.885Z","user":"sys_bltcbfe73b68603b243"}},"product_images":[{"uid":"blt2f02748d62b5d9df","created_at":"2017-09-28T06:56:13.016Z","updated_at":"2017-09-28T06:56:13.016Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"40674","tags":[],"filename":"one-plus-three-1x.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/blt2f02748d62b5d9df/59cc9d0d95fd2a0a0daa7424/download","ACL":{},"is_dir":false,"_version":1,"title":"one-plus-three-1x.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:42:37.885Z","user":"sys_bltcbfe73b68603b243"}},{"uid":"bltf061d797179b0013","created_at":"2017-09-28T06:56:20.954Z","updated_at":"2017-09-28T06:56:20.954Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"13187","tags":[],"filename":"one-plus-3-2.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/bltf061d797179b0013/59cc9d1475d9f7760dfc33e5/download","ACL":{},"is_dir":false,"_version":1,"title":"one-plus-3-2.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:42:31.431Z","user":"sys_bltcbfe73b68603b243"}},{"uid":"blt7469869415aa6d33","created_at":"2017-09-28T06:56:24.656Z","updated_at":"2017-09-28T06:56:24.656Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"27485","tags":[],"filename":"one-plus-3-3.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/blt7469869415aa6d33/59cc9d183ef8e08c0d90ce29/download","ACL":{},"is_dir":false,"_version":1,"title":"one-plus-3-3.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:42:26.882Z","user":"sys_bltcbfe73b68603b243"}}],"description":"Snapdragon 821 6gb RAM Unlocked Smartphone","categories":["bltccd0ea06c1da94fd"],"related_products":["blt6c4014da5a782a25"],"tags":[],"locale":"en-us","uid":"bltc37f44d9bc85f3ec","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","created_at":"2017-09-28T06:57:55.574Z","updated_at":"2017-09-28T06:57:55.574Z","ACL":{},"_version":1,"publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.933Z","user":"sys_bltcbfe73b68603b243"},"_publish_environment":"blt922581483b3573b4","_publish_locale":"en-us","_publish_scheduled":false}],"tags":[],"locale":"en-us","uid":"blt70d3d8c86c566079","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","created_at":"2017-09-28T07:03:11.350Z","updated_at":"2017-09-28T07:03:11.350Z","ACL":{},"_version":1}}
|
1
|
+
{"entry":{"title":"Motorola Moto X4","url":"/products/blt70d3d8c86c566079","price":"500","discounted_price":"450","featured_image":{"uid":"bltcf9489a3cf1eaa00","created_at":"2017-09-28T07:02:20.745Z","updated_at":"2017-09-28T07:02:20.745Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"311812","tags":[],"filename":"1.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/bltcf9489a3cf1eaa00/59cc9e7c75d9f7760dfc33eb/download","ACL":{},"is_dir":false,"_version":1,"title":"1.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"sys_bltcbfe73b68603b243"}},"product_images":[{"uid":"bltcf9489a3cf1eaa00","created_at":"2017-09-28T07:02:20.745Z","updated_at":"2017-09-28T07:02:20.745Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"311812","tags":[],"filename":"1.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/bltcf9489a3cf1eaa00/59cc9e7c75d9f7760dfc33eb/download","ACL":{},"is_dir":false,"_version":1,"title":"1.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"sys_bltcbfe73b68603b243"}},{"uid":"blt49a8b46c6839be12","created_at":"2017-09-28T07:02:30.108Z","updated_at":"2017-09-28T07:02:30.108Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"4226","tags":[],"filename":"2.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/blt49a8b46c6839be12/59cc9e86462a293417404402/download","ACL":{},"is_dir":false,"_version":1,"title":"2.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"sys_bltcbfe73b68603b243"}},{"uid":"bltb545ae58b0ab72bb","created_at":"2017-09-28T07:02:32.375Z","updated_at":"2017-09-28T07:02:32.375Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"5755","tags":[],"filename":"3.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/bltb545ae58b0ab72bb/59cc9e8895fd2a0a0daa742a/download","ACL":{},"is_dir":false,"_version":1,"title":"3.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"sys_bltcbfe73b68603b243"}},{"uid":"blt6af2dddde9d35e3c","created_at":"2017-09-28T07:02:36.507Z","updated_at":"2017-09-28T07:02:36.507Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"312464","tags":[],"filename":"4.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/blt6af2dddde9d35e3c/59cc9e8c75d9f7760dfc33f1/download","ACL":{},"is_dir":false,"_version":1,"title":"4.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.919Z","user":"sys_bltcbfe73b68603b243"}}],"description":"dual cameras.\nsingular design.\nAdvanced dual rear cameras for your best photos yet. Plus, a beautiful contoured glass and metal frame with an IP68 water resistance rating.* Coming soon.","categories":[{"title":"Smartphones","tags":[],"locale":"en-us","uid":"bltccd0ea06c1da94fd","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","created_at":"2017-09-28T06:07:37.132Z","updated_at":"2017-09-28T06:07:37.132Z","ACL":{},"_version":1,"publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.932Z","user":"sys_bltcbfe73b68603b243"},"_publish_environment":"blt922581483b3573b4","_publish_locale":"en-us","_publish_scheduled":false}],"related_products":[{"title":"OnePlus 3T A3000 64GB Gunmetal","url":"/products/bltc37f44d9bc85f3ec","price":"539","discounted_price":"499","featured_image":{"uid":"blt2f02748d62b5d9df","created_at":"2017-09-28T06:56:13.016Z","updated_at":"2017-09-28T06:56:13.016Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"40674","tags":[],"filename":"one-plus-three-1x.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/blt2f02748d62b5d9df/59cc9d0d95fd2a0a0daa7424/download","ACL":{},"is_dir":false,"_version":1,"title":"one-plus-three-1x.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:42:37.885Z","user":"sys_bltcbfe73b68603b243"}},"product_images":[{"uid":"blt2f02748d62b5d9df","created_at":"2017-09-28T06:56:13.016Z","updated_at":"2017-09-28T06:56:13.016Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"40674","tags":[],"filename":"one-plus-three-1x.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/blt2f02748d62b5d9df/59cc9d0d95fd2a0a0daa7424/download","ACL":{},"is_dir":false,"_version":1,"title":"one-plus-three-1x.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:42:37.885Z","user":"sys_bltcbfe73b68603b243"}},{"uid":"bltf061d797179b0013","created_at":"2017-09-28T06:56:20.954Z","updated_at":"2017-09-28T06:56:20.954Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"13187","tags":[],"filename":"one-plus-3-2.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/bltf061d797179b0013/59cc9d1475d9f7760dfc33e5/download","ACL":{},"is_dir":false,"_version":1,"title":"one-plus-3-2.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:42:31.431Z","user":"sys_bltcbfe73b68603b243"}},{"uid":"blt7469869415aa6d33","created_at":"2017-09-28T06:56:24.656Z","updated_at":"2017-09-28T06:56:24.656Z","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","content_type":"image/jpeg","file_size":"27485","tags":[],"filename":"one-plus-3-3.jpg","url":"https://images.contentstack.io/v3/assets/bltc46be1ce6b7e1e24/blt7469869415aa6d33/59cc9d183ef8e08c0d90ce29/download","ACL":{},"is_dir":false,"_version":1,"title":"one-plus-3-3.jpg","publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:42:26.882Z","user":"sys_bltcbfe73b68603b243"}}],"description":"Snapdragon 821 6gb RAM Unlocked Smartphone","categories":["bltccd0ea06c1da94fd"],"related_products":["blt6c4014da5a782a25"],"tags":[],"locale":"en-us","uid":"bltc37f44d9bc85f3ec","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","created_at":"2017-09-28T06:57:55.574Z","updated_at":"2017-09-28T06:57:55.574Z","ACL":{},"_version":1,"publish_details":{"environment":"blt922581483b3573b4","locale":"en-us","time":"2017-09-28T09:28:47.933Z","user":"sys_bltcbfe73b68603b243"},"_publish_environment":"blt922581483b3573b4","_publish_locale":"en-us","_publish_scheduled":false}],"tags":[],"locale":"en-us","uid":"blt70d3d8c86c566079","created_by":"sys_bltcbfe73b68603b243","updated_by":"sys_bltcbfe73b68603b243","created_at":"2017-09-28T07:03:11.350Z","updated_at":"2017-09-28T07:03:11.350Z","ACL":{},"_version":1, "_owner":{"uid":"sys_bltcbfe73b68603b243","created_at":"2012-11-26T09:45:10.000Z","updated_at":"2017-09-15T16:06:07.920Z","email":"rohit.sharma@raweng.com","username":"rohit.sharma_blt50c79ab1","first_name":"Rohit","last_name":"Sharma","company":"raw engineering inc.","plan_id":["cms_plan"],"org_uid":["blt821f82ffcc171fed"]}}}
|