@ygracs/xepg-lib-js 0.0.21 → 0.0.22

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ #### *v0.0.22*
2
+
3
+ Pre-release version.
4
+
5
+ > - update `xepgdoc-lib.md`;
6
+ > - add new `TXEpgScheduleItem` class;
7
+ > - add new `TXEpgChannelContainer` class;
8
+ > - add new `schedule` method to a `TXEpgSchedulesList` class;
9
+ > - add new `channel` method to a `TXEpgHeaderContainer` class;
10
+ > - add new `channel` method to a `TXEpgHeaderContainer` class;
11
+ > - add new `setType` method to a `TXEpgDTSProvider` class;
12
+ > - deprecate a `setChannelInfo` method of a `TXEpgHeaderContainer` class;
13
+ > - change name for a property `Provider` of a `TXEpgHeaderContainer` class into `provider`;
14
+ > - change name for a property `Header` of a `TXEpgContentProvider` class into `header`;
15
+ > - change name for a property `Provider` of a `TXEpgContentProvider` class into `provider`;
16
+ > - other fixes.
17
+
1
18
  #### *v0.0.21*
2
19
 
3
20
  Pre-release version.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- |***rev.*:**|0.0.7|
1
+ |***rev.*:**|0.0.9|
2
2
  |:---|---:|
3
- |***date***:|2025-02-28|
3
+ |***date***:|2025-03-06|
4
4
 
5
5
  ## Introduction
6
6
 
@@ -18,9 +18,11 @@ This module contains the following components:
18
18
 
19
19
  - classes:
20
20
 
21
+ + `TXEpgScheduleItem`;
21
22
  + `TXEpgSchedulesList`;
22
23
  + `TXEpgDTSProvider`;
23
24
  + `TXEpgProviderContainer`;
25
+ + `TXEpgChannelContainer`;
24
26
  + `TXEpgHeaderContainer`;
25
27
  + `TXEpgContentContainer`.
26
28
 
@@ -1,6 +1,6 @@
1
- |***rev.*:**|0.1.18|
1
+ |***rev.*:**|0.1.26|
2
2
  |:---|---:|
3
- |***date***:|2025-02-27|
3
+ |***date***:|2025-03-06|
4
4
 
5
5
  ## Introduction
6
6
 
@@ -55,16 +55,144 @@ This descriptor is an `object` that describes a content provider.
55
55
 
56
56
  | property name | value type | optional | description |
57
57
  |:---|---|---:|:---|
58
- | `time` | `number` | a schedule start time |
59
- | `title` | `string` | a schedule title |
60
- | `cat` | `string` | a schedule category |
61
- | `pcmark` | `number` | a schedule rating |
62
- | `descr` | `string` | a schedule description |
58
+ | `time` | `number` | no | a schedule start time |
59
+ | `title` | `string` | no | a schedule title |
60
+ | `cat` | `string` | yes | a schedule category |
61
+ | `pcmark` | `number` | yes | a schedule rating |
62
+ | `descr` | `string` | yes | a schedule description |
63
63
 
64
64
  ## Module constants
65
65
 
66
66
  ## Module classes
67
67
 
68
+ <a name="TXEpgScheduleItem"></a>
69
+ ### **TXEpgScheduleItem**
70
+
71
+ > since: `v0.0.22`
72
+
73
+ This class provides a functionality for handle an EPG-schedule element.
74
+
75
+ #### class constructor
76
+
77
+ The class constructor creates a new instance of the class.
78
+
79
+ ##### constructor parameters
80
+
81
+ The class constructor receives arguments listed below:
82
+
83
+ | parameter name | value type | default value | description |
84
+ |:---|---|---:|:---|
85
+ |`object`|`object`|---|a host object|
86
+ |`options`|`object`|---|an options settings|
87
+
88
+ #### class properties
89
+
90
+ <a name="TXEpgScheduleItem+time"></a>
91
+ ##### **time**
92
+
93
+ | property type | read only | description |
94
+ |---|---|:---|
95
+ | `number` | yes | contains a schedule start time value as a timestamp |
96
+
97
+ <a name="TXEpgScheduleItem+title"></a>
98
+ ##### **title**
99
+
100
+ | property type | read only | description |
101
+ |---|---|:---|
102
+ | `string` | yes | contains a schedule title |
103
+
104
+ <a name="TXEpgScheduleItem+category"></a>
105
+ ##### **category**
106
+
107
+ | property type | read only | description |
108
+ |---|---|:---|
109
+ | `string` | yes | contains a schedule category |
110
+
111
+ <a name="TXEpgScheduleItem+rating"></a>
112
+ ##### **rating**
113
+
114
+ | property type | read only | description |
115
+ |---|---|:---|
116
+ | `number` | yes | contains a schedule rating value (*aka pcmark*) |
117
+
118
+ <a name="TXEpgScheduleItem+descr"></a>
119
+ ##### **descr**
120
+
121
+ | property type | read only | description |
122
+ |---|---|:---|
123
+ | `string` | yes | contains a schedule description |
124
+
125
+ <a name="TXEpgScheduleItem+dtstype"></a>
126
+ ##### **dtstype**
127
+
128
+ | property type | read only | description |
129
+ |---|---|:---|
130
+ | `number` | yes | contains a "dtstype"-value |
131
+
132
+ <a name="TXEpgScheduleItem+curDocTZ"></a>
133
+ ##### **curDocTZ**
134
+
135
+ | property type | read only | description |
136
+ |---|---|:---|
137
+ | `number` | yes | contains a current TimeZone |
138
+
139
+ #### class methods
140
+
141
+ <a name="TXEpgScheduleItem+getInfo"></a>
142
+ ##### **getInfo()** => `xepgShedInfoDesc`
143
+
144
+ This method returns an object that contains a schedule information.
145
+
146
+ <a name="TXEpgScheduleItem+setTime"></a>
147
+ ##### **setTime(value)** => `boolean`
148
+
149
+ This method tries to set a schedule start time. If succeed `true` returned.
150
+
151
+ | parameter name | value type | default value | description |
152
+ |:---|---|---:|:---|
153
+ | `value` | `number`, `string`, `Date` | --- | some value |
154
+
155
+ <a name="TXEpgScheduleItem+setTitle"></a>
156
+ ##### **setTitle(value)** => `boolean`
157
+
158
+ This method tries to set a schedule title. If succeed `true` returned.
159
+
160
+ | parameter name | value type | default value | description |
161
+ |:---|---|---:|:---|
162
+ | `value` | `string` | --- | some value |
163
+
164
+ <a name="TXEpgScheduleItem+setCategory"></a>
165
+ ##### **setCategory(value)** => `boolean`
166
+
167
+ This method tries to set a schedule category. If succeed `true` returned.
168
+
169
+ | parameter name | value type | default value | description |
170
+ |:---|---|---:|:---|
171
+ | `value` | `string` | --- | some value |
172
+
173
+ <a name="TXEpgScheduleItem+setRating"></a>
174
+ ##### **setRating(value)** => `boolean`
175
+
176
+ This method tries to set a schedule rating. If succeed `true` returned.
177
+
178
+ | parameter name | value type | default value | description |
179
+ |:---|---|---:|:---|
180
+ | `value` | `number`, `string` | --- | some rating value |
181
+
182
+ <a name="TXEpgScheduleItem+setDescr"></a>
183
+ ##### **setDescr(value)** => `boolean`
184
+
185
+ This method tries to set a schedule description. If succeed `true` returned.
186
+
187
+ | parameter name | value type | default value | description |
188
+ |:---|---|---:|:---|
189
+ | `value` | `string` | --- | some value |
190
+
191
+ <a name="TXEpgScheduleItem+saveToXMLString"></a>
192
+ ##### **saveToXMLString()** => `string`
193
+
194
+ This method saves an element content to a string in an XML-format.
195
+
68
196
  <a name="TXEpgSchedulesList"></a>
69
197
  ### **TXEpgSchedulesList**
70
198
 
@@ -85,8 +213,6 @@ The class constructor receives arguments listed below:
85
213
 
86
214
  #### class properties
87
215
 
88
- The table below describes a properties of a `TXEpgSchedulesList` class:
89
-
90
216
  <a name="TXEpgSchedulesList+schedQty"></a>
91
217
  ##### **schedQty**
92
218
 
@@ -135,6 +261,17 @@ This method checks if a given `value` represents a valid schedule index and if s
135
261
  |:---|---|---:|:---|
136
262
  | `value` | `number`, `string` | --- | a value to be verified |
137
263
 
264
+ <a name="TXEpgSchedulesList+schedule"></a>
265
+ ##### **schedule(index)** => `TXEpgScheduleItem`
266
+
267
+ > since: `v0.0.22`
268
+
269
+ This method returns an object that contains a schedule element.
270
+
271
+ | parameter name | value type | default value | description |
272
+ |:---|---|---:|:---|
273
+ | `index` | `number`, `string` | --- | an element index |
274
+
138
275
  <a name="TXEpgSchedulesList+getScheduleInfo"></a>
139
276
  ##### **getScheduleInfo(index)** => `xepgShedInfoDesc`
140
277
 
@@ -250,9 +387,86 @@ This method saves an element content to a string.
250
387
 
251
388
  ##### **init()**
252
389
 
390
+ <a name="TXEpgChannelContainer"></a>
391
+ ### **TXEpgChannelContainer**
392
+
393
+ > since: `v0.0.22`
394
+
395
+ This class provides a functionality for handle an EPG-channel element.
396
+
397
+ #### class constructor
398
+
399
+ The class constructor creates a new instance of the class.
400
+
401
+ ##### constructor parameters
402
+
403
+ The class constructor receives arguments listed below:
404
+
405
+ | parameter name | value type | default value | description |
406
+ |:---|---|---:|:---|
407
+ |`object`|`object`|---|a host object|
408
+ |`options`|`object`|---|an options settings|
409
+
410
+ #### class properties
411
+
412
+ <a name="TXEpgChannelContainer+id"></a>
413
+ ##### **id**
414
+
415
+ | property type | read only | description |
416
+ |---|---|:---|
417
+ | `string` | yes | contains a channel ID |
418
+
419
+ <a name="TXEpgChannelContainer+name"></a>
420
+ ##### **name**
421
+
422
+ | property type | read only | description |
423
+ |---|---|:---|
424
+ | `string` | no | contains a channel name |
425
+
426
+ <a name="TXEpgChannelContainer+gid"></a>
427
+ ##### **gid**
428
+
429
+ | property type | read only | description |
430
+ |---|---|:---|
431
+ | `string` | no | contains a channel group ID |
432
+
433
+ <a name="TXEpgChannelContainer+url"></a>
434
+ ##### **url**
435
+
436
+ | property type | read only | description |
437
+ |---|---|:---|
438
+ | `string` | no | contains a channel URL |
439
+
440
+ #### class methods
441
+
442
+ <a name="TXEpgChannelContainer+setID"></a>
443
+ ##### **setID(value)** => `boolean`
444
+
445
+ This method tries to set a channel ID. If succeed `true` returned.
446
+
447
+ | parameter name | value type | default value | description |
448
+ |:---|---|---:|:---|
449
+ | `value` | `string` | --- | some value |
450
+
451
+ <a name="TXEpgChannelContainer+getInfo"></a>
452
+ ##### **getInfo()** => `xepgChnInfoDesc`
453
+
454
+ This method returns a channel info descriptor.
455
+
456
+ <a name="TXEpgChannelContainer+setInfo"></a>
457
+ ##### **setInfo(value)** => `void`
458
+
459
+ This method tries to load a channel info.
460
+
461
+ | parameter name | value type | default value | description |
462
+ |:---|---|---:|:---|
463
+ | `value` | `string`, `xepgChnInfoDesc` | --- | some value |
464
+
253
465
  <a name="TXEpgDTSProvider"></a>
254
466
  ### **TXEpgDTSProvider**
255
467
 
468
+ This class provides a functionality for handle a DTS-provider element.
469
+
256
470
  #### class constructor
257
471
 
258
472
  The class constructor creates a new instance of the class.
@@ -288,9 +502,24 @@ The `options` structure is listed below:
288
502
  |---|---|:---|
289
503
  | `number` | no | defines a current TimeZone |
290
504
 
505
+ #### class methods
506
+
507
+ <a name="TXEpgDTSProvider+setType"></a>
508
+ ##### **setType(value)** => `boolean`
509
+
510
+ > since: `v0.0.22`
511
+
512
+ This method tries to set a provider type.
513
+
514
+ | parameter name | value type | default value | description |
515
+ |:---|---|---:|:---|
516
+ | `value` | `number`, `string` | --- | a "dtstype"-value |
517
+
291
518
  <a name="TXEpgHeaderContainer"></a>
292
519
  ### **TXEpgHeaderContainer**
293
520
 
521
+ This class provides a functionality for handle a EPG-header element.
522
+
294
523
  #### class constructor
295
524
 
296
525
  The class constructor creates a new instance of the class.
@@ -336,9 +565,25 @@ The `options` structure is listed below:
336
565
  <a name="TXEpgHeaderContainer+Provider"></a>
337
566
  ##### **Provider**
338
567
 
568
+ > \[!] NOTE: `[since v0.0.22]` deprecated. Use (`provider` property)[#TXEpgHeaderContainer+provider] instead.
569
+
570
+ <a name="TXEpgHeaderContainer+provider"></a>
571
+ ##### **provider**
572
+
573
+ > since: `v0.0.22`
574
+
575
+ | property type | read only | description |
576
+ |---|---|:---|
577
+ | `TXEpgProviderContainer` | yes | returns a `TXEpgProviderContainer` instance |
578
+
579
+ <a name="TXEpgHeaderContainer+channel"></a>
580
+ ##### **channel**
581
+
582
+ > since: `v0.0.22`
583
+
339
584
  | property type | read only | description |
340
585
  |---|---|:---|
341
- | `TXEpgProviderContainer` | yes | returns a `TXEpgProviderContainer` |
586
+ | `TXEpgChannelContainer` | yes | returns a `TXEpgChannelContainer` instance |
342
587
 
343
588
  #### class methods
344
589
 
@@ -383,6 +628,8 @@ An object contains the following fields:
383
628
  <a name="TXEpgHeaderContainer+setChannelInfo"></a>
384
629
  ##### **setChannelInfo(obj)** => `void`
385
630
 
631
+ > \[!] WARNING: `[since v0.0.22]` deprecated.
632
+
386
633
  This method fills a channel information with a given data.
387
634
 
388
635
  | parameter name | value type | default value | description |
@@ -449,30 +696,44 @@ The `options` structure is listed below:
449
696
  <a name="TXEpgContentProvider+Header"></a>
450
697
  ##### **Header**
451
698
 
699
+ > \[!] NOTE: `[since v0.0.22]` deprecated. Use (`header` property)[#TXEpgContentProvider+header] instead.
700
+
701
+ <a name="TXEpgContentProvider+header"></a>
702
+ ##### **header**
703
+
704
+ > since: `v0.0.22`
705
+
452
706
  | property type | read only | description |
453
707
  |---|---|:---|
454
- | `TXEpgHeaderContainer` | yes | returns a `TXEpgHeaderContainer` |
708
+ | `TXEpgHeaderContainer` | yes | returns a `TXEpgHeaderContainer` instance |
455
709
 
456
710
  <a name="TXEpgContentProvider+Provider"></a>
457
711
  ##### **Provider**
458
712
 
713
+ > \[!] NOTE: `[since v0.0.22]` deprecated. Use (`provider` property)[#TXEpgContentProvider+provider] instead.
714
+
715
+ <a name="TXEpgContentProvider+provider"></a>
716
+ ##### **provider**
717
+
718
+ > since: `v0.0.22`
719
+
459
720
  | property type | read only | description |
460
721
  |---|---|:---|
461
- | `TXEpgProviderContainer` | yes | returns a `TXEpgProviderContainer` |
722
+ | `TXEpgProviderContainer` | yes | returns a `TXEpgProviderContainer` instance |
462
723
 
463
724
  <a name="TXEpgContentProvider+dts"></a>
464
725
  ##### **dts**
465
726
 
466
727
  | property type | read only | description |
467
728
  |---|---|:---|
468
- | `TXEpgDTSProvider` | yes | returns a `TXEpgDTSProvider` |
729
+ | `TXEpgDTSProvider` | yes | returns a `TXEpgDTSProvider` instance |
469
730
 
470
731
  <a name="TXEpgContentProvider+SchedulesList"></a>
471
732
  ##### **SchedulesList**
472
733
 
473
734
  | property type | read only | description |
474
735
  |---|---|:---|
475
- | `TXEpgSchedulesList` | yes | returns a `TXEpgSchedulesList` |
736
+ | `TXEpgSchedulesList` | yes | returns a `TXEpgSchedulesList` instance |
476
737
 
477
738
  #### class methods
478
739
 
package/index.js CHANGED
@@ -1,8 +1,8 @@
1
- // [v0.0.009-20250225]
1
+ // [v0.0.010-20250228]
2
2
 
3
3
  // === module init block ===
4
4
 
5
- const xepg_doc = require('./lib/xepgdoc-lib.js');
5
+ const xepgdoc = require('./lib/xepgdoc-lib.js');
6
6
 
7
7
  const xObj = require('@ygracs/xobj-lib-js');
8
8
 
@@ -13,14 +13,15 @@ const xObj = require('@ygracs/xobj-lib-js');
13
13
  // === module exports block ===
14
14
 
15
15
  /**/// v1 branch
16
- exports.TXEpgContentProvider = xepg_doc.TXEpgContentProvider;
17
- exports.TXEpgSchedulesList = xepg_doc.TXEpgSchedulesList;
18
- exports.TXEpgDTSProvider = xepg_doc.TXEpgDTSProvider;
19
- exports.TXEpgProviderContainer = xepg_doc.TXEpgProviderContainer;
20
- exports.TXEpgHeaderContainer = xepg_doc.TXEpgHeaderContainer;
16
+ module.exports.TXEpgContentProvider = xepgdoc.TXEpgContentProvider;
17
+ module.exports.TXEpgScheduleItem = xepgdoc.TXEpgScheduleItem;
18
+ module.exports.TXEpgSchedulesList = xepgdoc.TXEpgSchedulesList;
19
+ module.exports.TXEpgDTSProvider = xepgdoc.TXEpgDTSProvider;
20
+ module.exports.TXEpgProviderContainer = xepgdoc.TXEpgProviderContainer;
21
+ module.exports.TXEpgHeaderContainer = xepgdoc.TXEpgHeaderContainer;
21
22
 
22
23
  // re-export stuff from `@ygracs/xobj-lib-js` module
23
- exports.TXmlContentParseOptions = xObj.TXmlContentParseOptions;
24
+ module.exports.TXmlContentParseOptions = xObj.TXmlContentParseOptions;
24
25
 
25
26
  /**/// will deprecate
26
- exports.TXepgDTSProvider = xepg_doc.TXepgDTSProvider;
27
+ module.exports.TXepgDTSProvider = xepgdoc.TXepgDTSProvider;