diff --git a/.gitea/workflows/branch-build.yml b/.gitea/workflows/branch-build.yml index e8518ab..b0383c5 100644 --- a/.gitea/workflows/branch-build.yml +++ b/.gitea/workflows/branch-build.yml @@ -30,10 +30,9 @@ jobs: with: fetch-depth: 0 - - name: Restore tools + - name: Prepare environment run: | set -ex - dotnet tool restore -v q dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools echo "CI_SERVER_HOST=${GITEA_SERVER_URL#https://}" >> "$GITEA_ENV" diff --git a/.gitea/workflows/release-build.yml b/.gitea/workflows/release-build.yml index 7c739eb..020c1e0 100644 --- a/.gitea/workflows/release-build.yml +++ b/.gitea/workflows/release-build.yml @@ -30,10 +30,9 @@ jobs: with: fetch-depth: 0 - - name: Restore tools + - name: Prepare environment run: | set -ex - dotnet tool restore -v q dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools dotnet tool install docfx --tool-path /dotnet-tools echo "CI_SERVER_HOST=${GITEA_SERVER_URL#https://}" >> "$GITEA_ENV" diff --git a/docs/index.md b/docs/index.md index c95c8b0..7fd61eb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,6 +8,8 @@ _layout: landing The available channels are SMS, RCS and WhatsApp Business. +Here you can find the API documentation: https://developer.linkmobility.eu/ + ## NuGet packages Here is an overview of the latest package. diff --git a/src/LinkMobility/ClientOptions.cs b/src/LinkMobility/ClientOptions.cs index e346372..892242c 100644 --- a/src/LinkMobility/ClientOptions.cs +++ b/src/LinkMobility/ClientOptions.cs @@ -8,13 +8,19 @@ namespace AMWD.Net.Api.LinkMobility public class ClientOptions { /// - /// Gets or sets the default base url for the API. + /// Gets or sets the base url for the API. /// + /// + /// The default base url is https://api.linkmobility.eu/rest/. + /// public virtual string BaseUrl { get; set; } = "https://api.linkmobility.eu/rest/"; /// /// Gets or sets the default timeout for the API. /// + /// + /// The default timeout is 100 seconds. + /// public virtual TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds(100); /// @@ -28,7 +34,7 @@ namespace AMWD.Net.Api.LinkMobility public virtual IDictionary DefaultQueryParams { get; set; } = new Dictionary(); /// - /// Gets or sets a value indicating whether to allow redirects. + /// Gets or sets a value indicating whether to follow redirects from the server. /// public virtual bool AllowRedirects { get; set; } diff --git a/src/LinkMobility/ILinkMobilityClient.cs b/src/LinkMobility/ILinkMobilityClient.cs index e152d13..694f29d 100644 --- a/src/LinkMobility/ILinkMobilityClient.cs +++ b/src/LinkMobility/ILinkMobilityClient.cs @@ -9,7 +9,7 @@ namespace AMWD.Net.Api.LinkMobility public interface ILinkMobilityClient { /// - /// Performs a POST request to the LINK mobility API. + /// Performs a POST request to the LINK Mobility API. /// /// The type of the response. /// The type of the request. diff --git a/src/LinkMobility/LinkMobilityClient.cs b/src/LinkMobility/LinkMobilityClient.cs index 6dcaef4..5bfff33 100644 --- a/src/LinkMobility/LinkMobilityClient.cs +++ b/src/LinkMobility/LinkMobilityClient.cs @@ -27,7 +27,7 @@ namespace AMWD.Net.Api.LinkMobility /// The username used for basic authentication. /// The password used for basic authentication. /// Optional configuration settings for the client. - /// Optional instance if you want a custom implemented. + /// Optional instance if you want a custom implementation. public LinkMobilityClient(string username, string password, ClientOptions? clientOptions = null, HttpClient? httpClient = null) : this(new BasicAuthentication(username, password), clientOptions, httpClient) { @@ -38,7 +38,7 @@ namespace AMWD.Net.Api.LinkMobility /// /// The bearer token used for authentication. /// Optional configuration settings for the client. - /// Optional instance if you want a custom implemented. + /// Optional instance if you want a custom implementation. public LinkMobilityClient(string token, ClientOptions? clientOptions = null, HttpClient? httpClient = null) : this(new AccessTokenAuthentication(token), clientOptions, httpClient) { @@ -50,7 +50,7 @@ namespace AMWD.Net.Api.LinkMobility /// /// The authentication mechanism used to authorize requests. /// Optional client configuration settings. - /// Optional instance if you want a custom implemented. + /// Optional instance if you want a custom implementation. public LinkMobilityClient(IAuthentication authentication, ClientOptions? clientOptions = null, HttpClient? httpClient = null) { if (authentication == null) @@ -66,7 +66,8 @@ namespace AMWD.Net.Api.LinkMobility } /// - /// Disposes of the resources used by the object. + /// Disposes all resources used by the object. + /// This includes the whether it was injected or created internally. /// public void Dispose() { diff --git a/src/LinkMobility/Utils/Validation.cs b/src/LinkMobility/Utils/Validation.cs index 6cd199f..822bd9c 100644 --- a/src/LinkMobility/Utils/Validation.cs +++ b/src/LinkMobility/Utils/Validation.cs @@ -12,6 +12,13 @@ namespace AMWD.Net.Api.LinkMobility.Utils ///
/// See Wikipedia: MSISDN for more information. /// + /// + /// It comes down to a string of digits with a length between 8 and 15, starting with a non-zero digit. + /// This is a common format for international phone numbers, where the first few digits represent the country code, followed by the national number. + /// A leading + is has to be removed (not part of the E.164). + ///
+ /// Regex (inside): ^[1-9][0-9]{7,14}$ + ///
/// The string to validate. /// for a valid MSISDN number, otherwise. public static bool IsValidMSISDN(string msisdn)