diff --git a/docsite/docs/development/dev-source.mdx b/docsite/docs/development/dev-source.mdx index 07de0b57..c67aa906 100644 --- a/docsite/docs/development/dev-source.mdx +++ b/docsite/docs/development/dev-source.mdx @@ -35,44 +35,44 @@ The eaiest way to use this for our new config is focus on implementing only the Create a new file for your config and implement a **data** schema, this is the required config for the Source to operate: +title="src/backend/common/infrastructure/config/source/coolplayer.ts"/> Basic options and the complete config shape: +title="src/backend/common/infrastructure/config/source/coolplayer.ts"/> If your Source should also be configurable via [ENV](/configuration?configType=env#configuration-types) then implement a separate shape for ENV (reusing shape from data/options) as well as an `envSchemas` object that is used by MS for validation, generating ENV config docs, and transforming common ENV keys for your Source: +title="src/backend/common/infrastructure/config/source/coolplayer.ts"/> Finally, add a shape for use with [AIO](/configuration?configType=aio#configuration-types) config: +title="src/backend/common/infrastructure/config/source/coolplayer.ts"/> #### Add to Config Map @@ -136,12 +136,12 @@ Now we will create a new Source inheriting from [`AbstractComponent`](dev-common First we create a new Source called `CoolPlayerSource` and setup our constructor to accept the config as well as setting any behavior `overrides`. +title="src/backend/sources/CoolPlayerSource.ts"/> ### Implement Stages @@ -152,9 +152,9 @@ Next we will implement the [Stages](dev-common.md#stages) required to get CoolPl First we implement the [Build Data Stage](dev-common.md#stage-build-data). We will check the `baseUrl` property includes the necessary prefix and then parse it to a normalized data structure we can use elsewhere. Second we will implement the [Check Connection Stage](dev-common.md#stage-check-connection): Finally, we will implement [Auth Test Stage](dev-common.md#stage-test-auth): @@ -267,7 +267,7 @@ To have your Source try to scrobble "missed" tracks when MS starts up the Source * track information * timestamp of when the track was played -In your Source implement [`getBackloggedPlays`](https://github.com/FoxxMD/multi-scrobbler/blob/master/src/backend/sources/AbstractSource.ts#L235) and set setting in constructor indicating it has backlogging capabilities: +In your Source implement `getBackloggedPlays` and set setting in constructor indicating it has backlogging capabilities: ```ts title="src/backend/sources/CoolPlayerSource.ts" import request from 'superagent';