Skip to content

Commit

Permalink
New updates to generated code (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot authored Aug 2, 2024
1 parent 6154f6e commit ccf26a2
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 29 deletions.
2 changes: 1 addition & 1 deletion cli/Authentication/PersonalAccessToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static async Task Run()
{
// Personal Access Token authentication
var tokenProvider = new TokenProvider(Environment.GetEnvironmentVariable("GITHUB_TOKEN") ?? "");
var adapter = RequestAdapter.Create(new TokenAuthProvider(tokenProvider));
var adapter = RequestAdapter.Create(new TokenAuthProvider(tokenProvider), "https://api.github.com");
var gitHubClient = new GitHubClient(adapter);

try
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Events/EventsRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas
{
}
/// <summary>
/// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// API method documentation <see href="https://docs.github.com/rest/activity/events#list-public-events" />
/// </summary>
/// <returns>A List&lt;Event&gt;</returns>
Expand All @@ -58,7 +58,7 @@ public async Task<List<Event>> GetAsync(Action<RequestConfiguration<EventsReques
return collectionResult?.ToList();
}
/// <summary>
/// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
Expand Down Expand Up @@ -86,7 +86,7 @@ public EventsRequestBuilder WithUrl(string rawUrl)
return new EventsRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
public class EventsRequestBuilderGetQueryParameters
{
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Models/PullRequestReview.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class PullRequestReview : IAdditionalDataHolder, IParsable
public string HtmlUrl { get; set; }
#endif
/// <summary>Unique identifier of the review</summary>
public int? Id { get; set; }
public long? Id { get; set; }
/// <summary>The _links property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand Down Expand Up @@ -129,7 +129,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{"body_text", n => { BodyText = n.GetStringValue(); } },
{"commit_id", n => { CommitId = n.GetStringValue(); } },
{"html_url", n => { HtmlUrl = n.GetStringValue(); } },
{"id", n => { Id = n.GetIntValue(); } },
{"id", n => { Id = n.GetLongValue(); } },
{"_links", n => { Links = n.GetObjectValue<PullRequestReview__links>(PullRequestReview__links.CreateFromDiscriminatorValue); } },
{"node_id", n => { NodeId = n.GetStringValue(); } },
{"pull_request_url", n => { PullRequestUrl = n.GetStringValue(); } },
Expand All @@ -151,7 +151,7 @@ public virtual void Serialize(ISerializationWriter writer)
writer.WriteStringValue("body_text", BodyText);
writer.WriteStringValue("commit_id", CommitId);
writer.WriteStringValue("html_url", HtmlUrl);
writer.WriteIntValue("id", Id);
writer.WriteLongValue("id", Id);
writer.WriteObjectValue<PullRequestReview__links>("_links", Links);
writer.WriteStringValue("node_id", NodeId);
writer.WriteStringValue("pull_request_url", PullRequestUrl);
Expand Down
7 changes: 5 additions & 2 deletions src/GitHub/Networks/Item/Item/Events/EventsRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas
{
}
/// <summary>
/// List public events for a network of repositories
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// API method documentation <see href="https://docs.github.com/rest/activity/events#list-public-events-for-a-network-of-repositories" />
/// </summary>
/// <returns>A List&lt;Event&gt;</returns>
Expand All @@ -57,6 +57,9 @@ public async Task<List<Event>> GetAsync(Action<RequestConfiguration<EventsReques
var collectionResult = await RequestAdapter.SendCollectionAsync<Event>(requestInfo, Event.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
return collectionResult?.ToList();
}
/// <summary>
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand All @@ -83,7 +86,7 @@ public EventsRequestBuilder WithUrl(string rawUrl)
return new EventsRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// List public events for a network of repositories
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
public class EventsRequestBuilderGetQueryParameters
{
Expand Down
7 changes: 5 additions & 2 deletions src/GitHub/Orgs/Item/Events/EventsRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas
{
}
/// <summary>
/// List public organization events
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// API method documentation <see href="https://docs.github.com/rest/activity/events#list-public-organization-events" />
/// </summary>
/// <returns>A List&lt;Event&gt;</returns>
Expand All @@ -50,6 +50,9 @@ public async Task<List<Event>> GetAsync(Action<RequestConfiguration<EventsReques
var collectionResult = await RequestAdapter.SendCollectionAsync<Event>(requestInfo, Event.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return collectionResult?.ToList();
}
/// <summary>
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand All @@ -76,7 +79,7 @@ public EventsRequestBuilder WithUrl(string rawUrl)
return new EventsRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// List public organization events
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
public class EventsRequestBuilderGetQueryParameters
{
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Users/Item/Events/EventsRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas
{
}
/// <summary>
/// If you are authenticated as the given user, you will see your private events. Otherwise, you&apos;ll only see public events.
/// If you are authenticated as the given user, you will see your private events. Otherwise, you&apos;ll only see public events.&gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// API method documentation <see href="https://docs.github.com/rest/activity/events#list-events-for-the-authenticated-user" />
/// </summary>
/// <returns>A List&lt;Event&gt;</returns>
Expand All @@ -63,7 +63,7 @@ public async Task<List<Event>> GetAsync(Action<RequestConfiguration<EventsReques
return collectionResult?.ToList();
}
/// <summary>
/// If you are authenticated as the given user, you will see your private events. Otherwise, you&apos;ll only see public events.
/// If you are authenticated as the given user, you will see your private events. Otherwise, you&apos;ll only see public events.&gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
Expand Down Expand Up @@ -91,7 +91,7 @@ public EventsRequestBuilder WithUrl(string rawUrl)
return new EventsRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// If you are authenticated as the given user, you will see your private events. Otherwise, you&apos;ll only see public events.
/// If you are authenticated as the given user, you will see your private events. Otherwise, you&apos;ll only see public events.&gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
public class EventsRequestBuilderGetQueryParameters
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public WithOrgItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter)
{
}
/// <summary>
/// This is the user&apos;s organization dashboard. You must be authenticated as the user to view this.
/// This is the user&apos;s organization dashboard. You must be authenticated as the user to view this.&gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// API method documentation <see href="https://docs.github.com/rest/activity/events#list-organization-events-for-the-authenticated-user" />
/// </summary>
/// <returns>A List&lt;Event&gt;</returns>
Expand All @@ -51,7 +51,7 @@ public async Task<List<Event>> GetAsync(Action<RequestConfiguration<WithOrgItemR
return collectionResult?.ToList();
}
/// <summary>
/// This is the user&apos;s organization dashboard. You must be authenticated as the user to view this.
/// This is the user&apos;s organization dashboard. You must be authenticated as the user to view this.&gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
Expand Down Expand Up @@ -79,7 +79,7 @@ public WithOrgItemRequestBuilder WithUrl(string rawUrl)
return new WithOrgItemRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// This is the user&apos;s organization dashboard. You must be authenticated as the user to view this.
/// This is the user&apos;s organization dashboard. You must be authenticated as the user to view this.&gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
public class WithOrgItemRequestBuilderGetQueryParameters
{
Expand Down
7 changes: 5 additions & 2 deletions src/GitHub/Users/Item/Events/Public/PublicRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public PublicRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas
{
}
/// <summary>
/// List public events for a user
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// API method documentation <see href="https://docs.github.com/rest/activity/events#list-public-events-for-a-user" />
/// </summary>
/// <returns>A List&lt;Event&gt;</returns>
Expand All @@ -50,6 +50,9 @@ public async Task<List<Event>> GetAsync(Action<RequestConfiguration<PublicReques
var collectionResult = await RequestAdapter.SendCollectionAsync<Event>(requestInfo, Event.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return collectionResult?.ToList();
}
/// <summary>
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand All @@ -76,7 +79,7 @@ public PublicRequestBuilder WithUrl(string rawUrl)
return new PublicRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// List public events for a user
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
public class PublicRequestBuilderGetQueryParameters
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public PublicRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas
{
}
/// <summary>
/// List public events received by a user
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// API method documentation <see href="https://docs.github.com/rest/activity/events#list-public-events-received-by-a-user" />
/// </summary>
/// <returns>A List&lt;Event&gt;</returns>
Expand All @@ -50,6 +50,9 @@ public async Task<List<Event>> GetAsync(Action<RequestConfiguration<PublicReques
var collectionResult = await RequestAdapter.SendCollectionAsync<Event>(requestInfo, Event.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
return collectionResult?.ToList();
}
/// <summary>
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand All @@ -76,7 +79,7 @@ public PublicRequestBuilder WithUrl(string rawUrl)
return new PublicRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// List public events received by a user
/// &gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
public class PublicRequestBuilderGetQueryParameters
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Received_eventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt
{
}
/// <summary>
/// These are events that you&apos;ve received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you&apos;ll only see public events.
/// These are events that you&apos;ve received by watching repositories and following users. If you are authenticated as thegiven user, you will see private events. Otherwise, you&apos;ll only see public events.&gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// API method documentation <see href="https://docs.github.com/rest/activity/events#list-events-received-by-the-authenticated-user" />
/// </summary>
/// <returns>A List&lt;Event&gt;</returns>
Expand All @@ -57,7 +57,7 @@ public async Task<List<Event>> GetAsync(Action<RequestConfiguration<Received_eve
return collectionResult?.ToList();
}
/// <summary>
/// These are events that you&apos;ve received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you&apos;ll only see public events.
/// These are events that you&apos;ve received by watching repositories and following users. If you are authenticated as thegiven user, you will see private events. Otherwise, you&apos;ll only see public events.&gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
/// <returns>A <see cref="RequestInformation"/></returns>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
Expand Down Expand Up @@ -85,7 +85,7 @@ public Received_eventsRequestBuilder WithUrl(string rawUrl)
return new Received_eventsRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// These are events that you&apos;ve received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you&apos;ll only see public events.
/// These are events that you&apos;ve received by watching repositories and following users. If you are authenticated as thegiven user, you will see private events. Otherwise, you&apos;ll only see public events.&gt; [!NOTE]&gt; This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
/// </summary>
public class Received_eventsRequestBuilderGetQueryParameters
{
Expand Down
2 changes: 1 addition & 1 deletion src/GitHub/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"descriptionHash": "145BCDC18ADD0C8E2EC561562308D43480017AD06C35365B09A27C83A9E6AAA51A6AF94048AF9F372388146007325C1DB4ED2E86F5CBFCEAD3625FBFBE1F9D51",
"descriptionHash": "69B161AEBDE87E127DB15C26F687951F2C4EC154754CC81FAEE2C1258265EA737FE15B6459B3F721B15D2F078A075486011134B82AE8CDB0828C485EE1CE03E8",
"descriptionLocation": "../../../../../schemas/api.github.com.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.14.0",
Expand Down
Loading

0 comments on commit ccf26a2

Please sign in to comment.