Type Alias: BeatmapCollectionModule
BeatmapCollectionModule =
object
Defined in: src/collections.ts:113
import type { BeatmapCollectionModule } from 'osu-files'
return db.collections.get.first()?.NameProperties
get
readonlyget:Collections
Defined in: src/collections.ts:115
Returns read-only collection snapshots through get.
write
readonlywrite: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
| Parameter | Type |
|---|---|
collectionId | string |
md5 | string |
Returns
void
This example requires Node.js.
import { BeatmapCollectionModule } from 'osu-files'
return undefinedexportLegacy()
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
| Parameter | Type |
|---|---|
collection | BeatmapCollection | { 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.
import { BeatmapCollectionModule } from 'osu-files'
return undefinedimportLegacy()
importLegacy(
filePath):object
Defined in: src/collections.ts:119
Imports an osu!stable collection.db into the Realm database.
Parameters
| Parameter | Type |
|---|---|
filePath | string |
Returns
object
imported
imported:
number
merged
merged:
number
This example requires Node.js.
import { BeatmapCollectionModule } from 'osu-files'
return undefinedremoveBeatmap()
removeBeatmap(
collectionId,md5):void
Defined in: src/collections.ts:125
Removes one beatmap MD5 from a collection.
Parameters
| Parameter | Type |
|---|---|
collectionId | string |
md5 | string |
Returns
void
This example requires Node.js.
import { BeatmapCollectionModule } from 'osu-files'
return undefined