Skip to content

Commit

Permalink
Poprawki + dodanie readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jarmatys committed Aug 2, 2023
1 parent 540047c commit aac21a9
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
continue-on-error: false

- name: 🚀 Push new nuget package
run: dotnet nuget push ./artifacts/REGON.${{ github.ref_name }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
run: dotnet nuget push ./artifacts/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 JAROSŁAW ARMATYS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# REGON
# REGON

TBD
Klient dla REGON SOAP API dla aplikacji .NET.

![GitHub](https://img.shields.io/github/license/jarmatys/REGON) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/jarmatys/REGON/continuous-integration.yml?branch=master) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/jarmatys/REGON/release.yml?label=release) ![Nuget](https://img.shields.io/nuget/v/REGON?label=version) ![Nuget](https://img.shields.io/nuget/dt/REGON) ![GitHub issues](https://img.shields.io/github/issues/jarmatys/REGON) ![GitHub pull requests](https://img.shields.io/github/issues-pr/jarmatys/REGON)


## Instalacja
```
dotnet add package REGON --version X.X.X
```

## Użycie

Wstrzykiwanie klienta REGON za pomocą dependency injection:

```bash
services.AddRegonClient("<TWOJ-KLUCZ-API>");
```

Użycie klienta:
```
private readonly IRegonClient _regonClient;
public Konstruktor(IRegonClient regonClient)
{
_regonClient = regonClient;
}
```

## Metody
- GetCompanyDataByNip(string nip)
- GetCompanyDataByKrs(string krs)
12 changes: 9 additions & 3 deletions REGON.Client/REGON.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0"/>
</ItemGroup>

<PropertyGroup>
Expand All @@ -16,10 +16,16 @@
<Company>ARMATYS.ME</Company>
<PackageDescription>REGON API CONNECTOR</PackageDescription>
<RepositoryUrl>https://github.com/jarmatys/REGON</RepositoryUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>


<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\"/>
<None Include="..\LICENSE" Pack="true" PackagePath="\"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\REGON.Infrastructure\REGON.Infrastructure.csproj" />
<ProjectReference Include="..\REGON.Infrastructure\REGON.Infrastructure.csproj"/>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion REGON.Client/Services/RegonClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using REGON.Infrastructure.Enums;
using REGON.Common.Enums;
using REGON.Infrastructure.Models;
using REGON.Infrastructure.Responses;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace REGON.Infrastructure.Enums
namespace REGON.Common.Enums
{
public enum LegalForm
{
Expand Down
9 changes: 9 additions & 0 deletions REGON.Common/REGON.Common.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion REGON.Infrastructure/Client.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using REGON.Infrastructure.Enums;
using REGON.Common.Enums;
using REGON.Infrastructure.Models;

namespace REGON.Infrastructure
Expand Down
4 changes: 4 additions & 0 deletions REGON.Infrastructure/REGON.Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@
<PackageReference Include="WcfCoreMtomEncoder" Version="0.1.16" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\REGON.Common\REGON.Common.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion REGON.Infrastructure/Responses/Company.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
using REGON.Infrastructure.Enums;
using REGON.Common.Enums;
using REGON.Infrastructure.Models;

namespace REGON.Infrastructure.Responses
Expand Down
6 changes: 6 additions & 0 deletions REGON.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "REGON.Infrastructure", "REG
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "REGON.Client", "REGON.Client\REGON.Client.csproj", "{8BF0CB9E-F82F-435A-A15A-FC86931664C4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "REGON.Common", "REGON.Common\REGON.Common.csproj", "{F8A4786F-08EE-4DF5-876F-E24F93A9EDB3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,6 +23,10 @@ Global
{8BF0CB9E-F82F-435A-A15A-FC86931664C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8BF0CB9E-F82F-435A-A15A-FC86931664C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8BF0CB9E-F82F-435A-A15A-FC86931664C4}.Release|Any CPU.Build.0 = Release|Any CPU
{F8A4786F-08EE-4DF5-876F-E24F93A9EDB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F8A4786F-08EE-4DF5-876F-E24F93A9EDB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F8A4786F-08EE-4DF5-876F-E24F93A9EDB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F8A4786F-08EE-4DF5-876F-E24F93A9EDB3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit aac21a9

Please sign in to comment.