mints 0.0.24 → 0.0.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/contact.rb +35 -31
- data/lib/mints_helper.rb +2 -2
- data/lib/pub.rb +82 -44
- data/lib/user/config/api_keys.rb +1 -1
- data/lib/user/config/appointments.rb +10 -10
- data/lib/user/config/attribute_groups.rb +2 -2
- data/lib/user/config/attributes.rb +2 -2
- data/lib/user/config/calendars.rb +2 -2
- data/lib/user/config/importers.rb +5 -5
- data/lib/user/config/public_folders.rb +5 -5
- data/lib/user/config/relationships.rb +7 -7
- data/lib/user/config/roles.rb +3 -3
- data/lib/user/config/seeds.rb +42 -2
- data/lib/user/config/system_settings.rb +1 -1
- data/lib/user/config/tags.rb +2 -2
- data/lib/user/config/taxonomies.rb +7 -7
- data/lib/user/config/teams.rb +2 -2
- data/lib/user/config/users.rb +2 -2
- data/lib/user/contacts/contacts.rb +1 -1
- data/lib/user/content/assets.rb +97 -58
- data/lib/user/content/content.rb +8 -6
- data/lib/user/content/content_instances.rb +5 -5
- data/lib/user/content/content_templates.rb +2 -2
- data/lib/user/content/conversations.rb +43 -11
- data/lib/user/content/dam.rb +3 -3
- data/lib/user/content/forms.rb +70 -4
- data/lib/user/content/message_templates.rb +5 -5
- data/lib/user/content/messages.rb +2 -2
- data/lib/user/content/pages.rb +13 -4
- data/lib/user/content/stories.rb +9 -66
- data/lib/user/content/story_templates.rb +2 -2
- data/lib/user/content/story_versions.rb +124 -0
- data/lib/user/crm/companies.rb +7 -7
- data/lib/user/crm/contacts.rb +11 -11
- data/lib/user/crm/deals.rb +6 -6
- data/lib/user/crm/segments.rb +3 -3
- data/lib/user/crm/workflow_step_objects.rb +2 -2
- data/lib/user/crm/workflow_steps.rb +2 -2
- data/lib/user/crm/workflows.rb +2 -2
- data/lib/user/ecommerce/item_prices.rb +2 -2
- data/lib/user/ecommerce/locations.rb +15 -12
- data/lib/user/ecommerce/order_items_groups.rb +2 -2
- data/lib/user/ecommerce/orders.rb +10 -10
- data/lib/user/ecommerce/price_lists.rb +2 -2
- data/lib/user/ecommerce/product_templates.rb +2 -2
- data/lib/user/ecommerce/product_variations.rb +4 -4
- data/lib/user/ecommerce/products.rb +9 -9
- data/lib/user/ecommerce/skus.rb +2 -2
- data/lib/user/ecommerce/taxes.rb +2 -2
- data/lib/user/ecommerce/variant_options.rb +2 -2
- data/lib/user/ecommerce/variant_values.rb +2 -2
- data/lib/user/helpers/helpers.rb +1 -1
- data/lib/user/helpers/object_activities.rb +2 -2
- data/lib/user/helpers/object_folders.rb +2 -2
- data/lib/user/helpers/user_folders.rb +2 -2
- data/lib/user/marketing/marketing.rb +3 -3
- data/lib/user/profile/profile.rb +5 -5
- metadata +20 -19
@@ -4,7 +4,7 @@ module Relationships
|
|
4
4
|
#
|
5
5
|
|
6
6
|
# === Get relationships available for.
|
7
|
-
# Get relationships
|
7
|
+
# Get relationships available.
|
8
8
|
#
|
9
9
|
# ==== Parameters
|
10
10
|
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
@@ -22,24 +22,24 @@ module Relationships
|
|
22
22
|
# Attach a relationship.
|
23
23
|
#
|
24
24
|
# ==== Parameters
|
25
|
-
# data:: (Hash) -- Data to be
|
25
|
+
# data:: (Hash) -- Data to be submitted.
|
26
26
|
#
|
27
27
|
# ==== Example
|
28
28
|
#
|
29
29
|
def attach_relationship(data) #FIXME: Method doesn't work, RelationshipManager cannot access to id attribute.
|
30
|
-
return @client.raw("post", "/config/relationships/attach", nil, data)
|
30
|
+
return @client.raw("post", "/config/relationships/attach", nil, data_transform(data))
|
31
31
|
end
|
32
32
|
|
33
33
|
# === Detach relationship.
|
34
34
|
# Detach a relationship.
|
35
35
|
#
|
36
36
|
# ==== Parameters
|
37
|
-
# data:: (Hash) -- Data to be
|
37
|
+
# data:: (Hash) -- Data to be submitted.
|
38
38
|
#
|
39
39
|
# ==== Example
|
40
40
|
#
|
41
41
|
def detach_relationship(data) #FIXME: Method doesn't work, RelationshipManager cannot access to id attribute.
|
42
|
-
return @client.raw("post", "/config/relationships/detach", nil, data)
|
42
|
+
return @client.raw("post", "/config/relationships/detach", nil, data_transform(data))
|
43
43
|
end
|
44
44
|
|
45
45
|
# === Relationship has objects.
|
@@ -91,7 +91,7 @@ module Relationships
|
|
91
91
|
# Create a relationship with data.
|
92
92
|
#
|
93
93
|
# ==== Parameters
|
94
|
-
# data:: (Hash) -- Data to be
|
94
|
+
# data:: (Hash) -- Data to be submitted.
|
95
95
|
#
|
96
96
|
# ==== Example
|
97
97
|
# data = {
|
@@ -110,7 +110,7 @@ module Relationships
|
|
110
110
|
#
|
111
111
|
# ==== Parameters
|
112
112
|
# id:: (Integer) -- Relationship id.
|
113
|
-
# data:: (Hash) -- Data to be
|
113
|
+
# data:: (Hash) -- Data to be submitted.
|
114
114
|
#
|
115
115
|
# ==== Example
|
116
116
|
# data = {
|
data/lib/user/config/roles.rb
CHANGED
@@ -12,7 +12,7 @@ module Roles
|
|
12
12
|
#
|
13
13
|
# ==== Parameters
|
14
14
|
# id:: (Integer) -- Role id.
|
15
|
-
# data:: (Hash) -- Data to be
|
15
|
+
# data:: (Hash) -- Data to be submitted.
|
16
16
|
#
|
17
17
|
# ==== Example
|
18
18
|
# data = {
|
@@ -49,7 +49,7 @@ module Roles
|
|
49
49
|
# Create a role with data.
|
50
50
|
#
|
51
51
|
# ==== Parameters
|
52
|
-
# data:: (Hash) -- Data to be
|
52
|
+
# data:: (Hash) -- Data to be submitted.
|
53
53
|
#
|
54
54
|
# ==== Example
|
55
55
|
# data = {
|
@@ -67,7 +67,7 @@ module Roles
|
|
67
67
|
#
|
68
68
|
# ==== Parameters
|
69
69
|
# id:: (Integer) -- Role id.
|
70
|
-
# data:: (Hash) -- Data to be
|
70
|
+
# data:: (Hash) -- Data to be submitted.
|
71
71
|
#
|
72
72
|
# ==== Example
|
73
73
|
# data = {
|
data/lib/user/config/seeds.rb
CHANGED
@@ -8,7 +8,47 @@ module Seeds
|
|
8
8
|
#
|
9
9
|
# ==== Example
|
10
10
|
#
|
11
|
-
def apply_seeds(data
|
12
|
-
|
11
|
+
def apply_seeds(data, async = false)
|
12
|
+
url = "/config/seeds"
|
13
|
+
url = "#{url}?async" if async
|
14
|
+
return @client.raw("post", url, nil, data)
|
15
|
+
end
|
16
|
+
|
17
|
+
# === Get seed processes.
|
18
|
+
# Get a collection of seed processes.
|
19
|
+
#
|
20
|
+
# ==== Parameters
|
21
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
22
|
+
# use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
|
23
|
+
#
|
24
|
+
# ==== First Example
|
25
|
+
# @data = @mints_user.get_seed_processes
|
26
|
+
#
|
27
|
+
# ==== Second Example
|
28
|
+
# options = {
|
29
|
+
# "fields": "id"
|
30
|
+
# }
|
31
|
+
# @data = @mints_user.get_seed_processes(options)
|
32
|
+
def get_seed_processes(options = nil)
|
33
|
+
return @client.raw("post", "/config/seed-processes", options)
|
34
|
+
end
|
35
|
+
|
36
|
+
# === Get seed process.
|
37
|
+
# Get a seed process info.
|
38
|
+
#
|
39
|
+
# ==== Parameters
|
40
|
+
# id:: (Integer) -- Story version id.
|
41
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
42
|
+
#
|
43
|
+
# ==== First Example
|
44
|
+
# @data = @mints_user.get_story_version(1)
|
45
|
+
#
|
46
|
+
# ==== Second Example
|
47
|
+
# options = {
|
48
|
+
# "fields": "id, title"
|
49
|
+
# }
|
50
|
+
# @data = @mints_user.get_seed_process(1, options)
|
51
|
+
def get_seed_process(id, options = nil)
|
52
|
+
return @client.raw("get", "/config/seed-processes/#{id}", options)
|
13
53
|
end
|
14
54
|
end
|
data/lib/user/config/tags.rb
CHANGED
@@ -28,7 +28,7 @@ module Tags
|
|
28
28
|
# Create a tag with data.
|
29
29
|
#
|
30
30
|
# ==== Parameters
|
31
|
-
# data:: (Hash) -- Data to be
|
31
|
+
# data:: (Hash) -- Data to be submitted.
|
32
32
|
#
|
33
33
|
# ==== Example
|
34
34
|
# data = {
|
@@ -45,7 +45,7 @@ module Tags
|
|
45
45
|
#
|
46
46
|
# ==== Parameters
|
47
47
|
# id:: (Integer) -- Tag id.
|
48
|
-
# data:: (Hash) -- Data to be
|
48
|
+
# data:: (Hash) -- Data to be submitted.
|
49
49
|
#
|
50
50
|
# ==== Example
|
51
51
|
# data = {
|
@@ -7,7 +7,7 @@ module Taxonomies
|
|
7
7
|
# Sync taxonomies for object.
|
8
8
|
#
|
9
9
|
# ==== Parameters
|
10
|
-
# data:: (Hash) -- Data to be
|
10
|
+
# data:: (Hash) -- Data to be submitted.
|
11
11
|
#
|
12
12
|
# ==== Example
|
13
13
|
# data = {
|
@@ -91,7 +91,7 @@ module Taxonomies
|
|
91
91
|
# Create a taxonomy with data.
|
92
92
|
#
|
93
93
|
# ==== Parameters
|
94
|
-
# data:: (Hash) -- Data to be
|
94
|
+
# data:: (Hash) -- Data to be submitted.
|
95
95
|
#
|
96
96
|
# ==== Example
|
97
97
|
# data = {
|
@@ -100,8 +100,8 @@ module Taxonomies
|
|
100
100
|
# "object_type": "contacts"
|
101
101
|
# }
|
102
102
|
# @data = @mints_user.create_taxonomy(data)
|
103
|
-
def create_taxonomy(data)
|
104
|
-
return @client.raw("post", "/config/taxonomies",
|
103
|
+
def create_taxonomy(data, options = nil)
|
104
|
+
return @client.raw("post", "/config/taxonomies", options, data_transform(data))
|
105
105
|
end
|
106
106
|
|
107
107
|
# === Update taxonomy.
|
@@ -109,7 +109,7 @@ module Taxonomies
|
|
109
109
|
#
|
110
110
|
# ==== Parameters
|
111
111
|
# id:: (Integer) -- Taxonomy id.
|
112
|
-
# data:: (Hash) -- Data to be
|
112
|
+
# data:: (Hash) -- Data to be submitted.
|
113
113
|
#
|
114
114
|
# ==== Example
|
115
115
|
# data = {
|
@@ -118,7 +118,7 @@ module Taxonomies
|
|
118
118
|
# "object_type": "contacts"
|
119
119
|
# }
|
120
120
|
# @data = @mints_user.update_taxonomy(104, data)
|
121
|
-
def update_taxonomy(id, data)
|
122
|
-
return @client.raw("put", "/config/taxonomies/#{id}",
|
121
|
+
def update_taxonomy(id, data, options = nil)
|
122
|
+
return @client.raw("put", "/config/taxonomies/#{id}", options, data_transform(data))
|
123
123
|
end
|
124
124
|
end
|
data/lib/user/config/teams.rb
CHANGED
@@ -38,7 +38,7 @@ module Teams
|
|
38
38
|
# Create a team with data.
|
39
39
|
#
|
40
40
|
# ==== Parameters
|
41
|
-
# data:: (Hash) -- Data to be
|
41
|
+
# data:: (Hash) -- Data to be submitted.
|
42
42
|
#
|
43
43
|
# ==== Example
|
44
44
|
# data = {
|
@@ -55,7 +55,7 @@ module Teams
|
|
55
55
|
#
|
56
56
|
# ==== Parameters
|
57
57
|
# id:: (Integer) -- Team id.
|
58
|
-
# data:: (Hash) -- Data to be
|
58
|
+
# data:: (Hash) -- Data to be submitted.
|
59
59
|
#
|
60
60
|
# ==== Example
|
61
61
|
# data = {
|
data/lib/user/config/users.rb
CHANGED
@@ -38,7 +38,7 @@ module Users
|
|
38
38
|
# Create an user with data.
|
39
39
|
#
|
40
40
|
# ==== Parameters
|
41
|
-
# data:: (Hash) -- Data to be
|
41
|
+
# data:: (Hash) -- Data to be submitted.
|
42
42
|
#
|
43
43
|
# ==== Example
|
44
44
|
# data = {
|
@@ -59,7 +59,7 @@ module Users
|
|
59
59
|
#
|
60
60
|
# ==== Parameters
|
61
61
|
# id:: (Integer) -- User id.
|
62
|
-
# data:: (Hash) -- Data to be
|
62
|
+
# data:: (Hash) -- Data to be submitted.
|
63
63
|
#
|
64
64
|
# ==== Example
|
65
65
|
# data = {
|
data/lib/user/content/assets.rb
CHANGED
@@ -4,13 +4,100 @@ module Assets
|
|
4
4
|
##
|
5
5
|
# == Assets
|
6
6
|
#
|
7
|
+
# === Get assets.
|
8
|
+
# Get a collection of assets.
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
12
|
+
# use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
|
13
|
+
#
|
14
|
+
# ==== First Example
|
15
|
+
# @data = @mints_user.get_assets
|
16
|
+
#
|
17
|
+
# ==== Second Example
|
18
|
+
# options = {
|
19
|
+
# "fields": "id, title"
|
20
|
+
# }
|
21
|
+
# @data = @mints_user.get_assets(options)
|
22
|
+
#
|
23
|
+
# ==== Third Example
|
24
|
+
# options = {
|
25
|
+
# "fields": "id, title"
|
26
|
+
# }
|
27
|
+
# @data = @mints_user.get_assets(options, true)
|
28
|
+
def get_assets(options = nil, use_post = true)
|
29
|
+
return get_query_results("/content/assets", options, use_post)
|
30
|
+
end
|
31
|
+
|
32
|
+
# === Get asset.
|
33
|
+
# Get a asset info.
|
34
|
+
#
|
35
|
+
# ==== Parameters
|
36
|
+
# id:: (Integer) -- Asset id.
|
37
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
38
|
+
#
|
39
|
+
# ==== First Example
|
40
|
+
# @data = @mints_user.get_asset(1)
|
41
|
+
#
|
42
|
+
# ==== Second Example
|
43
|
+
# options = {
|
44
|
+
# "fields": "id, title"
|
45
|
+
# }
|
46
|
+
# @data = @mints_user.get_asset(1, options)
|
47
|
+
def get_asset(id, options = nil)
|
48
|
+
return @client.raw("get", "/content/assets/#{id}", options)
|
49
|
+
end
|
50
|
+
|
51
|
+
# === Create asset.
|
52
|
+
# Create a asset with data.
|
53
|
+
#
|
54
|
+
# ==== Parameters
|
55
|
+
# data:: (Hash) -- Data to be submitted.
|
56
|
+
#
|
57
|
+
# ==== Example
|
58
|
+
# data = {
|
59
|
+
# "title": "New Asset",
|
60
|
+
# "slug": "new-asset",
|
61
|
+
# }
|
62
|
+
# @data = @mints_user.create_asset(data)
|
63
|
+
def create_asset(data)
|
64
|
+
return @client.raw("post", "/content/assets", nil, data_transform(data))
|
65
|
+
end
|
7
66
|
|
67
|
+
# === Update asset.
|
68
|
+
# Update a asset info.
|
69
|
+
#
|
70
|
+
# ==== Parameters
|
71
|
+
# id:: (Integer) -- Asset id.
|
72
|
+
# data:: (Hash) -- Data to be submitted.
|
73
|
+
#
|
74
|
+
# ==== Example
|
75
|
+
# data = {
|
76
|
+
# "title": "New Asset Modified",
|
77
|
+
# "slug": "new-asset"
|
78
|
+
# }
|
79
|
+
# @data = @mints_user.update_asset(5, data)
|
80
|
+
def update_asset(id, data)
|
81
|
+
return @client.raw("put", "/content/assets/#{id}", nil, data_transform(data))
|
82
|
+
end
|
83
|
+
|
84
|
+
# === Delete asset.
|
85
|
+
# Delete a asset.
|
86
|
+
#
|
87
|
+
# ==== Parameters
|
88
|
+
# id:: (Integer) -- Asset id.
|
89
|
+
#
|
90
|
+
# ==== Example
|
91
|
+
# @data = @mints_user.delete_asset(6)
|
92
|
+
def delete_asset(id)
|
93
|
+
return @client.raw("delete", "/content/assets/#{id}")
|
94
|
+
end
|
8
95
|
|
9
96
|
# === Get asset link info.
|
10
97
|
# Get information of an asset by url.
|
11
98
|
#
|
12
99
|
# ==== Parameters
|
13
|
-
# data:: (Hash) -- Data to be
|
100
|
+
# data:: (Hash) -- Data to be submitted.
|
14
101
|
#
|
15
102
|
# ==== Example
|
16
103
|
# data = {
|
@@ -43,7 +130,7 @@ module Assets
|
|
43
130
|
#
|
44
131
|
# ==== Parameters
|
45
132
|
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
46
|
-
def get_asset_usage(options)
|
133
|
+
def get_asset_usage(options)
|
47
134
|
return @client.raw("get", "/content/assets/usage", options)
|
48
135
|
end
|
49
136
|
|
@@ -73,7 +160,7 @@ module Assets
|
|
73
160
|
# Upload an asset. It can be images, documents and videos.
|
74
161
|
#
|
75
162
|
# ==== Parameters
|
76
|
-
# data:: (Hash) -- Data to be
|
163
|
+
# data:: (Hash) -- Data to be submitted.
|
77
164
|
#
|
78
165
|
# ==== First Example (with files)
|
79
166
|
#
|
@@ -137,7 +224,7 @@ module Assets
|
|
137
224
|
# ==== Parameters
|
138
225
|
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
139
226
|
def get_asset_sizes(options)
|
140
|
-
return @client.raw("get", "/content/assets/
|
227
|
+
return @client.raw("get", "/content/assets/sizes", options)
|
141
228
|
end
|
142
229
|
|
143
230
|
# === Get asset sizes.
|
@@ -148,7 +235,7 @@ module Assets
|
|
148
235
|
#
|
149
236
|
# ==== Example
|
150
237
|
# @data = @mints_user.get_asset_sizes(2)
|
151
|
-
def
|
238
|
+
def get_asset_size(id) #FIXME: wrong number of arguments (given 1, expected 0)
|
152
239
|
return @client.raw("get", "/content/assets/sizes/#{id}")
|
153
240
|
end
|
154
241
|
|
@@ -156,7 +243,7 @@ module Assets
|
|
156
243
|
# Create an asset size by data.
|
157
244
|
#
|
158
245
|
# ==== Parameters
|
159
|
-
# data:: (Hash) -- Data to be
|
246
|
+
# data:: (Hash) -- Data to be submitted.
|
160
247
|
#
|
161
248
|
# ==== Example
|
162
249
|
# data = {
|
@@ -178,21 +265,7 @@ module Assets
|
|
178
265
|
# }
|
179
266
|
# @data = @mints_user.create_asset_size(data.to_json)
|
180
267
|
def create_asset_size(data)
|
181
|
-
return @client.raw("post", "/content/assets/
|
182
|
-
end
|
183
|
-
|
184
|
-
# === Edit asset size.
|
185
|
-
# Edit an asset size.
|
186
|
-
#
|
187
|
-
# ==== Parameters
|
188
|
-
# data:: (Hash) -- Data to be submited.
|
189
|
-
def edit_asset_size(data) #TODO: Not tested
|
190
|
-
return @client.raw("post", "/content/assets/editSize", nil, data)
|
191
|
-
end
|
192
|
-
|
193
|
-
# === Delete asset size.
|
194
|
-
def delete_asset_size #TODO: Not tested
|
195
|
-
return @client.raw("get", "/content/assets/deleteSize") #DELETE OR GET?
|
268
|
+
return @client.raw("post", "/content/assets/sizes", nil, data)
|
196
269
|
end
|
197
270
|
|
198
271
|
|
@@ -210,7 +283,7 @@ module Assets
|
|
210
283
|
# ==== Example
|
211
284
|
# @data = @mints_user.get_asset_sizes(2)
|
212
285
|
def get_asset_variation(id)
|
213
|
-
#FIXME: Id 1 and 4: Trying to get property 'path' of non-object maybe json
|
286
|
+
#FIXME: Id 1 and 4: Trying to get property 'path' of non-object maybe json conversion is bad
|
214
287
|
#FIXME: Id 2 and 3: File not found at path maybe doesnt exist
|
215
288
|
return @client.raw("get", "/content/assets/variation/#{id}")
|
216
289
|
end
|
@@ -219,42 +292,8 @@ module Assets
|
|
219
292
|
# Create an asset variation of an existing asset.
|
220
293
|
#
|
221
294
|
# ==== Parameters
|
222
|
-
# data:: (Hash) -- Data to be
|
295
|
+
# data:: (Hash) -- Data to be submitted.
|
223
296
|
def generate_asset_variation(data) #FIXME: Trying to get property 'width' of non-object
|
224
|
-
return @client.raw("post", "/content/assets/
|
225
|
-
end
|
226
|
-
|
227
|
-
# === Upload asset variation.
|
228
|
-
#
|
229
|
-
# ==== Parameters
|
230
|
-
# data:: (Hash) -- Data to be submited.
|
231
|
-
def upload_asset_variation(data) #FIXME: Call to a member function guessClientExtension() on null
|
232
|
-
return @client.raw("post", "/content/assets/uploadVariation", nil, data)
|
297
|
+
return @client.raw("post", "/content/assets/generate-asset-variations", nil, data)
|
233
298
|
end
|
234
|
-
|
235
|
-
# === Update asset variation.
|
236
|
-
#
|
237
|
-
# ==== Parameters
|
238
|
-
# data:: (Hash) -- Data to be submited.
|
239
|
-
def update_asset_variation(id, data) #TODO:
|
240
|
-
return @client.raw("post", "/content/assets/updateVariation/#{id}", nil, data)
|
241
|
-
end
|
242
|
-
|
243
|
-
# === Delete asset variation.
|
244
|
-
def delete_asset_variation #TODO: Not tested
|
245
|
-
return @client.raw("get", "/content/assets/deleteVariation") #DELETE OR GET?
|
246
|
-
end
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
# === Get original asset.
|
253
|
-
#
|
254
|
-
# ==== Parameters
|
255
|
-
# id:: (Integer) Asset id.
|
256
|
-
def get_original_asset(id) #FIXME: Doesn't return JSON
|
257
|
-
return @client.raw("get", "/content/assets/original/#{id}")
|
258
|
-
end
|
259
|
-
|
260
299
|
end
|
data/lib/user/content/content.rb
CHANGED
@@ -8,6 +8,7 @@ require_relative './message_templates.rb'
|
|
8
8
|
require_relative './messages.rb'
|
9
9
|
require_relative './pages.rb'
|
10
10
|
require_relative './stories.rb'
|
11
|
+
require_relative './story_versions.rb'
|
11
12
|
require_relative './story_templates.rb'
|
12
13
|
|
13
14
|
module Content
|
@@ -21,6 +22,7 @@ module Content
|
|
21
22
|
include Messages
|
22
23
|
include Pages
|
23
24
|
include Stories
|
25
|
+
include StoryVersions
|
24
26
|
include StoryTemplates
|
25
27
|
|
26
28
|
# === Get public images url.
|
@@ -62,7 +64,7 @@ module Content
|
|
62
64
|
# Create an author with data.
|
63
65
|
#
|
64
66
|
# ==== Parameters
|
65
|
-
# data:: (Hash) -- Data to be
|
67
|
+
# data:: (Hash) -- Data to be submitted.
|
66
68
|
#
|
67
69
|
# ==== Example
|
68
70
|
# data = {
|
@@ -79,7 +81,7 @@ module Content
|
|
79
81
|
#
|
80
82
|
# ==== Parameters
|
81
83
|
# id:: (Integer) -- Author id.
|
82
|
-
# data:: (Hash) -- Data to be
|
84
|
+
# data:: (Hash) -- Data to be submitted.
|
83
85
|
#
|
84
86
|
# ==== Example
|
85
87
|
#
|
@@ -122,7 +124,7 @@ module Content
|
|
122
124
|
# Create a keyword with data.
|
123
125
|
#
|
124
126
|
# ==== Parameters
|
125
|
-
# data:: (Hash) -- Data to be
|
127
|
+
# data:: (Hash) -- Data to be submitted.
|
126
128
|
#
|
127
129
|
# ==== Example
|
128
130
|
# data = {
|
@@ -138,7 +140,7 @@ module Content
|
|
138
140
|
#
|
139
141
|
# ==== Parameters
|
140
142
|
# id:: (Integer) -- Keyword id.
|
141
|
-
# data:: (Hash) -- Data to be
|
143
|
+
# data:: (Hash) -- Data to be submitted.
|
142
144
|
#
|
143
145
|
# ==== Example
|
144
146
|
#
|
@@ -183,7 +185,7 @@ module Content
|
|
183
185
|
# Create a stage with data.
|
184
186
|
#
|
185
187
|
# ==== Parameters
|
186
|
-
# data:: (Hash) -- Data to be
|
188
|
+
# data:: (Hash) -- Data to be submitted.
|
187
189
|
#
|
188
190
|
# ==== Example
|
189
191
|
# config_json = {
|
@@ -209,7 +211,7 @@ module Content
|
|
209
211
|
#
|
210
212
|
# ==== Parameters
|
211
213
|
# id:: (Integer) -- Stage id.
|
212
|
-
# data:: (Hash) -- Data to be
|
214
|
+
# data:: (Hash) -- Data to be submitted.
|
213
215
|
#
|
214
216
|
# ==== Example
|
215
217
|
# config_json = {
|
@@ -24,7 +24,7 @@ module ContentInstances
|
|
24
24
|
#
|
25
25
|
# ==== Parameters
|
26
26
|
# id:: (Integer) -- Content instance id.
|
27
|
-
# data:: (Hash) -- Data to be
|
27
|
+
# data:: (Hash) -- Data to be submitted.
|
28
28
|
#
|
29
29
|
# ==== Example
|
30
30
|
# data = {
|
@@ -57,7 +57,7 @@ module ContentInstances
|
|
57
57
|
#
|
58
58
|
# ==== Parameters
|
59
59
|
# id:: (Integer) -- Content instance id.
|
60
|
-
# data:: (Hash) -- Data to be
|
60
|
+
# data:: (Hash) -- Data to be submitted.
|
61
61
|
#
|
62
62
|
# ==== Example
|
63
63
|
# data = {
|
@@ -75,7 +75,7 @@ module ContentInstances
|
|
75
75
|
#
|
76
76
|
# ==== Parameters
|
77
77
|
# id:: (Integer) -- Content instance id.
|
78
|
-
# data:: (Hash) -- Data to be
|
78
|
+
# data:: (Hash) -- Data to be submitted.
|
79
79
|
#
|
80
80
|
# ==== Example
|
81
81
|
# data = {
|
@@ -102,7 +102,7 @@ module ContentInstances
|
|
102
102
|
# Create a content instance with data.
|
103
103
|
#
|
104
104
|
# ==== Parameters
|
105
|
-
# data:: (Hash) -- Data to be
|
105
|
+
# data:: (Hash) -- Data to be submitted.
|
106
106
|
#
|
107
107
|
# ==== Example
|
108
108
|
# data = {
|
@@ -120,7 +120,7 @@ module ContentInstances
|
|
120
120
|
#
|
121
121
|
# ==== Parameters
|
122
122
|
# id:: (Integer) -- Content instance id.
|
123
|
-
# data:: (Hash) -- Data to be
|
123
|
+
# data:: (Hash) -- Data to be submitted.
|
124
124
|
#
|
125
125
|
# ==== Example
|
126
126
|
# data = {
|
@@ -59,7 +59,7 @@ module ContentTemplates
|
|
59
59
|
# Create a content template with data.
|
60
60
|
#
|
61
61
|
# ==== Parameters
|
62
|
-
# data:: (Hash) -- Data to be
|
62
|
+
# data:: (Hash) -- Data to be submitted.
|
63
63
|
#
|
64
64
|
# ==== Example
|
65
65
|
# data = {
|
@@ -80,7 +80,7 @@ module ContentTemplates
|
|
80
80
|
#
|
81
81
|
# ==== Parameters
|
82
82
|
# id:: (Integer) -- Content template id.
|
83
|
-
# data:: (Hash) -- Data to be
|
83
|
+
# data:: (Hash) -- Data to be submitted.
|
84
84
|
#
|
85
85
|
# ==== Example
|
86
86
|
# data = {
|