Skip to content

Commit 59a621f

Browse files
committed
docs: Refine documentation for Stack and Variants models, correcting terminology and enhancing clarity for method descriptions.
1 parent 8c9064b commit 59a621f

File tree

2 files changed

+37
-47
lines changed

2 files changed

+37
-47
lines changed

Contentstack.Management.Core/Models/Stack.cs

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ public ContentType ContentType(string uid = null)
622622
return new ContentType(this, uid);
623623
}
624624
/// <summary>
625-
/// <see cref="Models.Asset"/> efer to all the media files (images, videos, PDFs, audio files, and so on) uploaded in your Contentstack repository for future use.
625+
/// <see cref="Models.Asset"/> refer to all the media files (images, videos, PDFs, audio files, and so on) uploaded in your Contentstack repository for future use.
626626
/// </summary>
627627
/// <param name="uid">Optional asset uid.</param>
628628
/// <example>
@@ -762,7 +762,7 @@ public ManagementToken ManagementTokens(string uid = null)
762762
}
763763

764764
/// <summary>
765-
/// A <see cref="Models.Role" /> collection of permissions that will be applicable to all the users who are assigned this role.
765+
/// A <see cref="Models.Role" /> is a collection of permissions that will be applicable to all the users who are assigned this role.
766766
/// </summary>
767767
/// <param name="uid">Optional, role uid.</param>
768768
/// <example>
@@ -772,7 +772,7 @@ public ManagementToken ManagementTokens(string uid = null)
772772
/// ContentstackResponse contentstackResponse = stack.Role("<ROLE_UID>").Fetch();
773773
/// </code></pre>
774774
/// </example>
775-
/// <returns>The <see cref="Models.Release" /></returns>
775+
/// <returns>The <see cref="Models.Role" /></returns>
776776
public Role Role(string uid = null)
777777
{
778778
ThrowIfNotLoggedIn();
@@ -843,17 +843,17 @@ public PublishQueue PublishQueue(string uid = null)
843843
return new PublishQueue(this, uid);
844844
}
845845
/// <summary>
846-
/// A <see cref="Models.Webhook" /> a mechanism that sends real-time information to any third-party app or service to keep your application in sync with your Contentstack account.
846+
/// A <see cref="Models.Webhook" /> is a mechanism that sends real-time information to any third-party app or service to keep your application in sync with your Contentstack account.
847847
/// </summary>
848-
/// <param name="uid">Optional, webhook uid uid.</param>
848+
/// <param name="uid">Optional, webhook uid.</param>
849849
/// <example>
850850
/// <pre><code>
851851
/// ContentstackClient client = new ContentstackClient("<AUTHTOKEN>", "<API_HOST>");
852852
/// Stack stack = client.Stack("<API_KEY>");
853853
/// ContentstackResponse contentstackResponse = stack.Webhook("<WEBHOOK_UID>").Fetch();
854854
/// </code></pre>
855855
/// </example>
856-
/// <returns>The <see cref="Models.AuditLog" /></returns>
856+
/// <returns>The <see cref="Models.Webhook" /></returns>
857857
public Webhook Webhook(string uid = null)
858858
{
859859
ThrowIfNotLoggedIn();
@@ -913,24 +913,14 @@ public BulkOperation BulkOperation()
913913
}
914914

915915
/// <summary>
916-
/// Gets the bulk operation instance for performing bulk operations on entries and assets.
916+
/// A <see cref="Models.Variants" /> represents different versions or variations of content entries that allow you to create and manage multiple variants of the same content.
917917
/// </summary>
918+
/// <param name="uid">Optional, variant uid.</param>
918919
/// <example>
919920
/// <pre><code>
920921
/// ContentstackClient client = new ContentstackClient("<AUTHTOKEN>", "<API_HOST>");
921922
/// Stack stack = client.Stack("<API_KEY>");
922-
///
923-
/// var publishDetails = new BulkPublishDetails
924-
/// {
925-
/// Entries = new List<BulkPublishEntry>
926-
/// {
927-
/// new BulkPublishEntry { Uid = "entry_uid", ContentTypeUid = "content_type_uid", Locale = "en-us" }
928-
/// },
929-
/// Locales = new List<string> { "en-us" },
930-
/// Environments = new List<string> { "environment_uid" }
931-
/// };
932-
///
933-
/// ContentstackResponse response = stack.BulkOperation().Publish(publishDetails);
923+
/// ContentstackResponse contentstackResponse = stack.Variants("<VARIANT_UID>").Fetch();
934924
/// </code></pre>
935925
/// </example>
936926
/// <returns>The <see cref="Models.Variants"/></returns>

Contentstack.Management.Core/Models/Variants.cs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,15 @@ internal Variants(Stack stack, string uid = null)
2424
}
2525

2626
/// <summary>
27-
/// The Delete variants call is used to delete a specific variants.
27+
/// The Delete call is used to delete a specific variant.
2828
/// </summary>
29-
/// <param name="collection">Query parameter</param>
3029
/// <example>
3130
/// <pre><code>
3231
/// ContentstackClient client = new ContentstackClient("<AUTHTOKEN>", "<API_HOST>");
33-
/// ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Variants("<Variants_UID>").Delete();
32+
/// ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Variants("<VARIANT_UID>").Delete();
3433
/// </code></pre>
3534
/// </example>
36-
/// <returns>The <see cref="ContentstackResponse"/>.</returns>
35+
/// <returns>The <see cref="ContentstackResponse"/> containing the deletion result.</returns>
3736
public virtual ContentstackResponse Delete()
3837
{
3938
stack.ThrowIfNotLoggedIn();
@@ -44,16 +43,15 @@ public virtual ContentstackResponse Delete()
4443
}
4544

4645
/// <summary>
47-
/// The Delete variants call is used to delete a specific variants.
46+
/// The DeleteAsync call is used to asynchronously delete a specific variant.
4847
/// </summary>
49-
/// <param name="collection">Query parameter</param>
5048
/// <example>
5149
/// <pre><code>
5250
/// ContentstackClient client = new ContentstackClient("<AUTHTOKEN>", "<API_HOST>");
53-
/// ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Variants("<Variants_UID>").DeleteAsync();
51+
/// ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Variants("<VARIANT_UID>").DeleteAsync();
5452
/// </code></pre>
5553
/// </example>
56-
/// <returns>The <see cref="ContentstackResponse"/>.</returns>
54+
/// <returns>The Task containing <see cref="ContentstackResponse"/> with the deletion result.</returns>
5755
public virtual Task<ContentstackResponse> DeleteAsync()
5856
{
5957
stack.ThrowIfNotLoggedIn();
@@ -64,16 +62,16 @@ public virtual Task<ContentstackResponse> DeleteAsync()
6462
}
6563

6664
/// <summary>
67-
/// Retrieves a specific variant by UID.
65+
/// The Fetch call retrieves a specific variant by UID.
6866
/// </summary>
6967
/// <param name="collection">Optional query parameters.</param>
7068
/// <example>
7169
/// <pre><code>
7270
/// ContentstackClient client = new ContentstackClient("<AUTHTOKEN>", "<API_HOST>");
73-
/// ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Variants("<Variants_UID>").Fetch();
71+
/// ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Variants("<VARIANT_UID>").Fetch();
7472
/// </code></pre>
7573
/// </example>
76-
/// <returns>Variant data in <see cref="ContentstackResponse"/>.</returns>
74+
/// <returns>The <see cref="ContentstackResponse"/> containing the variant data.</returns>
7775
public virtual ContentstackResponse Fetch(ParameterCollection collection = null)
7876
{
7977
stack.ThrowIfNotLoggedIn();
@@ -84,16 +82,16 @@ public virtual ContentstackResponse Fetch(ParameterCollection collection = null)
8482
}
8583

8684
/// <summary>
87-
/// Asynchronously retrieves a specific variant by UID.
85+
/// The FetchAsync call asynchronously retrieves a specific variant by UID.
8886
/// </summary>
8987
/// <param name="collection">Optional query parameters.</param>
9088
/// <example>
9189
/// <pre><code>
9290
/// ContentstackClient client = new ContentstackClient("<AUTHTOKEN>", "<API_HOST>");
93-
/// ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Variants("<Variants_UID>").FetchAsync();
91+
/// ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Variants("<VARIANT_UID>").FetchAsync();
9492
/// </code></pre>
9593
/// </example>
96-
/// <returns>Task containing variant data in <see cref="ContentstackResponse"/>.</returns>
94+
/// <returns>The Task containing <see cref="ContentstackResponse"/> with the variant data.</returns>
9795
public virtual Task<ContentstackResponse> FetchAsync(ParameterCollection collection = null)
9896
{
9997
stack.ThrowIfNotLoggedIn();
@@ -104,17 +102,17 @@ public virtual Task<ContentstackResponse> FetchAsync(ParameterCollection collect
104102
}
105103

106104
/// <summary>
107-
/// The Create is used to create an entry variant in the stack.
105+
/// The Create call is used to create an entry variant in the stack.
108106
/// </summary>
109-
/// <param name="model"><see cref="VariantsModel"/> with details.</param>
107+
/// <param name="model">The <see cref="VariantsModel"/> containing variant details.</param>
110108
/// <example>
111109
/// <pre><code>
112110
/// ContentstackClient client = new ContentstackClient("<AUTHTOKEN>", "<API_HOST>");
113111
/// VariantsModel model = new VariantsModel();
114112
/// ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Variants().Create(model);
115113
/// </code></pre>
116114
/// </example>
117-
/// <returns>The <see cref="ContentstackResponse"/>.</returns>
115+
/// <returns>The <see cref="ContentstackResponse"/> containing the created variant data.</returns>
118116
public virtual ContentstackResponse Create(VariantsModel model)
119117
{
120118
ThrowIfUidNotEmpty();
@@ -124,17 +122,17 @@ public virtual ContentstackResponse Create(VariantsModel model)
124122
}
125123

126124
/// <summary>
127-
/// The Create is used to create an entry variant in the stack.
125+
/// The CreateAsync call is used to asynchronously create an entry variant in the stack.
128126
/// </summary>
129-
/// <param name="model"><see cref="VariantsModel"/> with details.</param>
127+
/// <param name="model">The <see cref="VariantsModel"/> containing variant details.</param>
130128
/// <example>
131129
/// <pre><code>
132130
/// ContentstackClient client = new ContentstackClient("<AUTHTOKEN>", "<API_HOST>");
133131
/// VariantsModel model = new VariantsModel();
134132
/// ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Variants().CreateAsync(model);
135133
/// </code></pre>
136134
/// </example>
137-
/// <returns>The Task.</returns>
135+
/// <returns>The Task containing <see cref="ContentstackResponse"/> with the created variant data.</returns>
138136
public virtual Task<ContentstackResponse> CreateAsync(VariantsModel model)
139137
{
140138
ThrowIfUidNotEmpty();
@@ -145,17 +143,18 @@ public virtual Task<ContentstackResponse> CreateAsync(VariantsModel model)
145143
}
146144

147145
/// <summary>
148-
/// Retrieves multiple variants by their UIDs.
146+
/// The FetchByUid call retrieves multiple variants by passing an array of their UIDs.
147+
/// This method allows you to fetch multiple variants in a single API call.
149148
/// </summary>
150-
/// <param name="uids">Array of variant UIDs to fetch.</param>
149+
/// <param name="uids">Array of variant UIDs to fetch. Cannot be null or empty.</param>
151150
/// <example>
152151
/// <pre><code>
153152
/// ContentstackClient client = new ContentstackClient("<AUTHTOKEN>", "<API_HOST>");
154-
/// string[] variantUids = {"uid1", "uid2", "uid3"};
153+
/// string[] variantUids = {"bltvariant123", "bltvariant456", "bltvariant789"};
155154
/// ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Variants().FetchByUid(variantUids);
156155
/// </code></pre>
157156
/// </example>
158-
/// <returns>Variants data in <see cref="ContentstackResponse"/>.</returns>
157+
/// <returns>The <see cref="ContentstackResponse"/> containing the requested variants data.</returns>
159158
public virtual ContentstackResponse FetchByUid(string[] uids)
160159
{
161160
stack.ThrowIfNotLoggedIn();
@@ -174,17 +173,18 @@ public virtual ContentstackResponse FetchByUid(string[] uids)
174173
}
175174

176175
/// <summary>
177-
/// Asynchronously retrieves multiple variants by their UIDs.
176+
/// The FetchByUidAsync call asynchronously retrieves multiple variants by passing an array of their UIDs.
177+
/// This method allows you to fetch multiple variants in a single API call asynchronously.
178178
/// </summary>
179-
/// <param name="uids">Array of variant UIDs to fetch.</param>
179+
/// <param name="uids">Array of variant UIDs to fetch. Cannot be null or empty.</param>
180180
/// <example>
181181
/// <pre><code>
182182
/// ContentstackClient client = new ContentstackClient("<AUTHTOKEN>", "<API_HOST>");
183-
/// string[] variantUids = {"uid1", "uid2", "uid3"};
183+
/// string[] variantUids = {"bltvariant123", "bltvariant456", "bltvariant789"};
184184
/// ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Variants().FetchByUidAsync(variantUids);
185185
/// </code></pre>
186186
/// </example>
187-
/// <returns>Task containing variants data in <see cref="ContentstackResponse"/>.</returns>
187+
/// <returns>The Task containing <see cref="ContentstackResponse"/> with the requested variants data.</returns>
188188
public virtual Task<ContentstackResponse> FetchByUidAsync(string[] uids)
189189
{
190190
stack.ThrowIfNotLoggedIn();

0 commit comments

Comments
 (0)