Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added README.md files for NuGet packages #196

Merged
merged 1 commit into from
Jul 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Description>Extensions of Microsoft.Extensions.DependencyInjection for the Argent Pony .NET client.</Description>
<Title>Argent Pony Warcraft Client Dependency Injection</Title>
<PackageTags>Warcraft;World-of-Warcraft;WoW;Blizzard;Dependency-Injection;DI</PackageTags>
<PackageIcon>ArgentPony.png</PackageIcon>
</PropertyGroup>

<PropertyGroup Condition="'$(CI)' == 'true'">
Expand All @@ -20,4 +21,9 @@
<ProjectReference Include="..\ArgentPonyWarcraftClient\ArgentPonyWarcraftClient.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="docs/ArgentPony.png" Pack="true" PackagePath="\" />
<None Include="docs/README.md" Pack="true" PackagePath="\"/>
</ItemGroup>

</Project>
File renamed without changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Argent Pony Warcraft Client Dependency Injection

The Argent Pony Warcraft Client Dependency Injection NuGet package is an extension that enables dependency injection for the [Argent Pony Warcraft Client](https://www.nuget.org/packages/ArgentPonyWarcraftClient/), a .NET client for the [Blizzard World of Warcraft APIs](https://develop.battle.net/documentation/world-of-warcraft).
It is a [.NET Standard](https://docs.microsoft.com/en-us/dotnet/standard/net-standard) 2.0 library, which means it supports a broad range of platforms, including .NET Core 2.0+ and .NET Framework 4.6.1+.

## Documentation

Documentation is available at [https://blizzard-net.github.io/warcraft/](https://blizzard-net.github.io/warcraft/).

See especially [Dependency Injection](https://blizzard-net.github.io/warcraft/docs/dependency-injection).

## Usage

Use the `AddWarcraftClients()` extension method on the `IServiceCollection` instance to register the necessary types.

```cs
public void ConfigureServices(IServiceCollection services)
{
string clientId = "MY-CLIENT-ID-GOES-HERE";
string clientSecret = "MY-CLIENT-SECRET-GOES-HERE";

services.AddWarcraftClients(clientId, clientSecret);
}
```

## Feedback

Report problems in the [GitHub Issues](https://github.com/blizzard-net/warcraft/issues) for the project or join the [Discussions](https://github.com/blizzard-net/warcraft/discussions).
6 changes: 6 additions & 0 deletions src/ArgentPonyWarcraftClient/ArgentPonyWarcraftClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<Description>The Argent Pony .NET client for the Blizzard World of Warcraft Game Data and Profile APIs</Description>
<Title>Argent Pony Warcraft Client</Title>
<PackageTags>Warcraft;World-of-Warcraft;WoW;Blizzard</PackageTags>
<PackageIcon>ArgentPony.png</PackageIcon>
</PropertyGroup>

<PropertyGroup Condition="'$(CI)' == 'true'">
Expand All @@ -17,4 +18,9 @@
<PackageReference Include="System.Text.Json" Version="5.0.2" />
</ItemGroup>

<ItemGroup>
<None Include="docs/ArgentPony.png" Pack="true" PackagePath="\" />
<None Include="docs/README.md" Pack="true" PackagePath="\"/>
</ItemGroup>

</Project>
Binary file added src/ArgentPonyWarcraftClient/docs/ArgentPony.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions src/ArgentPonyWarcraftClient/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Argent Pony Warcraft Client

The Argent Pony Warcraft Client is a .NET client for the [Blizzard World of Warcraft APIs](https://develop.battle.net/documentation/world-of-warcraft). It lets .NET applications easily access information about World of Warcraft characters, guilds, items, spells, and more. It is a [.NET Standard](https://docs.microsoft.com/en-us/dotnet/standard/net-standard) 2.0 library, which means it supports a broad range of platforms, including .NET Core 2.0+ and .NET Framework 4.6.1+.

## Documentation

Documentation is available at [https://blizzard-net.github.io/warcraft/](https://blizzard-net.github.io/warcraft/)

## Usage

The `WarcraftClient` class provides access to the World of Warcraft APIs.

```cs
// Secrets from https://develop.battle.net/documentation/guides/getting-started.
string clientId = "MY-CLIENT-ID-GOES-HERE";
string clientSecret = "MY-CLIENT-SECRET-GOES-HERE";
var warcraftClient = new WarcraftClient(clientId, clientSecret);

// Retrieve the character profile for Drinian of realm Norgannon.
RequestResult<CharacterProfileSummary> result =
await warcraftClient.GetCharacterProfileSummaryAsync("norgannon", "drinian", "profile-us");

// If we got it, display the level.
if (result.Success)
{
CharacterProfileSummary profile = result.Value;
Console.WriteLine($"Level for {profile.Name}: {profile.Level}");
}
```

See [Getting Started](https://blizzard-net.github.io/warcraft/docs/getting-started) and [Using the Library](https://blizzard-net.github.io/warcraft/docs/usage) for detailed instructions.

## Feedback

Report problems in the [GitHub Issues](https://github.com/blizzard-net/warcraft/issues) for the project or join the [Discussions](https://github.com/blizzard-net/warcraft/discussions).
4 changes: 0 additions & 4 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<RepositoryUrl>https://github.com/blizzard-net/warcraft</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>ArgentPony.png</PackageIcon>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand All @@ -20,7 +19,4 @@
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<ItemGroup>
<None Include="$([MSBuild]::GetPathOfFileAbove('ArgentPony.png', '$(MSBuildThisFileDirectory)..\'))" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>