![]() |
VOOZH | about |
dotnet add package ReportSharp.Api --version 1.0.5
NuGet\Install-Package ReportSharp.Api -Version 1.0.5
<PackageReference Include="ReportSharp.Api" Version="1.0.5" />
<PackageVersion Include="ReportSharp.Api" Version="1.0.5" />Directory.Packages.props
<PackageReference Include="ReportSharp.Api" />Project file
paket add ReportSharp.Api --version 1.0.5
#r "nuget: ReportSharp.Api, 1.0.5"
#:package ReportSharp.Api@1.0.5
#addin nuget:?package=ReportSharp.Api&version=1.0.5Install as a Cake Addin
#tool nuget:?package=ReportSharp.Api&version=1.0.5Install as a Cake Tool
Api for ReportSharp.DatabaseReporter of ReportSharp package
ReportSharp.DatabaseReporter: 1.0.5
Dotnet Core 3.1 or later
You need to install and configure ReportSharp and ReportSharp.DatabaseReporter 1.0.5 or later to use this package.
ConfigureServices method in Startup class:services.AddReportSharp(options => {
options.ConfigReportSharp(routerOptions =>
routerOptions.SetApiPrefix("/")
.SetUsername("Username")
.SetSecretKey("SecretKey")
);
options.AddApis(apiOptions =>
apiOptions.UseAuthorization<DefaultApiAuthorizationService>()
);
});
Configure method in Startup class:app.UseReportSharp(configure => {
configure.UseApis();
});
services section, before builder.Build() line:services.AddReportSharp(options => {
options.ConfigReportSharp(routerOptions =>
routerOptions.SetApiPrefix("/")
.SetUsername("Username")
.SetSecretKey("SecretKey")
);
options.AddApis(apiOptions =>
apiOptions.UseAuthorization<DefaultApiAuthorizationService>()
);
});
Configure section, after builder.Build() line:app.UseReportSharp(configure => {
configure.UseApis();
});
| URL | Header | , | Query | , | Action |
|---|---|---|---|---|---|
| ApiPrefix+"request/" | username, password | ,page, pageSize | ,List of reported requests to database | ||
| ApiPrefix+"request/{id}" | username, password | ,Get reported request | |||
| ApiPrefix+"exception/" | username, password | ,page, pageSize | ,List of reported exceptions to database | ||
| ApiPrefix+"exception/{id}" | username, password | ,Get reported exceptions | |||
| ApiPrefix+"data/" | username, password | ,page, pageSize | ,List of reported data to database | ||
| ApiPrefix+"data/{id}" | username, password | ,Get reported data |
public string CalculatePassword(string username)
{
var now = DateTime.Now;
var usernameCode = GetAsciiValue(username);
var secretKeyCode = GetAsciiValue(ReportSharpApiConfig.SecretKey);
var mergedUsernameSecretKey = long.Parse($"{usernameCode}{secretKeyCode}");
var todayCode = long.Parse($"{now.Year:0000}{now.Month:00}{now.Day:00}");
var validPassword = mergedUsernameSecretKey ^ todayCode;
return validPassword.ToString();
}
public long GetAsciiValue(string str)
{
return str.ToCharArray().Aggregate(0, (current, c) => current + c);
}
CalculatePassword method in above source code is password for apis.IApiAuthorizationService interface in your Authorization class and enable it by apiOptions.UseAuthorization<YourAuthorization>()USDT:TJ57yPBVwwK8rjWDxogkGJH1nF3TGPVq98 for USDT TRC200x743379201B80dA1CB680aC08F54b058Ac01346F1 for USDT ERC20| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.1 netcoreapp3.1 is compatible. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.5 | 1,064 | 12/31/2021 |