YouVersion.Platform.SDK.Services.Unofficial 0.1.3

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package YouVersion.Platform.SDK.Services.Unofficial --version 0.1.3
                    
NuGet\Install-Package YouVersion.Platform.SDK.Services.Unofficial -Version 0.1.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YouVersion.Platform.SDK.Services.Unofficial" Version="0.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YouVersion.Platform.SDK.Services.Unofficial" Version="0.1.3" />
                    
Directory.Packages.props
<PackageReference Include="YouVersion.Platform.SDK.Services.Unofficial" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add YouVersion.Platform.SDK.Services.Unofficial --version 0.1.3
                    
#r "nuget: YouVersion.Platform.SDK.Services.Unofficial, 0.1.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package YouVersion.Platform.SDK.Services.Unofficial@0.1.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=YouVersion.Platform.SDK.Services.Unofficial&version=0.1.3
                    
Install as a Cake Addin
#tool nuget:?package=YouVersion.Platform.SDK.Services.Unofficial&version=0.1.3
                    
Install as a Cake Tool

YouVersion.Platform.SDK.Services.Unofficial

Part of the YouVersion Platform SDK for .NET.

Business-logic services for the YouVersion Platform SDK.

Provides VersionService, PassageService, BookService, ChapterService, HighlightService, and BibleReaderStateService — the stateful layer between the raw HTTP client (YouVersion.Platform.API.Unofficial, using types from YouVersion.Platform.API.Models.Unofficial) and the Blazor component library (YouVersion.Platform.SDK.Components.Unofficial).

Installation

dotnet add package YouVersion.Platform.SDK.Services.Unofficial

Fetching a passage

IPassageService.GetPassageAsync has two overloads: pass a pre-built Reference directly, or pass raw book/chapter/verse primitives and let the service build the Reference/VerseRange internally. Callers (including BibleReader and CustomReader in this solution) should prefer the primitive overload so Reference/VerseRange construction lives in one place rather than being duplicated at each call site.

// Single verse
Passage passage = await passageService.GetPassageAsync(
    versionId: 3034, bookUsfm: "JHN", chapter: 3, verseStart: 16);

// Verse range
Passage range = await passageService.GetPassageAsync(
    versionId: 3034, bookUsfm: "JHN", chapter: 3, verseStart: 16, verseEnd: 17);

Fetching chapters for a book

IReadOnlyList<Chapter> chapters = await chapterService.GetChaptersAsync(
    versionId: 3034, bookUsfm: "GEN");

Highlighting a passage

IHighlightService wraps the highlights API (Platform.API's IHighlightClient). Reads (GetHighlightsAsync, GetRecentColorsAsync) work with the app-key auth every other service in this package uses. Writes (CreateOrUpdateHighlightAsync, ClearHighlightsAsync) require an OAuth bearer token from a signed-in user who has granted the highlights Data Exchange permission — see AddYouVersionOAuth in YouVersion.Platform.API.Unofficial's README for that setup. There's no opaque highlight id: a highlight is identified by the (bibleId, passage) pair, and colors are always raw hex strings without a leading # (e.g. "44aa44"), not an enum — the API has no fixed palette.

// Look up existing highlights for a chapter (one entry per highlighted verse)
IReadOnlyList<Highlight> highlights = await highlightService.GetHighlightsAsync(
    bibleId: 3034, passage: chapterReference);

// Create or update a highlight
Highlight highlight = await highlightService.CreateOrUpdateHighlightAsync(
    bibleId: 3034, passage: verseReference, color: "44aa44");

// Remove it
await highlightService.ClearHighlightsAsync(bibleId: 3034, passage: verseReference);

Platform.SDK.Components's VerseComponent (and, through it, BibleReader) is the recommended way to consume this service — it already handles sign-in checks, loading, and the color-picker UI. See that package's README for how to enable highlighting when composing your own reader instead of using BibleReader directly.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated