diff --git a/packages/new-multiplayer-adapter/README.md b/packages/new-multiplayer-adapter/README.md index 2534e58..9ff1bb8 100644 --- a/packages/new-multiplayer-adapter/README.md +++ b/packages/new-multiplayer-adapter/README.md @@ -2,7 +2,7 @@ This package lets you start building a [jsPsych multiplayer adapter](https://github.com/jspsych/jsPsych/blob/main/docs/developers/adapter-development.md) by simply running `npx @jspsych/new-multiplayer-adapter` from the command line. -A multiplayer adapter implements jsPsych's `MultiplayerAdapter` interface and is responsible for the network I/O against a specific backend (JATOS group sessions, Firebase, a custom WebSocket server, etc.). Once written, it can be passed to `jsPsych.pluginAPI.connect()` and used by any multiplayer plugin. +A multiplayer adapter implements jsPsych's `MultiplayerAdapter` interface and is responsible for the network I/O against a specific backend (JATOS group sessions, Firebase, a custom WebSocket server, etc.). Once written, it can be passed to `jsPsych.multiplayer.connect()` and used by any multiplayer plugin. You will be prompted to enter a name for your adapter, a description, the name of the author, an optional link to the author's GitHub profile, and an optional link to a `README.md` file. A template package containing boilerplate TypeScript code will then be generated in your current working directory. diff --git a/packages/new-multiplayer-adapter/templates/adapter-template-ts/README.md b/packages/new-multiplayer-adapter/templates/adapter-template-ts/README.md index 04178ca..d76f10e 100644 --- a/packages/new-multiplayer-adapter/templates/adapter-template-ts/README.md +++ b/packages/new-multiplayer-adapter/templates/adapter-template-ts/README.md @@ -4,7 +4,7 @@ {description} -This is a [jsPsych multiplayer adapter](https://github.com/jspsych/jsPsych/blob/main/docs/developers/adapter-development.md). It implements the `MultiplayerAdapter` interface so it can be passed to `jsPsych.pluginAPI.connect()` and used by multiplayer plugins. +This is a [jsPsych multiplayer adapter](https://github.com/jspsych/jsPsych/blob/main/docs/developers/adapter-development.md). It implements the `MultiplayerAdapter` interface so it can be passed to `jsPsych.multiplayer.connect()` and used by multiplayer plugins. ## Loading diff --git a/packages/new-multiplayer-adapter/templates/adapter-template-ts/docs/docs-template.md b/packages/new-multiplayer-adapter/templates/adapter-template-ts/docs/docs-template.md index 07fe5f8..3f669ec 100644 --- a/packages/new-multiplayer-adapter/templates/adapter-template-ts/docs/docs-template.md +++ b/packages/new-multiplayer-adapter/templates/adapter-template-ts/docs/docs-template.md @@ -19,7 +19,7 @@ import {globalName} from "{npmPackageName}"; const jsPsych = initJsPsych(); // Connect the adapter before running the timeline. -await jsPsych.pluginAPI.connect(new {globalName}(/* backend-specific options */)); +await jsPsych.multiplayer.connect(new {globalName}(/* backend-specific options */)); await jsPsych.run(timeline); ``` diff --git a/packages/new-multiplayer-adapter/templates/adapter-template-ts/examples/index.html b/packages/new-multiplayer-adapter/templates/adapter-template-ts/examples/index.html index fbabcd9..d67f014 100644 --- a/packages/new-multiplayer-adapter/templates/adapter-template-ts/examples/index.html +++ b/packages/new-multiplayer-adapter/templates/adapter-template-ts/examples/index.html @@ -17,7 +17,7 @@ async function run() { // Connect the adapter before running the timeline. Pass any backend-specific // options your adapter's constructor needs. - await jsPsych.pluginAPI.connect(new {globalName}()); + await jsPsych.multiplayer.connect(new {globalName}()); const trial = { type: jsPsychMultiplayerSync, diff --git a/packages/new-multiplayer-adapter/templates/adapter-template-ts/src/index.ts b/packages/new-multiplayer-adapter/templates/adapter-template-ts/src/index.ts index 9178849..2c6896d 100644 --- a/packages/new-multiplayer-adapter/templates/adapter-template-ts/src/index.ts +++ b/packages/new-multiplayer-adapter/templates/adapter-template-ts/src/index.ts @@ -6,7 +6,7 @@ import { GroupSessionData, MultiplayerAdapter, Unsubscribe } from "jspsych"; * {description} * * A jsPsych multiplayer adapter implements the `MultiplayerAdapter` interface so it can be passed - * to `jsPsych.pluginAPI.connect(new {camelCaseName}Adapter(...))`. The adapter is responsible only + * to `jsPsych.multiplayer.connect(new {camelCaseName}Adapter(...))`. The adapter is responsible only * for network I/O against a specific backend; all higher-level behavior (subscribe replay, * `wait()` fast-path, subscription tracking) lives in jsPsych's `MultiplayerAPI`, so it stays * consistent across backends.