Skip to content

Add game-specific service data exporters #142

@samuelthomas2774

Description

@samuelthomas2774

Add data exporters that can be run manually from saved data/automatically after downloading new data, e.g. Splatoon battles.

Add an interface that can be implemented by uploaders for Splashcat (@catgirlinspace) and other services to transform and export downloaded data, e.g.

interface DataTransformer {
    // Add a separate optional method for each type of data that can be downloaded from game-specific services
    // The transformer can reject any data, e.g. as invalid or unsupported, by just not implementing the method or throwing, so it won't be listed as an available export destination for that item
    transformSplatoon3VsBattleHistory?(data: VsBattleHistory): Promise<unknown>;
    transformSplatoon3CoopBattleHistory?(data: CoopBattleHistory): Promise<unknown>;
    // ...
}

// TODO: add a separate interface to actually upload data, either call a method on the returned object or passing it to something else?

interface DataExporter {
    upload(data: unknown, account: DataExporterAccount, context: unknown): Promise<void>;
}

Also add a command to list downloaded data and export status, and export any already downloaded items. Add an option like --upload-to [account] to existing monitoring commands. Any services will have their own separate commands to manage accounts. In the Electron app accounts will be managed as in #141.

Metadata

Metadata

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions