lws 0.4.2 → 6.1.0.beta1

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.
@@ -20,7 +20,7 @@ module LWS::CorporateWebsite
20
20
  end
21
21
  # :nocov:
22
22
 
23
- #@!visibility private
23
+ # @!visibility private
24
24
  def self.api
25
25
  LWS.setup_api(LWS.config.endpoints[:corporate_website] ||
26
26
  ENDPOINT[LWS.config.environment])
@@ -33,113 +33,231 @@ module LWS::CorporateWebsite
33
33
  use_api LWS::CorporateWebsite.api
34
34
  end
35
35
 
36
- # (see Generic::Task)
37
- class Task < LWS::Generic::Task
38
- use_api LWS::CorporateWebsite.api
39
- end
40
-
41
36
  ### App specific classes
42
37
 
43
38
  # = The article class
44
39
  class Article < LWS::Generic::Model
45
40
  use_api LWS::CorporateWebsite.api
46
41
 
47
- #@!attribute id [r]
48
- # @return [Fixnum] the (unique) ID of the article
42
+ # @!attribute id [r]
43
+ # @return [Fixnum] the (unique) ID of the article
44
+ attribute :id
45
+
46
+ # @!attribute body
47
+ # @return [String, nil] the body of the article
48
+ attribute :body
49
49
 
50
- #@!attribute body
51
- # @return [String] the body of the article
50
+ # @!attribute key
51
+ # @return [String] the (page) key of the article
52
+ attribute :key
52
53
 
53
- #@!attribute key
54
- # @return [String] the (page) key of the article
55
-
56
- #@!attribute language
57
- # @return [String] the ID of the language of the article (2 character)
54
+ # @!attribute language
55
+ # @return [String] the ID of the language of the article (2 character)
56
+ attribute :language
58
57
 
59
- #@!attribute news
60
- # @return [Boolean] flag whether the article is a news article
58
+ # @!attribute layout
59
+ # @return ["text_image_social", "text_only", "map"] the layout used for
60
+ # the article
61
+ attribute :layout
61
62
 
62
- #@!attribute sitemap
63
- # @return [Boolean] flag whether the article is included in the sitemap
63
+ # @!attribute menu_key
64
+ # @return [String, nil] the key of menu the article belongs to
65
+ attribute :menu_key
64
66
 
65
- #@!attribute layout
66
- # @return [String] the layout used for the article
67
+ # @!attribute menu_item
68
+ # @return [Boolean] whether the article has a menu item
69
+ attribute :menu_item
67
70
 
68
- #@!attribute menu_key
69
- # @return [String] the key of menu the article belongs to
71
+ # @!attribute news
72
+ # @return [Boolean, nil] flag whether the article is a news article
73
+ attribute :news
70
74
 
71
- #@!attribute order
72
- # @return [Fixnum] the order (number) of the article withing the page
75
+ # @!attribute order
76
+ # @return [Fixnum, nil] the order (number) of the article withing the page
77
+ attribute :order
73
78
 
74
- #@!attribute picture
75
- # @return [String] the path to the picture accompanying the article
79
+ # @!attribute picture
80
+ # @return [String, nil] the path to the picture accompanying the article
81
+ attribute :picture
76
82
 
77
- #@!attribute picture_caption
78
- # @return [String] the caption for the picture accompanying the article
83
+ # @!attribute picture_caption
84
+ # @return [String, nil] the caption for the picture accompanying the article
85
+ attribute :picture_caption
79
86
 
80
- #@!attribute picture_url
81
- # @return [String] the URL to the picture accompanying the article
87
+ # @!attribute picture_url
88
+ # @return [String, nil] the URL to the picture accompanying the article
89
+ attribute :picture_url
82
90
 
83
- #@!attribute social_avatar
84
- # @return [String] the path to the social avatar accompanying the article
91
+ # @!attribute sitemap
92
+ # @return [Boolean] flag whether the article is included in the sitemap
93
+ attribute :sitemap
85
94
 
86
- #@!attribute social_avatar_url
87
- # @return [String] the URL to the social avatar accompanying the article
95
+ # @!attribute social_avatar
96
+ # @return [String, nil] the path to the social avatar accompanying the article
97
+ attribute :social_avatar
88
98
 
89
- #@!attribute social_location
90
- # @return [String] the location of the social user accompanying the article
99
+ # @!attribute social_avatar_url
100
+ # @return [String, nil] the URL to the social avatar accompanying the article
101
+ attribute :social_avatar_url
91
102
 
92
- #@!attribute social_name
93
- # @return [String] the name of the social user accompanying the article
103
+ # @!attribute social_location
104
+ # @return [String, nil] the location of the social user accompanying the article
105
+ attribute :social_location
94
106
 
95
- #@!attribute social_text
96
- # @return [String] the text of the social user accompanying the article
107
+ # @!attribute social_name
108
+ # @return [String, nil] the name of the social user accompanying the article
109
+ attribute :social_name
97
110
 
98
- #@!attribute title
99
- # @return [String] the title of the article
111
+ # @!attribute social_text
112
+ # @return [String, nil] the text of the social user accompanying the article
113
+ attribute :social_text
100
114
 
101
- #@!attribute created_at
102
- # @return [String] the timestamp of when the article was created
115
+ # @!attribute title
116
+ # @return [String, nil] the title of the article
117
+ attribute :title
103
118
 
104
- #@!attribute updated_at
105
- # @return [String] the timestamp of when the article was last updated
119
+ # @!attribute url
120
+ # @return [String] the (partial) URL of the article
121
+ attribute :url
106
122
 
107
- self # To ensure that YARD does not skip the attributes of this class
123
+ # @!attribute created_at [r]
124
+ # @return [String] the timestamp of when the article was created
125
+ attribute :created_at
126
+
127
+ # @!attribute updated_at [r]
128
+ # @return [String] the timestamp of when the article was last updated
129
+ attribute :updated_at
108
130
  end
109
131
 
110
132
  # = The opening hours class
111
133
  class OfficeTime < LWS::Generic::Model
112
134
  use_api LWS::CorporateWebsite.api
113
135
 
114
- #@!attribute id [r]
115
- # @return [Fixnum] the (unique) ID of the office time
136
+ # @!attribute id [r]
137
+ # @return [Fixnum] the (unique) ID of the office time
138
+ attribute :id
139
+
140
+ # @!attribute announce
141
+ # @return [String, nil] the date/time when the special office times
142
+ # need to be announced on
143
+ attribute :announce
144
+
145
+ # @!attribute display_text
146
+ # @return [String] the displayed text of the special office time
147
+ attribute :display_text
148
+
149
+ # @!attribute end
150
+ # @return [String] the end date/time of the special office times
151
+ attribute :end
116
152
 
117
- #@!attribute announce
118
- # @return [String] the date when the special office times need to be
119
- # announced on
153
+ # @!attribute language
154
+ # @return [String] the ID of the language the office time is for (2 characters)
155
+ attribute :language
156
+
157
+ # @!attribute motive
158
+ # @return [String] the special office time motive/key
159
+ attribute :motive
160
+
161
+ # @!attribute start
162
+ # @return [String] the start date/time of the special office times
163
+ attribute :start
164
+
165
+ # @!attribute created_at [r]
166
+ # @return [String] the timestamp of when the office time was created
167
+ attribute :created_at
168
+
169
+ # @!attribute updated_at [r]
170
+ # @return [String] the timestamp of when the office time was last updated
171
+ attribute :updated_at
172
+ end
173
+
174
+ # = The social page class
175
+ class SocialPage < LWS::Generic::Model
176
+ use_api LWS::CorporateWebsite.api
120
177
 
121
- #@!attribute display_text
122
- # @return [String] the displayed text of the special office time
178
+ # @!attribute id [r]
179
+ # @return [Fixnum] the (unique) ID of the social page
180
+ attribute :id
123
181
 
124
- #@!attribute language
125
- # @return [String] the ID of the language the office time is for (2 characters)
182
+ # @!attribute account
183
+ # @return [LWS::Auth::Account] the account used for posting the social page
184
+ belongs_to :account, class_name: "LWS::Auth::Account"
126
185
 
127
- #@!attribute motive
128
- # @return [String] the special office time motive/key
186
+ # @!attribute account_id
187
+ # @return [Fixnum] the ID of the account used for posting the social page
188
+ attribute :account_id
129
189
 
130
- #@!attribute start
131
- # @return [String] the start date/time of the special office times
190
+ # @!attribute company
191
+ # @return [LWS::Auth::Company] the account used for posting the social page
192
+ belongs_to :company, class_name: "LWS::Auth::Company"
132
193
 
133
- #@!attribute end
134
- # @return [String] the end date/time of the special office times
194
+ # @!attribute company_id
195
+ # @return [Fixnum] the ID of the account used for posting the social page
196
+ attribute :company_id
135
197
 
136
- #@!attribute created_at
137
- # @return [String] the timestamp of when the office time was created
198
+ # @!attribute provider
199
+ # @return ["facebook", "linkedin", "twitter", nil] the social page provider
200
+ attribute :provider
138
201
 
139
- #@!attribute updated_at
140
- # @return [String] the timestamp of when the office time was last updated
202
+ # @!attribute provider_uid
203
+ # @return [String] the UID suplied by the social page provider
204
+ attribute :provider_uid
141
205
 
142
- self # To ensure that YARD does not skip the attributes of this class
206
+ # @!attribute uid_type
207
+ # @return ["personal", "page"] the social page UID type
208
+ attribute :uid_type
209
+
210
+ # @!attribute created_at [r]
211
+ # @return [String] the timestamp of when the social page was created
212
+ attribute :created_at
213
+
214
+ # @!attribute updated_at [r]
215
+ # @return [String] the timestamp of when the social page was last updated
216
+ attribute :updated_at
143
217
  end
144
218
 
219
+ # = The social post class
220
+ class SocialPost < LWS::Generic::Model
221
+ use_api LWS::CorporateWebsite.api
222
+
223
+ # @!attribute id [r]
224
+ # @return [Fixnum] the (unique) ID of the social post
225
+ attribute :id
226
+
227
+ # @!attribute article
228
+ # @return [Article] the article associated with the social post
229
+ belongs_to :article
230
+
231
+ # @!attribute article_id
232
+ # @return [Fixnum] the ID of the article associated with the social post
233
+ attribute :article_id
234
+
235
+ # @!attribute description
236
+ # @return [String] the description of the social post
237
+ attribute :description
238
+
239
+ # @!attribute link
240
+ # @return [String, nil] the link used in the social post
241
+ attribute :link
242
+
243
+ # @!attribute lat
244
+ # @return [Float, nil] the latitude of the location of the social post
245
+ attribute :lat
246
+
247
+ # @!attribute long
248
+ # @return [Float, nil] the longitude of the location of the social post
249
+ attribute :long
250
+
251
+ # @!attribute title
252
+ # @return [String] the title of the social post
253
+ attribute :title
254
+
255
+ # @!attribute created_at [r]
256
+ # @return [String] the timestamp of when the social post was created
257
+ attribute :created_at
258
+
259
+ # @!attribute updated_at [r]
260
+ # @return [String] the timestamp of when the social post was last updated
261
+ attribute :updated_at
262
+ end
145
263
  end