Nedo.AspNet.PddiktiLibrary
1.1.0
dotnet add package Nedo.AspNet.PddiktiLibrary --version 1.1.0
NuGet\Install-Package Nedo.AspNet.PddiktiLibrary -Version 1.1.0
<PackageReference Include="Nedo.AspNet.PddiktiLibrary" Version="1.1.0" />
<PackageVersion Include="Nedo.AspNet.PddiktiLibrary" Version="1.1.0" />
<PackageReference Include="Nedo.AspNet.PddiktiLibrary" />
paket add Nedo.AspNet.PddiktiLibrary --version 1.1.0
#r "nuget: Nedo.AspNet.PddiktiLibrary, 1.1.0"
#:package Nedo.AspNet.PddiktiLibrary@1.1.0
#addin nuget:?package=Nedo.AspNet.PddiktiLibrary&version=1.1.0
#tool nuget:?package=Nedo.AspNet.PddiktiLibrary&version=1.1.0
Nedo.AspNet.PddiktiLibrary
A .NET 9 client for the PDDIKTI (Neo Feeder) API. It hides the token dance behind a typed client and exposes each feeder module — Mahasiswa, Dosen, Nilai, KelasKuliah, Kurikulum, Referensi and the rest — as its own endpoint group.
Moved here from
pens-pddikti-library(September 2026), where it was written for the PENS project. The code is the same; the namespace is nowNedo.AspNet.PddiktiLibraryand the sample no longer carries credentials. History was not imported — the old repository has a live feeder password in it, and copying that into a shared library was not worth the convenience ofgit log.
Features
- Automatic authentication:
GetTokenis handled transparently and the token cached for subsequent requests. - Typed execution:
ExecuteAsync<T>maps feeder responses onto DTOs. - Dependency injection: registers through
Microsoft.Extensions.DependencyInjection. - Configurable: options through the
IOptionspattern.
Getting started
Add a project reference to src/Nedo.AspNet.PddiktiLibrary/Nedo.AspNet.PddiktiLibrary.csproj, then
register the client:
using Nedo.AspNet.PddiktiLibrary.Extensions;
services.AddPddiktiClient(options =>
{
options.BaseUrl = "http://your-pddikti-url/ws/live2.php";
options.Username = "...";
options.Password = "...";
options.TimeoutSeconds = 60; // optional, default 30
});
Never write those values as literals. Bind them from configuration — the options class carries its own section name for exactly that:
services.AddPddiktiClient(options =>
configuration.GetSection(PddiktiClientOptions.SectionName).Bind(options));
Usage
Inject IPddiktiClient and reach a module through its property:
public class MyService(IPddiktiClient client)
{
public async Task GetUniversityProfile()
{
var data = await client.Base.GetProfilPTAsync(limit: 1);
foreach (var profile in data ?? [])
Console.WriteLine($"University: {profile.NamaPerguruanTinggi}");
}
}
Project structure
src/Nedo.AspNet.PddiktiLibrary/ the client
Config/ PddiktiClientOptions
Extensions/ AddPddiktiClient
Models/<Module>/ request + response DTOs per feeder module
Modules/ one endpoint group per module, interface + implementation
src/Nedo.AspNet.PddiktiLibrary.Tests/ xUnit + Moq, HTTP handler mocked
src/Nedo.AspNet.PddiktiLibrary.Sample/ console app exercising the endpoints by hand
Sample application
The sample reads its credentials from configuration and refuses to start without them — it will
never reach a live feeder by accident. Host.CreateDefaultBuilder already loads environment
variables and user-secrets, so either works:
# environment variables (note the double underscore)
setx Pddikti__BaseUrl "http://your-pddikti-url/ws/live2.php"
setx Pddikti__Username "..."
setx Pddikti__Password "..."
# or user-secrets, which keep the password out of your shell history and environment
dotnet user-secrets init --project src/Nedo.AspNet.PddiktiLibrary.Sample
dotnet user-secrets set --project src/Nedo.AspNet.PddiktiLibrary.Sample "Pddikti:BaseUrl" "..."
dotnet user-secrets set --project src/Nedo.AspNet.PddiktiLibrary.Sample "Pddikti:Username" "..."
dotnet user-secrets set --project src/Nedo.AspNet.PddiktiLibrary.Sample "Pddikti:Password" "..."
dotnet run --project src/Nedo.AspNet.PddiktiLibrary.Sample
Unconfigured, it prints which settings are missing and exits 78 (EX_CONFIG).
The sample writes whatever the feeder returns to the console, which for most endpoints is real student and staff data. Do not commit its output.
Postman collection
pddikti_collection.json is the feeder's own collection, importable as-is. The live one is served
by your feeder at:
https://<your-pddikti-url>:3003/ws/postman
Tests
dotnet test Nedo.AspNet.PddiktiLibrary.sln
32 tests, all against a mocked HttpMessageHandler — nothing reaches a real feeder.
License
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.