Kemenkeu.Client.Hris.Profil
0.1.0
dotnet add package Kemenkeu.Client.Hris.Profil --version 0.1.0
NuGet\Install-Package Kemenkeu.Client.Hris.Profil -Version 0.1.0
<PackageReference Include="Kemenkeu.Client.Hris.Profil" Version="0.1.0" />
<PackageVersion Include="Kemenkeu.Client.Hris.Profil" Version="0.1.0" />
<PackageReference Include="Kemenkeu.Client.Hris.Profil" />
paket add Kemenkeu.Client.Hris.Profil --version 0.1.0
#r "nuget: Kemenkeu.Client.Hris.Profil, 0.1.0"
#:package Kemenkeu.Client.Hris.Profil@0.1.0
#addin nuget:?package=Kemenkeu.Client.Hris.Profil&version=0.1.0
#tool nuget:?package=Kemenkeu.Client.Hris.Profil&version=0.1.0
Kemenkeu.Client.Hris.Profil
This project is a NuGet package designed to provide functionalities related to the HRIS Profil module for Kemenkeu applications.
Features
- Provides APIs for managing HRIS Profil 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.Profil
Or via .NET CLI:
dotnet add package Kemenkeu.Client.Hris.Profil
Configuration
Add the following configuration to your appsettings.json
and adjust according the system config:
1. With User Token
{
"ExternalService": {
"BaseUrl": "https://thegatewayservice.com"
}
}
2. With Application Token
{
"Auth": {
"AuthorityUrl": "https://authorizationserver.net",
},
"ExternalService": {
"BaseUrl": "https://gatewayserver.net",
"Auth": {
"ClientId": "client_id",
"ClientSecret": "client_secret",
"GrantType": "grant_type",
"Scope": "scope"
},
}
}
or
{
"ExternalService": {
"BaseUrl": "https://gatewayserver.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()
.AddProfil();
});
// 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()
.AddProfil();
});
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()
.AddProfil();
});
// 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()
.AddProfil();;
});
var app = builder.Build();
// Configure others.
app.Run();
3. Setup in your Project Controller
or Service
via IKemenkeuClient
and Hris()
and Profil()
extension method
- Add a reference to the
Kemenkeu.Client.Core
,Kemenkeu.Client.Hris.Core
, andKemenkeu.Client.Hris.Profil
package in your project. - Import the necessary namespaces in your code:
using Kemenkeu.Client.Core;
using Kemenkeu.Client.Hris.Core;
using Kemenkeu.Client.Hris.Profil;
- 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<HrisProfil>> GetAsync()
{
return await _kemenkeuClient.Hris().Profil().GetPegawaiById(0);
}
}
Sample usage in services:
public class SampleService
{
private readonly IKemenkeuClient _kemenkeuClient;
public SampleService(IKemenkeuClient kemenkeuClient)
{
_kemenkeuClient = kemenkeuClient;
}
public async Task<HrisProfil> GetProfilAsync()
{
return await _kemenkeuClient.Hris().Profil().GetPegawaiById(0);
}
}
4. Setup in your Project Controller
or Service
using IHrisProfilService
directly
- Add a reference to the
Kemenkeu.Client.Hris.Profil
package in your project. - Import the necessary namespaces in your code:
using Kemenkeu.Client.Hris.Profil;
- Utilize the provided classes and methods as needed.
Sample usage directly in controllers:
[ApiController]
[Route("[controller]")]
public class SampleController : ControllerBase
{
private readonly IHrisProfilService _hrisProfilService;
public SampleController(IHrisProfilService hrisProfilService)
{
_hrisProfilService = hrisProfilService;
}
[HttpGet]
public async Task<ActionResult<HrisProfil>> GetAsync()
{
return await _hrisProfilService.GetPegawaiById(0);
}
}
Sample usage in services:
public class SampleService
{
private readonly IHrisProfilService _hrisProfilService;
public SampleService(IHrisProfilService hrisProfilService)
{
_hrisProfilService = hrisProfilService;
}
public async Task<HrisProfil> GetProfilAsync()
{
return await _hrisProfilService.GetPegawaiById(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 is compatible. 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)
-
net8.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.0 | 237 | 4/14/2025 |