Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions components/lessonspace/.gitignore

This file was deleted.

73 changes: 73 additions & 0 deletions components/lessonspace/actions/launch-space/launch-space.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import app from "../../lessonspace.app.mjs";

export default {
key: "lessonspace-launch-space",
name: "Launch Space",
description: "Launch a unified space on Lessonspace. [See the documentation](https://api.thelessonspace.com/v2/docs/#tag/Spaces-greater-Launch)",
version: "0.0.1",
type: "action",
props: {
app,
spaceId: {
propDefinition: [
app,
"spaceId",
],
},
name: {
propDefinition: [
app,
"name",
],
},
allowGuests: {
propDefinition: [
app,
"allowGuests",
],
},
recordContent: {
propDefinition: [
app,
"recordContent",
],
},
transcribe: {
propDefinition: [
app,
"transcribe",
],
},
recordAv: {
propDefinition: [
app,
"recordAv",
],
},
userName: {
propDefinition: [
app,
"userName",
],
},
},

async run({ $ }) {
const response = await this.app.launchSpace({
$,
data: {
id: this.spaceId,
name: this.name,
allow_guests: this.allowGuests,
record_content: this.recordContent,
transcribe: this.transcribe,
record_av: this.recordAv,
user: {
name: this.userName,
},
},
});
$.export("$summary", `Successfully launched space named ${this.name}`);
return response;
},
};
13 changes: 0 additions & 13 deletions components/lessonspace/app/lessonspace.app.ts

This file was deleted.

72 changes: 72 additions & 0 deletions components/lessonspace/lessonspace.app.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import { axios } from "@pipedream/platform";

export default {
type: "app",
app: "lessonspace",
propDefinitions: {
spaceId: {
type: "string",
label: "Space ID",
description: "The ID of the Space",
},
name: {
type: "string",
label: "Name",
description: "The name of the Space",
},
allowGuests: {
type: "boolean",
label: "Allow Guests",
description: "Whether to allow guests or not in the Space",
},
recordContent: {
type: "boolean",
label: "Record Content",
description: "Whether or not the space content will be recorded for this session",
},
transcribe: {
type: "boolean",
label: "Transcribe",
description: "Whether or not a transcription will be generated for this session",
},
recordAv: {
type: "boolean",
label: "Record AV",
description: "Whether or not audio and video will be recorded in this session",
},
userName: {
type: "string",
label: "User Name",
description: "Full name of the person joining this space",
},
},
methods: {
_baseUrl() {
return "https://api.thelessonspace.com/v2";
},
async _makeRequest(opts = {}) {
const {
$ = this,
path,
headers,
...otherOpts
} = opts;
return axios($, {
...otherOpts,
url: this._baseUrl() + path,
headers: {
"Authorization": `Organisation ${this.$auth.api_key}`,
...headers,
},
});
},

async launchSpace(args = {}) {
return this._makeRequest({
path: "/spaces/launch/",
method: "post",
...args,
});
},
},
};
8 changes: 5 additions & 3 deletions components/lessonspace/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
"name": "@pipedream/lessonspace",
"version": "0.0.2",
"version": "0.1.0",
"description": "Pipedream Lessonspace Components",
"main": "dist/app/lessonspace.app.mjs",
"main": "lessonspace.app.mjs",
"keywords": [
"pipedream",
"lessonspace"
],
"files": ["dist"],
"homepage": "https://pipedream.com/apps/lessonspace",
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^3.0.3"
}
}
6 changes: 5 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading