Skip to content

Implement way to switch between high-level and low-level APIs #156

@mr-smidge

Description

@mr-smidge

Overview

There must be a way for a developer to switch between the "high-level API" (e.g. djinterop::database) and "low-level APIs" (e.g. djinterop::engine::v2::engine_library) when in possession of one or the other.

The engine_library class already has a method database(), which allows access to the high-level API. But there is no equivalent in the other direction.

Acceptance Criteria

  • All handle-like type in the high-level API (e.g. database, track, crate, playlist) must offer a way to cast to the equivalent in a low-level API.
    • A failure to cast (e.g. wrong low-level database type) must result in an appropriately human-readable exception to the developer.
  • All types in each low-level API which have an equivalent in the high-level API must offer a way to cast to that equivalent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions