AdventoAPI.CPB
1.0.0
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
<PackageReference Include="AdventoAPI.CPB" Version="1.0.0" />
<PackageVersion Include="AdventoAPI.CPB" Version="1.0.0" />
<PackageReference Include="AdventoAPI.CPB" />
paket add AdventoAPI.CPB --version 1.0.0
#r "nuget: AdventoAPI.CPB, 1.0.0"
#:package AdventoAPI.CPB@1.0.0
#addin nuget:?package=AdventoAPI.CPB&version=1.0.0
#tool nuget:?package=AdventoAPI.CPB&version=1.0.0
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:
IHttpClientFactoryfor 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 | Versions 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. |
-
net10.0
- AngleSharp (>= 1.4.0)
- Microsoft.Extensions.Http (>= 10.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.