Updated docs
This commit is contained in:
@@ -30,10 +30,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Restore tools
|
- name: Prepare environment
|
||||||
run: |
|
run: |
|
||||||
set -ex
|
set -ex
|
||||||
dotnet tool restore -v q
|
|
||||||
dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools
|
dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools
|
||||||
echo "CI_SERVER_HOST=${GITEA_SERVER_URL#https://}" >> "$GITEA_ENV"
|
echo "CI_SERVER_HOST=${GITEA_SERVER_URL#https://}" >> "$GITEA_ENV"
|
||||||
|
|
||||||
|
|||||||
@@ -30,10 +30,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Restore tools
|
- name: Prepare environment
|
||||||
run: |
|
run: |
|
||||||
set -ex
|
set -ex
|
||||||
dotnet tool restore -v q
|
|
||||||
dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools
|
dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools
|
||||||
dotnet tool install docfx --tool-path /dotnet-tools
|
dotnet tool install docfx --tool-path /dotnet-tools
|
||||||
echo "CI_SERVER_HOST=${GITEA_SERVER_URL#https://}" >> "$GITEA_ENV"
|
echo "CI_SERVER_HOST=${GITEA_SERVER_URL#https://}" >> "$GITEA_ENV"
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ _layout: landing
|
|||||||
|
|
||||||
The available channels are SMS, RCS and WhatsApp Business.
|
The available channels are SMS, RCS and WhatsApp Business.
|
||||||
|
|
||||||
|
Here you can find the API documentation: https://developer.linkmobility.eu/
|
||||||
|
|
||||||
## NuGet packages
|
## NuGet packages
|
||||||
|
|
||||||
Here is an overview of the latest package.
|
Here is an overview of the latest package.
|
||||||
|
|||||||
@@ -8,13 +8,19 @@ namespace AMWD.Net.Api.LinkMobility
|
|||||||
public class ClientOptions
|
public class ClientOptions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the default base url for the API.
|
/// Gets or sets the base url for the API.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// The default base url is <c>https://api.linkmobility.eu/rest/</c>.
|
||||||
|
/// </remarks>
|
||||||
public virtual string BaseUrl { get; set; } = "https://api.linkmobility.eu/rest/";
|
public virtual string BaseUrl { get; set; } = "https://api.linkmobility.eu/rest/";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the default timeout for the API.
|
/// Gets or sets the default timeout for the API.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// The default timeout is <c>100</c> seconds.
|
||||||
|
/// </remarks>
|
||||||
public virtual TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds(100);
|
public virtual TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds(100);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -28,7 +34,7 @@ namespace AMWD.Net.Api.LinkMobility
|
|||||||
public virtual IDictionary<string, string> DefaultQueryParams { get; set; } = new Dictionary<string, string>();
|
public virtual IDictionary<string, string> DefaultQueryParams { get; set; } = new Dictionary<string, string>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether to allow redirects.
|
/// Gets or sets a value indicating whether to follow redirects from the server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual bool AllowRedirects { get; set; }
|
public virtual bool AllowRedirects { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace AMWD.Net.Api.LinkMobility
|
|||||||
public interface ILinkMobilityClient
|
public interface ILinkMobilityClient
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Performs a POST request to the LINK mobility API.
|
/// Performs a POST request to the LINK Mobility API.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TResponse">The type of the response.</typeparam>
|
/// <typeparam name="TResponse">The type of the response.</typeparam>
|
||||||
/// <typeparam name="TRequest">The type of the request.</typeparam>
|
/// <typeparam name="TRequest">The type of the request.</typeparam>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace AMWD.Net.Api.LinkMobility
|
|||||||
/// <param name="username">The username used for basic authentication.</param>
|
/// <param name="username">The username used for basic authentication.</param>
|
||||||
/// <param name="password">The password used for basic authentication.</param>
|
/// <param name="password">The password used for basic authentication.</param>
|
||||||
/// <param name="clientOptions">Optional configuration settings for the client.</param>
|
/// <param name="clientOptions">Optional configuration settings for the client.</param>
|
||||||
/// <param name="httpClient">Optional <see cref="HttpClient"/> instance if you want a custom <see cref="HttpMessageHandler"/> implemented.</param>
|
/// <param name="httpClient">Optional <see cref="HttpClient"/> instance if you want a custom implementation.</param>
|
||||||
public LinkMobilityClient(string username, string password, ClientOptions? clientOptions = null, HttpClient? httpClient = null)
|
public LinkMobilityClient(string username, string password, ClientOptions? clientOptions = null, HttpClient? httpClient = null)
|
||||||
: this(new BasicAuthentication(username, password), clientOptions, httpClient)
|
: this(new BasicAuthentication(username, password), clientOptions, httpClient)
|
||||||
{
|
{
|
||||||
@@ -38,7 +38,7 @@ namespace AMWD.Net.Api.LinkMobility
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="token">The bearer token used for authentication.</param>
|
/// <param name="token">The bearer token used for authentication.</param>
|
||||||
/// <param name="clientOptions">Optional configuration settings for the client.</param>
|
/// <param name="clientOptions">Optional configuration settings for the client.</param>
|
||||||
/// <param name="httpClient">Optional <see cref="HttpClient"/> instance if you want a custom <see cref="HttpMessageHandler"/> implemented.</param>
|
/// <param name="httpClient">Optional <see cref="HttpClient"/> instance if you want a custom implementation.</param>
|
||||||
public LinkMobilityClient(string token, ClientOptions? clientOptions = null, HttpClient? httpClient = null)
|
public LinkMobilityClient(string token, ClientOptions? clientOptions = null, HttpClient? httpClient = null)
|
||||||
: this(new AccessTokenAuthentication(token), clientOptions, httpClient)
|
: this(new AccessTokenAuthentication(token), clientOptions, httpClient)
|
||||||
{
|
{
|
||||||
@@ -50,7 +50,7 @@ namespace AMWD.Net.Api.LinkMobility
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="authentication">The authentication mechanism used to authorize requests.</param>
|
/// <param name="authentication">The authentication mechanism used to authorize requests.</param>
|
||||||
/// <param name="clientOptions">Optional client configuration settings.</param>
|
/// <param name="clientOptions">Optional client configuration settings.</param>
|
||||||
/// <param name="httpClient">Optional <see cref="HttpClient"/> instance if you want a custom <see cref="HttpMessageHandler"/> implemented.</param>
|
/// <param name="httpClient">Optional <see cref="HttpClient"/> instance if you want a custom implementation.</param>
|
||||||
public LinkMobilityClient(IAuthentication authentication, ClientOptions? clientOptions = null, HttpClient? httpClient = null)
|
public LinkMobilityClient(IAuthentication authentication, ClientOptions? clientOptions = null, HttpClient? httpClient = null)
|
||||||
{
|
{
|
||||||
if (authentication == null)
|
if (authentication == null)
|
||||||
@@ -66,7 +66,8 @@ namespace AMWD.Net.Api.LinkMobility
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Disposes of the resources used by the <see cref="LinkMobilityClient"/> object.
|
/// Disposes all resources used by the <see cref="LinkMobilityClient"/> object.
|
||||||
|
/// This includes the <see cref="HttpClient"/> whether it was injected or created internally.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,6 +12,13 @@ namespace AMWD.Net.Api.LinkMobility.Utils
|
|||||||
/// <br/>
|
/// <br/>
|
||||||
/// See <see href="https://en.wikipedia.org/wiki/MSISDN">Wikipedia: MSISDN</see> for more information.
|
/// See <see href="https://en.wikipedia.org/wiki/MSISDN">Wikipedia: MSISDN</see> for more information.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 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 <c>+</c> is has to be removed (not part of the <see href="https://en.wikipedia.org/wiki/E.164">E.164</see>).
|
||||||
|
/// <br/>
|
||||||
|
/// Regex (inside): <c>^[1-9][0-9]{7,14}$</c>
|
||||||
|
/// </remarks>
|
||||||
/// <param name="msisdn">The string to validate.</param>
|
/// <param name="msisdn">The string to validate.</param>
|
||||||
/// <returns><see langword="true"/> for a valid MSISDN number, <see langword="false"/> otherwise.</returns>
|
/// <returns><see langword="true"/> for a valid MSISDN number, <see langword="false"/> otherwise.</returns>
|
||||||
public static bool IsValidMSISDN(string msisdn)
|
public static bool IsValidMSISDN(string msisdn)
|
||||||
|
|||||||
Reference in New Issue
Block a user