Skip to content

Type Alias: BeatmapCollectionModule ​

BeatmapCollectionModule = object

Defined in: src/collections.ts:113

ts
import type { BeatmapCollectionModule } from 'osu-files'

return db.collections.get.first()?.Name

Properties ​

get ​

readonly get: Collections

Defined in: src/collections.ts:115

Returns read-only collection snapshots through get.


write ​

readonly write: Crud<BeatmapCollection>

Defined in: src/collections.ts:117

Creates, updates, deletes, or upserts collections.

Methods ​

addBeatmap() ​

addBeatmap(collectionId, md5): void

Defined in: src/collections.ts:123

Adds one beatmap MD5 to a collection.

Parameters ​

ParameterType
collectionIdstring
md5string

Returns ​

void

This example requires Node.js.

ts
import { BeatmapCollectionModule } from 'osu-files'

return undefined

exportLegacy() ​

exportLegacy(collection): Buffer

Defined in: src/collections.ts:121

Exports a collection, snapshot, or iterable of either to osu!stable's legacy binary format.

Parameters ​

ParameterType
collectionBeatmapCollection | { BeatmapMD5Hashes: (string | undefined)[]; ID: BSON.UUID; LastModified: Date; Name?: string; } | Iterable<BeatmapCollection | { BeatmapMD5Hashes: (string | undefined)[]; ID: BSON.UUID; LastModified: Date; Name?: string; }, any, any>

Returns ​

Buffer

This example requires Node.js.

ts
import { BeatmapCollectionModule } from 'osu-files'

return undefined

importLegacy() ​

importLegacy(filePath): object

Defined in: src/collections.ts:119

Imports an osu!stable collection.db into the Realm database.

Parameters ​

ParameterType
filePathstring

Returns ​

object

imported ​

imported: number

merged ​

merged: number

This example requires Node.js.

ts
import { BeatmapCollectionModule } from 'osu-files'

return undefined

removeBeatmap() ​

removeBeatmap(collectionId, md5): void

Defined in: src/collections.ts:125

Removes one beatmap MD5 from a collection.

Parameters ​

ParameterType
collectionIdstring
md5string

Returns ​

void

This example requires Node.js.

ts
import { BeatmapCollectionModule } from 'osu-files'

return undefined

Released under the MIT License.