osuny-owl 2.3.0 → 2.4.0

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/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "osuny-owl",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Osuny Owl is an object that can go talk to the Osuny API, to create post or other osuny components from a large amount of data",
5
- "keywords": ["osuny", "api"],
5
+ "keywords": [
6
+ "osuny",
7
+ "api"
8
+ ],
6
9
  "license": "GPL-3.0",
7
10
  "author": "Sacha André",
8
11
  "type": "module",
@@ -14,4 +17,4 @@
14
17
  "dotenv": "^16.5.0",
15
18
  "node-fetch": "^3.3.2"
16
19
  }
17
- }
20
+ }
@@ -0,0 +1,16 @@
1
+ export function createEmbed(code, transcription, migration_identifier, position, title = "", transcription_title = "") {
2
+ return {
3
+ "id": null,
4
+ "migration_identifier": migration_identifier,
5
+ "template_kind": "embed",
6
+ "title": title,
7
+ "position": position,
8
+ "published": true,
9
+ "html_class": null,
10
+ "data": {
11
+ "code": code,
12
+ "transcription": transcription,
13
+ "transcription_title": transcription_title
14
+ }
15
+ }
16
+ }
@@ -3,4 +3,5 @@ export { createChapter } from './chapter.js';
3
3
  export { createDatatable } from './datatable.js';
4
4
  export { createVideo } from './video.js';
5
5
  export { createImage } from './image.js';
6
- export { createTimeline } from './timeline.js';
6
+ export { createTimeline } from './timeline.js';
7
+ export { createEmbed } from './embed.js';
@@ -15,6 +15,7 @@ export class OsunyUtility {
15
15
  static createVideo = blocks.createVideo;
16
16
  static createImage = blocks.createImage;
17
17
  static createTimeline = blocks.createTimeline;
18
+ static createEmbed = blocks.createEmbed;
18
19
  static createPost = createPost;
19
20
  static createProject = createProject;
20
21
  static composePost = composePost;