Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Commit

Permalink
Add xml Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Роман Воронцов committed Mar 2, 2021
1 parent 7f44cb7 commit 9d2d8e1
Show file tree
Hide file tree
Showing 40 changed files with 103 additions and 77 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Updates the QR code after its expired
# Updates the QR code after its expired.
**<span style="color:green">Implementation notes</span>**<br/>
This method is available in both synchronous and asynchronous implementations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This method is available in both synchronous and asynchronous implementations.
## Response
| `Parameter` | `Description` | `The data type of the parameter` |
|:---------------------:|:--------------------------------------------------------|:--------------------------------:|
| `Read` | The status of the request. | `Boolean` |
| `Read` | Message readability indicator | `Boolean` |
| `ChatId` | Unique ID of the dialog. | `String` |
| `Message` | Dialog reading status | `String` |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ namespace ChatApiClient

var chatApiResponse = userInterfaceOperations.SendTypingStatus(request);
if (!chatApiResponse.IsSuccess) throw chatApiResponse.Exception!;

var response = chatApiResponse.GetResult();

Console.WriteLine(response?.PrintMembers());
}
}
Expand Down
1 change: 0 additions & 1 deletion Src/ChatApi.Core/Models/ChatApiStatusOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace ChatApi.Core.Models
{
//Need description:chatApi
/// <summary/>
public enum ChatApiStatusOperation : byte
{
Expand Down
1 change: 0 additions & 1 deletion Src/ChatApi.Core/Models/Interfaces/IErrorResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace ChatApi.Core.Models.Interfaces
{
//Need description:chatApi
/// <summary/>
public interface IErrorResponse
{
Expand Down
5 changes: 2 additions & 3 deletions Src/ChatApi.Core/Models/Interfaces/IOperationResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

namespace ChatApi.Core.Models.Interfaces
{
//Need description:chatApi
/// <summary/>
/// <inheritdoc cref="Result"/>
public interface IOperationResult
{
/// <summary>
///
/// The status of the request.
/// </summary>
[JsonProperty("result", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
string? Result { get; set; }
Expand Down
5 changes: 2 additions & 3 deletions Src/ChatApi.Core/Models/Interfaces/IOperationSuccess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

namespace ChatApi.Core.Models.Interfaces
{
//Need description:chatApi
/// <summary/>
/// <inheritdoc cref="Success"/>
public interface IOperationSuccess
{
/// <summary>
///
/// Flag of the success of the request
/// </summary>
[JsonProperty("success", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
bool? Success { get; set; }
Expand Down
5 changes: 3 additions & 2 deletions Src/ChatApi.Core/Models/MessageType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

namespace ChatApi.Core.Models
{
//Need description:chatApi
/// <summary/>
/// <summary>
/// Type of the message
/// </summary>
public enum MessageType : byte
{
/// <summary/>
Expand Down
8 changes: 4 additions & 4 deletions Src/ChatApi.WA.Account/Models/InstanceStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class InstanceStatus : Printable, IExpiry, ILogout, IRetry, ITakeover, IL
/// <inheritdoc />
public string? Label { get; set; }
/// <inheritdoc />
public InstanceStatusActionType? Action { get; set; }
public InstanceStatusActionType? ActionType { get; set; }

#endregion

Expand All @@ -24,7 +24,7 @@ public class InstanceStatus : Printable, IExpiry, ILogout, IRetry, ITakeover, IL
/// <inheritdoc />
public bool Equals(IInstanceStatus? other)
{
return other is not null && Action == other.Action &&
return other is not null && ActionType == other.ActionType &&
string.Equals(Link, other.Link, StringComparison.Ordinal) &&
string.Equals(Label, other.Label, StringComparison.Ordinal);
}
Expand All @@ -38,7 +38,7 @@ public override int GetHashCode()
{
unchecked
{
int hashCode = Action is not null ? Action.GetHashCode() : 0;
int hashCode = ActionType is not null ? ActionType.GetHashCode() : 0;
hashCode = (hashCode * 397) ^ (Label is not null ? Label.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (Link is not null ? Link.GetHashCode() : 0);
return hashCode;
Expand All @@ -57,7 +57,7 @@ public override int GetHashCode()
/// <inheritdoc />
protected override void PrintContent(int shift)
{
AddMember(nameof(Action), Action, shift);
AddMember(nameof(ActionType), ActionType, shift);
AddMember(nameof(Label), Label, shift);
AddMember(nameof(Link), Link, shift);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public interface IInstanceStatus : IEquatable<IInstanceStatus?>, IPrintable
/// Method name
/// </summary>
[JsonProperty("act", NullValueHandling = NullValueHandling.Ignore)]
InstanceStatusActionType? Action { get; set; }
InstanceStatusActionType? ActionType { get; set; }

/// <summary>
/// Action caption for the button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,42 @@

namespace ChatApi.WA.Account.Responses.Interfaces
{
//Need description:chatApi
/// <summary/>
/// <summary>
/// Represents the current state of the account
/// </summary>
public interface IAdditionInformationStatus : IEquatable<IAdditionInformationStatus?>, IPrintable
{
/// <summary/>
/// <summary>
/// Indicates the need to update the QR code since it has expired.
/// </summary>
[JsonConverter(typeof(InterfacesConverter<InstanceStatus>))]
[JsonProperty("expiry", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
IInstanceStatus? Expiry { get; set; }

/// <summary/>
/// <summary>
/// Indicates that the manual synchronization attempt with the device must be repeated.
/// </summary>
[JsonConverter(typeof(InterfacesConverter<InstanceStatus>))]
[JsonProperty("retry", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
IInstanceStatus? Retry { get; set; }

/// <summary/>
/// <summary>
/// Indicates that you need to log out of WhatsApp Web to get a new QR code.
/// </summary>
[JsonConverter(typeof(InterfacesConverter<InstanceStatus>))]
[JsonProperty("logout", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
IInstanceStatus? Logout { get; set; }

/// <summary/>
/// <summary>
/// Indicates the need to return the active session.
/// </summary>
[JsonConverter(typeof(InterfacesConverter<InstanceStatus>))]
[JsonProperty("takeover", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
IInstanceStatus? Takeover { get; set; }

/// <summary/>
/// <summary>
/// Providing advanced information
/// </summary>
[JsonConverter(typeof(InterfacesConverter<InstanceStatus>))]
[JsonProperty("learn_more", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
IInstanceStatus? LearnMore { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace ChatApi.WA.Account.Responses.Interfaces
{
//Need description:chatApi
/// <summary/>
public interface IChangeAccountNameResponse : IOperationResponse
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

namespace ChatApi.WA.Account.Responses.Interfaces
{
//Need description:chatApi
/// <summary/>
public interface IQrCodeResponse : IErrorResponse, IEquatable<IQrCodeResponse?>, IPrintable
{
/// <summary/>
/// <summary>
/// Image of the QR code in PNG format
/// </summary>
string? QrCodeImage { get; }
}
}
13 changes: 9 additions & 4 deletions Src/ChatApi.WA.Ban/Responses/Interfaces/ICheckBanResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@

namespace ChatApi.WA.Ban.Responses.Interfaces
{
//Need description:chatApi
/// <summary/>
public interface ICheckBanResponse : IErrorResponse, IPhone, IEquatable<ICheckBanResponse?>, IPrintable
{
/// <summary/>
/// <summary>
/// Blocking indicator
/// </summary>
[JsonProperty("banned", NullValueHandling = NullValueHandling.Ignore)]
bool? IsBanned { get; set; }

/// <summary/>
/// <summary>
/// Message received by the owner of the blocked phone number
/// </summary>
[JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)]
string? Message { get; set; }

/// <summary/>
/// <summary>
/// Property for a test regular expression
/// </summary>
[JsonProperty("banPhoneMask", NullValueHandling = NullValueHandling.Ignore)]
string? BanPhoneMask { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

namespace ChatApi.WA.Dialogs.Helpers.Collections
{
//Need description:chatApi
/// <summary/>
/// <summary>
/// The collection's unique identifier of chats
/// </summary>
public class ChatIdsCollection : WhatsAppApiCollection<string> { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace ChatApi.WA.Dialogs.Helpers.Collections
{
//Need description:chatApi
/// <summary/>
public class DialogCollection : WhatsAppApiCollection<IDialogResponse> { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace ChatApi.WA.Dialogs.Helpers.Collections
{
//Need description:chatApi
/// <summary/>
public class LabelCollection : WhatsAppApiCollection<ILabel> { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace ChatApi.WA.Dialogs.Helpers.Collections
{
//Need description:chatApi
/// <summary/>
public class ParticipantsCollection : WhatsAppApiCollection<string> { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace ChatApi.WA.Dialogs.Helpers.Collections
{
//Need description:chatApi
/// <summary/>
public class PhonesCollection : WhatsAppApiCollection<string> { }
}
13 changes: 9 additions & 4 deletions Src/ChatApi.WA.Dialogs/Models/Interfaces/ILabel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@

namespace ChatApi.WA.Dialogs.Models.Interfaces
{
//Need description:chatApi
/// <summary/>
public interface ILabel : IEquatable<ILabel?>, IPrintable
{
/// <summary/>
/// <summary>
/// Unique ID of the label
/// </summary>
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public string? LabelId { get; set; }

/// <summary/>
/// <summary>
/// Name of the label
/// </summary>
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
public string? LabelName { get; set; }

/// <summary/>
/// <summary>
/// Label's color in HEX
/// </summary>
[JsonProperty("hexColor", NullValueHandling = NullValueHandling.Ignore)]
public string? HexColor { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

namespace ChatApi.WA.Dialogs.Models.Interfaces
{
//Need description:chatApi
/// <summary/>
public interface IOperationMessageResult : IEquatable<IOperationMessageResult?>, IPrintable
{
/// <summary/>
/// <summary>
/// The result of the request.
/// </summary>
[JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)]
string? Message { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

namespace ChatApi.WA.Dialogs.Requests.UI.Interfaces
{
//Need description:chatApi
/// <summary/>
public interface ILabelCreateRequest : IEquatable<ILabelCreateRequest?>
{
/// <summary/>
/// <summary>
/// Name of the label.
/// </summary>
[JsonProperty("name")]
string? Name { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

namespace ChatApi.WA.Dialogs.Requests.UI.Interfaces
{
//Need description:chatApi
/// <summary/>
public interface ILabelRemoveRequest
{
/// <summary/>
/// <summary>
/// Unique ID of the label
/// </summary>
[JsonProperty("labelId")]
string? LabelId { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

namespace ChatApi.WA.Dialogs.Requests.UI.Interfaces
{
//Need description:chatApi
/// <summary/>
public interface ILabelUpdateRequest : ILabel, IEquatable<ILabelUpdateRequest?>
{
/// <summary/>
/// <summary>
/// Unique ID of the label
/// </summary>
[JsonProperty("labelId", Required = Required.Always)]
new string? LabelId { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@

namespace ChatApi.WA.Dialogs.Responses.Interfaces
{
//Need description:chatApi
/// <summary/>
public interface IGroupOperationResponse : IErrorResponse, IEquatable<IGroupOperationResponse?>, IPrintable
{
/// <summary/>
/// <summary>
/// Flag for adding a participant to the group
/// </summary>
[JsonProperty("add", NullValueHandling = NullValueHandling.Ignore)]
bool? IsSuccess { get; set; }

/// <summary/>
/// <summary>
/// Status of adding participant to the group
/// </summary>
[JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)]
string? StatusMessage { get; set; }

/// <summary/>
/// <summary>
/// Unique ID of the group
/// </summary>
[JsonProperty("groupId", NullValueHandling = NullValueHandling.Ignore)]
string? GroupId { get; set; }
}
Expand Down
Loading

0 comments on commit 9d2d8e1

Please sign in to comment.