Kemenkeu.Client.Hris.Referensi
0.1.1
dotnet add package Kemenkeu.Client.Hris.Referensi --version 0.1.1
NuGet\Install-Package Kemenkeu.Client.Hris.Referensi -Version 0.1.1
<PackageReference Include="Kemenkeu.Client.Hris.Referensi" Version="0.1.1" />
<PackageVersion Include="Kemenkeu.Client.Hris.Referensi" Version="0.1.1" />
<PackageReference Include="Kemenkeu.Client.Hris.Referensi" />
paket add Kemenkeu.Client.Hris.Referensi --version 0.1.1
#r "nuget: Kemenkeu.Client.Hris.Referensi, 0.1.1"
#:package Kemenkeu.Client.Hris.Referensi@0.1.1
#addin nuget:?package=Kemenkeu.Client.Hris.Referensi&version=0.1.1
#tool nuget:?package=Kemenkeu.Client.Hris.Referensi&version=0.1.1
Kemenkeu.Client.Hris.Referensi
This project is a NuGet package designed to provide functionalities related to the HRIS Referensi module for Kemenkeu applications.
Features
- Provides APIs for managing HRIS Referensi data.
- Simplifies integration with Kemenkeu systems.
- Lightweight and easy to use.
Installation
To install the package, use the NuGet Package Manager Console:
Install-Package Kemenkeu.Client.Hris.Referensi
Or via .NET CLI:
dotnet add package Kemenkeu.Client.Hris.Referensi
Configuration
Add the following configuration to your appsettings.json
and adjust according the system config:
1. With User Token
{
"ExternalService": {
"BaseUrl": "https://server.net"
}
}
2. With Application Token
{
"Auth": {
"AuthorityUrl": "https://authorizationserver.net",
},
"ExternalService": {
"BaseUrl": "https://server.net",
"Auth": {
"ClientId": "client_id",
"ClientSecret": "client_secret",
"GrantType": "grant_type",
"Scope": "scope"
},
}
}
or
{
"ExternalService": {
"BaseUrl": "https://server.net",
"AuthorityUrl": "https://authorizationserver.net",
"Auth": {
"ClientId": "client_id",
"ClientSecret": "client_secret",
"GrantType": "grant_type",
"Scope": "scope"
},
}
}
Usage
1. With User Token
a. Setup in Startup.cs
In .NET 5 or Older, use Startup.cs
to configure services.
Register Kemenkeu.Client.Core
in the ConfigureServices
method:
public class Startup
{
public IConfiguration Configuration { get; }
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public void ConfigureServices(IServiceCollection services)
{
services.AddKemenkeuClient(config =>
{
config.WithUserToken(Configuration)
.AddHris()
.AddReferensi();
});
// Other services...
}
}
b. Setup in Program.cs
In .NET 6 or later, configure services directly in Program.cs
.
Configure services:
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddKemenkeuClient(config =>
{
config.WithUserToken(builder.Configuration)
.AddHris()
.AddReferensi();
});
var app = builder.Build();
// Configure others.
app.Run();
2. With Application Token
a. Setup in Startup.cs
In .NET 5 or Older, use Startup.cs
to configure services.
Register Kemenkeu.Client.Core
in the ConfigureServices
method:
public class Startup
{
public IConfiguration Configuration { get; }
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public void ConfigureServices(IServiceCollection services)
{
services.AddKemenkeuClient(config =>
{
config.WithApplicationToken(Configuration)
.AddHris()
.AddReferensi();
});
// Other services...
}
}
b. Setup in Program.cs
In .NET 6 or later, configure services directly in Program.cs
.
Configure services:
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddKemenkeuClient(config =>
{
config.WithApplicationToken(builder.Configuration)
.AddHris()
.AddReferensi();;
});
var app = builder.Build();
// Configure others.
app.Run();
3. Setup in your Project Controller
or Service
via IKemenkeuClient
and Hris()
and Referensi()
extension method
- Add a reference to the
Kemenkeu.Client.Core
,Kemenkeu.Client.Hris.Core
, andKemenkeu.Client.Hris.Referensi
package in your project. - Import the necessary namespaces in your code:
using Kemenkeu.Client.Core;
using Kemenkeu.Client.Hris.Core;
using Kemenkeu.Client.Hris.Referensi;
- Utilize the provided classes and methods as needed.
Sample usage directly in controllers:
[ApiController]
[Route("[controller]")]
public class SampleController : ControllerBase
{
private readonly IKemenkeuClient _kemenkeuClient;
public SampleController(IKemenkeuClient kemenkeuClient)
{
_kemenkeuClient = kemenkeuClient;
}
[HttpGet]
public async Task<ActionResult<HrisOrganisasiBasic>> GetAsync()
{
return await _kemenkeuClient.Hris().Referensi().Organisasi.GetRefOrganisasiById(0);
}
}
Sample usage in services:
public class SampleService
{
private readonly IKemenkeuClient _kemenkeuClient;
public SampleService(IKemenkeuClient kemenkeuClient)
{
_kemenkeuClient = kemenkeuClient;
}
public async Task<HrisOrganisasiBasic> GetOrganisasiAsync()
{
return await _kemenkeuClient.Hris().Referensi().Organisasi.GetRefOrganisasiById(0);
}
}
4. Setup in your Project Controller
or Service
using IHrisReferensiService
directly
- Add a reference to the
Kemenkeu.Client.Hris.Referensi
package in your project. - Import the necessary namespaces in your code:
using Kemenkeu.Client.Hris.Referensi;
- Utilize the provided classes and methods as needed.
Sample usage directly in controllers:
[ApiController]
[Route("[controller]")]
public class SampleController : ControllerBase
{
private readonly IHrisReferensiService _hrisReferensiService;
public SampleController(IHrisReferensiService hrisReferensiService)
{
_hrisReferensiService = hrisReferensiService;
}
[HttpGet]
public async Task<ActionResult<HrisOrganisasiBasic>> GetAsync()
{
return await _hrisReferensiService.Organisasi.GetRefOrganisasiById(0);
}
}
Sample usage in services:
public class SampleService
{
private readonly IHrisReferensiService _hrisReferensiService;
public SampleService(IHrisReferensiService hrisReferensiService)
{
_hrisReferensiService = hrisReferensiService;
}
public async Task<HrisOrganisasiBasic> GetOrganisasiAsync()
{
return await _hrisReferensiService.Organisasi.GetRefOrganisasiById(0);
}
}
Requirements
- .NET Version: This package compatible with .NET Core 2.1 (via .NET Standard 2.0), .NET Core 3.1 and later.
- Dependencies:
Kemenkeu.Client.Hris.Core
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Kemenkeu.Client.Hris.Core (>= 0.1.0)
-
.NETStandard 2.0
- Kemenkeu.Client.Hris.Core (>= 0.1.0)
-
net5.0
- Kemenkeu.Client.Hris.Core (>= 0.1.0)
-
net6.0
- Kemenkeu.Client.Hris.Core (>= 0.1.0)
-
net7.0
- Kemenkeu.Client.Hris.Core (>= 0.1.0)
-
net9.0
- Kemenkeu.Client.Hris.Core (>= 0.1.0)
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 |
---|---|---|
0.1.1 | 157 | 5/28/2025 |