Skip to content

Commit

Permalink
feat: renames the nuget package and namespaces to more appropriately …
Browse files Browse the repository at this point in the history
…fit this product (#34)

* renames the nuget package and namespaces to more appropriately fit this product

* fixes encoded character issues
  • Loading branch information
nickfloyd committed Jan 25, 2024
1 parent 93fb4f7 commit 820a5e8
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion GitHub.Octokit.sln
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Octokit.NET.SDK", "src\Octokit.NET.SDK.csproj", "{C118D1F2-D47D-4488-9D2F-88BA4A7729BD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.Octokit.SDK", "src\GitHub.Octokit.SDK.csproj", "{C118D1F2-D47D-4488-9D2F-88BA4A7729BD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{15BC8D73-8583-4A91-9355-970404126E9B}"
ProjectSection(SolutionItems) = preProject
Expand Down
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -10,16 +10,16 @@ An "alpha" version of a generated .NET SDK in C# from [GitHub's OpenAPI spec](ht

To install the package, you can use either of the following options:

- In Visual Studio, from the Package Explorer, search for `Octokit.NET.SDK`, or
- Type `Install-Package Octokit.NET.SDK` into the Package Manager Console, or
- Type `dotnet add ./path/to/myproject.csproj package Octokit.NET.SDK` in a terminal (replace `./path/to/myproject.csproj` by the path to the _*.csproj_ file you want to add the dependency)
- In Visual Studio, from the Package Explorer, search for `GitHub.Octokit.SDK`, or
- Type `Install-Package GitHub.Octokit.SDK` into the Package Manager Console, or
- Type `dotnet add ./path/to/myproject.csproj package GitHub.Octokit.SDK` in a terminal (replace `./path/to/myproject.csproj` by the path to the _*.csproj_ file you want to add the dependency)

### Make your first request

```csharp
using GitHub;
using GitHub.Client;
using GitHub.Authentication;
using GitHub.Octokit.Client;
using GitHub.Octokit.Authentication;

var token = Environment.GetEnvironmentVariable("GITHUB_TOKEN") ?? "";
var request = RequestAdapter.Create(new TokenAuthenticationProvider("Octokit.Gen", token));
Expand Down
2 changes: 1 addition & 1 deletion Tests/Client/ClientFactoryTest.cs
@@ -1,5 +1,5 @@
using Xunit;
using GitHub.Client;
using GitHub.Octokit.Client;

public class ClientFactoryTests
{
Expand Down
4 changes: 2 additions & 2 deletions Tests/Client/RequestAdaptorTest.cs
@@ -1,6 +1,6 @@
using Xunit;
using GitHub.Client;
using GitHub.Authentication;
using GitHub.Octokit.Client;
using GitHub.Octokit.Authentication;
using NSubstitute;

public class RequestAdapterTests
Expand Down
2 changes: 1 addition & 1 deletion Tests/Tests.csproj
Expand Up @@ -38,6 +38,6 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\src\Octokit.NET.SDK.csproj" />
<ProjectReference Include="..\src\GitHub.Octokit.SDK.csproj" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/Authentication/TokenAuthenticationProvider.cs
@@ -1,9 +1,9 @@
// Copyright (c) GitHub 2023 Licensed as MIT.
// Copyright (c) GitHub 2023 - Licensed as MIT.

using Microsoft.Kiota.Abstractions;
using Microsoft.Kiota.Abstractions.Authentication;

namespace GitHub.Authentication;
namespace GitHub.Octokit.Authentication;

// TODO: Consider implementing `Basic` authentication scheme as a separate class
// TODO: Consider implementing `Anonymous` authentication scheme as a separate class
Expand Down
6 changes: 3 additions & 3 deletions src/Client/ClientFactory.cs
@@ -1,9 +1,9 @@
// Copyright (c) GitHub 2023 Licensed as MIT.
// Copyright (c) GitHub 2023 - Licensed as MIT.

using System.Net;
using GitHub.Client.Middleware;
using GitHub.Octokit.Client.Middleware;

namespace GitHub.Client;
namespace GitHub.Octokit.Client;

/// <summary>
/// Represents a client factory for creating <see cref="HttpClient"/>.
Expand Down
4 changes: 2 additions & 2 deletions src/Client/RequestAdapter.cs
@@ -1,9 +1,9 @@
// Copyright (c) GitHub 2023 Licensed as MIT.
// Copyright (c) GitHub 2023 - Licensed as MIT.

using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Http.HttpClientLibrary;

namespace GitHub.Client;
namespace GitHub.Octokit.Client;

public static class RequestAdapter
{
Expand Down
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>Octokit.NET.SDK</PackageId>
<PackageId>GitHub.Octokit.SDK</PackageId>
<Version>0.0.1-alpha</Version>
<NuGetVersion>0.0.1-alpha</NuGetVersion>
<Title>Octokit</Title>
Expand Down
6 changes: 3 additions & 3 deletions src/Middleware/APIVersionHandler.cs
@@ -1,9 +1,9 @@
// Copyright (c) GitHub 2023 Licensed as MIT.
// Copyright (c) GitHub 2023 - Licensed as MIT.

using GitHub.Client.Middleware.Options;
using GitHub.Octokit.Client.Middleware.Options;
using Microsoft.Kiota.Http.HttpClientLibrary.Extensions;

namespace GitHub.Client.Middleware;
namespace GitHub.Octokit.Client.Middleware;

/// <summary>
/// Represents a handler that adds the API version header to outgoing HTTP requests.
Expand Down
4 changes: 2 additions & 2 deletions src/Middleware/Options/APIVersionOptions.cs
@@ -1,8 +1,8 @@
// Copyright (c) GitHub 2023 Licensed as MIT.
// Copyright (c) GitHub 2023 - Licensed as MIT.

using Microsoft.Kiota.Abstractions;

namespace GitHub.Client.Middleware.Options;
namespace GitHub.Octokit.Client.Middleware.Options;

/// <summary>
/// Represents the API version options for the middleware.
Expand Down
4 changes: 2 additions & 2 deletions src/Middleware/Options/UserAgentOptions.cs
@@ -1,8 +1,8 @@
// Copyright (c) GitHub 2023 Licensed as MIT.
// Copyright (c) GitHub 2023 - Licensed as MIT.

using Microsoft.Kiota.Abstractions;

namespace GitHub.Client.Middleware.Options;
namespace GitHub.Octokit.Client.Middleware.Options;

/// <summary>
/// Represents the user agent options for the middleware.
Expand Down
6 changes: 3 additions & 3 deletions src/Middleware/UserAgentHandler.cs
@@ -1,10 +1,10 @@
// Copyright (c) GitHub 2023 Licensed as MIT.
// Copyright (c) GitHub 2023 - Licensed as MIT.

using System.Net.Http.Headers;
using GitHub.Client.Middleware.Options;
using GitHub.Octokit.Client.Middleware.Options;
using Microsoft.Kiota.Http.HttpClientLibrary.Extensions;

namespace GitHub.Client.Middleware;
namespace GitHub.Octokit.Client.Middleware;

public class UserAgentHandler(UserAgentOptions? userAgentHandlerOption = null) : DelegatingHandler
{
Expand Down

0 comments on commit 820a5e8

Please sign in to comment.