AdventoAPI.CPB 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package AdventoAPI.CPB --version 1.0.0
                    
NuGet\Install-Package AdventoAPI.CPB -Version 1.0.0
                    
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="AdventoAPI.CPB" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AdventoAPI.CPB" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="AdventoAPI.CPB" />
                    
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 AdventoAPI.CPB --version 1.0.0
                    
#r "nuget: AdventoAPI.CPB, 1.0.0"
                    
#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 AdventoAPI.CPB@1.0.0
                    
#: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=AdventoAPI.CPB&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=AdventoAPI.CPB&version=1.0.0
                    
Install as a Cake Tool

AdventoAPI.CPB

An API wrapper designed to scrape and provide structured access to religious content (Adult Lessons and Devotionals) from the CPB (Casa Publicadora Brasileira) website.

🚀 Features

Adult Lessons (LicaoAdulto)

Provides comprehensive access to the Adult Sabbath School lessons:

  • Daily Content: Retrieve lessons for specific days of the week or the current day.
  • Quarterly Overview: Access a summary of all lessons for the current quarter.
  • Themes & Verses: Extract weekly themes and specific verses to memorize.
  • Keyword Search: Search for specific words across a single week or the entire quarter.
  • Auxiliary Material: Retrieve auxiliary lessons and informative content.

Devotionals (DevocionalBase & Implementations)

A modular system to access various devotional categories:

  • Daily Devotional (DevocionalDiario)
  • Youth Devotional (DevocionalJovem)
  • Women's Devotional (DevocionalMulher)
  • Core Capabilities:
    • List all devotional blocks by date range.
    • Retrieve specific meditation metadata.
    • Fetch full devotional content including biblical verses and titles.

🛠️ Technical Stack

  • Framework: .NET 10
  • Language: C# 14.0
  • HTML Parsing: AngleSharp
  • HTTP Client: IHttpClientFactory for resilient web requests.

📦 Usage

Dependency Injection

The services require IHttpClientFactory to be registered in your application:

builder.Services.AddHttpClient();
builder.Services.AddScoped<LicaoAdulto>();
builder.Services.AddScoped<DevocionalDiario>();
builder.Services.AddScoped<DevocionalJovem>();
builder.Services.AddScoped<DevocionalMulher>();

Example: Getting Today's Lesson

var licaoAdulto = serviceProvider.GetRequiredService<LicaoAdulto>();
var today = await licaoAdulto.GetDiaAtual();
Console.WriteLine($"Title: {today.Titulo}");
Console.WriteLine($"Content: {today.Conteudo}");

Example: Getting a Devotional

var devocionalJovem = serviceProvider.GetRequiredService<DevocionalJovem>();
var blocks = await devocionalJovem.GetDevocionaisAsync();
var info = await devocionalJovem.GetDevocional(blocks[0].Dias[0].Href);
Console.WriteLine($"Devotional: {info.Title}");

⚠️ Disclaimer

This package performs web scraping. Please ensure compliance with the target website's Terms of Service and robots.txt.

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
1.0.5 93 5/24/2026
1.0.4 98 5/22/2026
1.0.3 93 5/21/2026
1.0.2 92 5/21/2026
1.0.1 88 5/20/2026
1.0.0 98 5/19/2026