Skip to content

Commit 32826cd

Browse files
authored
Merge pull request #59 from danilolutz/docs/add-docs
docs: add documentations
2 parents 898ec61 + 036d12e commit 32826cd

34 files changed

+1027
-9
lines changed

.github/workflows/publish-docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
push:
3+
tags:
4+
- "*"
5+
6+
permissions:
7+
actions: read
8+
pages: write
9+
id-token: write
10+
11+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
12+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
publish-docs:
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
27+
- name: Dotnet Setup
28+
uses: actions/setup-dotnet@v3
29+
with:
30+
dotnet-version: 8.x
31+
32+
- run: dotnet tool update -g docfx
33+
- run: docfx docs/docfx.json
34+
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: 'docs/_site'
39+
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,3 +555,6 @@ coverage.json
555555
coverage.cobertura.xml
556556

557557
# End of https://www.gitignore.io/api/aspnetcore,visualstudio,visualstudiocode,openframeworks+visualstudio
558+
559+
docs/_site
560+
docs/api

CoreZipCode/Interfaces/PostCodeBaseService.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@
44

55
namespace CoreZipCode.Interfaces
66
{
7-
/// <inheritdoc />
87
/// <summary>
98
/// Postcode base service abstract class.
109
/// </summary>
1110
public abstract class PostcodeBaseService : ApiHandler
1211
{
13-
/// <inheritdoc />
1412
/// <summary>
1513
/// postalcode base service protected constructor.
1614
/// </summary>
1715
protected PostcodeBaseService() { }
1816

19-
/// <inheritdoc />
2017
/// <summary>
2118
/// postalcode base service protected constructor.
2219
/// </summary>

CoreZipCode/Interfaces/ZipCodeBaseService.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,16 @@
55

66
namespace CoreZipCode.Interfaces
77
{
8-
/// <inheritdoc />
98
/// <summary>
109
/// Zip code base service abstract class
1110
/// </summary>
1211
public abstract class ZipCodeBaseService : ApiHandler
1312
{
14-
/// <inheritdoc />
1513
/// <summary>
1614
/// Zip Code Base Service protected constructor.
1715
/// </summary>
1816
protected ZipCodeBaseService() { }
1917

20-
/// <inheritdoc />
2118
/// <summary>
2219
/// Zip Code Base Service protected constructor.
2320
/// </summary>

CoreZipCode/Services/Postcode/PostalpincodeInApi/PostalpincodeIn.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33

44
namespace CoreZipCode.Services.Postcode.PostalpincodeInApi
55
{
6+
/// <summary>
7+
/// Provides access to the Postalpincode.in API for retrieving postal code information.
8+
/// </summary>
9+
/// <remarks>This class extends <see cref="PostcodeBaseService"/> to implement API-specific behavior for
10+
/// Postalpincode.in. Use this class to construct requests and obtain data related to Indian postal pincodes.
11+
/// Instances can be initialized with an <see cref="HttpClient"/> to customize HTTP request handling.
12+
/// For more information about the Postal Pin Code API, see http://www.postalpincode.in/.</remarks>
613
public class PostalpincodeIn : PostcodeBaseService
714
{
815
public PostalpincodeIn() { }

CoreZipCode/Services/Postcode/PostalpincodeInApi/PostalpincodeInModel.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
namespace CoreZipCode.Services.Postcode.PostalpincodeInApi
66
{
7+
/// <summary>
8+
/// Represents the response model for postal pincode queries, containing status information, a message, and a
9+
/// collection of post office details.
10+
/// </summary>
11+
/// <remarks>This class is typically used to deserialize responses from postal pincode APIs. The
12+
/// properties correspond to the expected fields in the API response, allowing access to the status, message, and
13+
/// associated post office data.</remarks>
714
[Serializable]
815
public class PostalpincodeInModel
916
{
@@ -17,6 +24,14 @@ public class PostalpincodeInModel
1724
public List<PostOffice> PostOffice { get; set; }
1825
}
1926

27+
/// <summary>
28+
/// Represents a postal office location and its associated details, including name, branch type, delivery status,
29+
/// and geographic information.
30+
/// </summary>
31+
/// <remarks>This class is typically used to model information about a post office for address validation,
32+
/// postal lookup, or geographic categorization scenarios. All properties are read-write and correspond to standard
33+
/// attributes found in postal systems. Instances of this class can be serialized for data exchange or storage
34+
/// purposes.</remarks>
2035
[Serializable]
2136
public class PostOffice
2237
{

CoreZipCode/Services/Postcode/PostcodesIoApi/PostcodesIo.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33

44
namespace CoreZipCode.Services.Postcode.PostcodesIoApi
55
{
6+
/// <summary>
7+
/// Provides access to postcode lookup services using the Postcodes.io API.
8+
/// </summary>
9+
/// <remarks>This class extends <see cref="PostcodeBaseService"/>. Use this class to construct requests for postcode
10+
/// information via the postcodes.io endpoint. Inherit from this class to extend or customize postcode-related operations.
11+
/// This class is intended for use with UK postcodes and relies on an HTTP client for making API requests. For more
12+
/// information about the Postcodes API, see https://postcodes.io.</remarks>
613
public class PostcodesIo : PostcodeBaseService
714
{
815
public PostcodesIo() { }

CoreZipCode/Services/Postcode/PostcodesIoApi/PostcodesIoModel.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
namespace CoreZipCode.Services.Postcode.PostcodesIoApi
66
{
7+
/// <summary>
8+
/// Represents the response model for the Postcodes.io API, containing the status code and a collection of postcode
9+
/// results.
10+
/// </summary>
11+
/// <remarks>This class is typically used to deserialize JSON responses from the Postcodes.io service. The
12+
/// structure matches the standard response format returned by the API for postcode queries.</remarks>
713
[Serializable]
814
public class PostcodesIoModel
915
{
@@ -14,6 +20,15 @@ public class PostcodesIoModel
1420
public List<Result> Result { get; set; }
1521
}
1622

23+
/// <summary>
24+
/// Represents detailed information about a UK postcode, including geographic, administrative, and electoral data as
25+
/// returned by postcode lookup services.
26+
/// </summary>
27+
/// <remarks>This class provides structured access to various attributes associated with a postcode, such
28+
/// as location coordinates, administrative regions, and health authorities. It is typically used to deserialize
29+
/// responses from postcode APIs and may contain null or default values for properties where data is unavailable.
30+
/// Thread safety is not guaranteed; if multiple threads access an instance concurrently, external synchronization
31+
/// is required.</remarks>
1732
[Serializable]
1833
public class Result
1934
{
@@ -90,6 +105,14 @@ public class Result
90105
public Codes Codes { get; set; }
91106
}
92107

108+
/// <summary>
109+
/// Represents a collection of administrative and geographic codes associated with a location, such as district,
110+
/// county, ward, parish, and constituency identifiers.
111+
/// </summary>
112+
/// <remarks>This class is typically used to provide standardized codes for various administrative
113+
/// divisions in the United Kingdom. The codes correspond to specific government or statistical regions and can be
114+
/// used for data integration, analysis, or mapping purposes. All properties are optional and may be null if the
115+
/// corresponding code is not available.</remarks>
93116
[Serializable]
94117
public class Codes
95118
{

CoreZipCode/Services/ZipCode/SmartyApi/Smarty.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55

66
namespace CoreZipCode.Services.ZipCode.SmartyApi
77
{
8+
/// <summary>
9+
/// Provides access to Smarty ZIP code and street address lookup services using authenticated API requests.
10+
/// </summary>
11+
/// <remarks>Use this class to construct authenticated requests to the Smarty US ZIP code and
12+
/// street address APIs. The class requires valid authentication credentials, which are used to authorize each
13+
/// request. Inherit from <see cref="ZipCodeBaseService"/> to enable integration with other ZIP code service implementations. This
14+
/// class is not thread-safe; create a separate instance for each concurrent operation if needed. For more information about the Smarty API, see
15+
/// https://www.smarty.com/.</remarks>
816
public class Smarty : ZipCodeBaseService
917
{
1018
private const string ZipCodeSizeErrorMessage = "Invalid ZipCode Size";

CoreZipCode/Services/ZipCode/SmartyApi/SmartyException.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
namespace CoreZipCode.Services.ZipCode.SmartyApi
44
{
5+
/// <summary>
6+
/// Represents errors that occur during Smarty operations.
7+
/// </summary>
8+
/// <remarks>Use this exception to indicate failures specific to Smarty functionality. This exception is
9+
/// typically thrown when an operation cannot be completed due to invalid input, configuration issues, or other
10+
/// conditions unique to Smarty. For general exceptions, use the base <see cref="Exception"/> class.</remarks>
511
public class SmartyException : Exception
612
{
713
public SmartyException(string message) : base(message)

0 commit comments

Comments
 (0)