Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #22 from BlossomiShymae/issue-19-github-pages
Browse files Browse the repository at this point in the history
Add GitHub pages documentation website
  • Loading branch information
BlossomiShymae committed May 10, 2023
2 parents c51e77b + 78f7456 commit 0f0cb8a
Show file tree
Hide file tree
Showing 289 changed files with 13,906 additions and 766 deletions.
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -360,4 +360,15 @@ MigrationBackup/
.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd
FodyWeavers.xsd

# NPM
node_modules
*.log*
.nuxt
.nitro
.cache
.output
.env
dist
.DS_Store
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"grammarly.selectors": [
{
"language": "markdown",
"scheme": "file"
}
]
}
2 changes: 2 additions & 0 deletions BlossomiShymae.RiotBlossomDocs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shamefully-hoist=true
strict-peer-dependencies=false
42 changes: 42 additions & 0 deletions BlossomiShymae.RiotBlossomDocs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Nuxt 3 Minimal Starter

Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Setup

Make sure to install the dependencies:

```bash
# yarn
yarn install

# npm
npm install

# pnpm
pnpm install
```

## Development Server

Start the development server on http://localhost:3000

```bash
npm run dev
```

## Production

Build the application for production:

```bash
npm run build
```

Locally preview production build:

```bash
npm run preview
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
29 changes: 29 additions & 0 deletions BlossomiShymae.RiotBlossomDocs/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export default defineAppConfig({
docus: {
title: "RiotBlossom",
description: "An asynchronous, extensible, magical Riot API library for C#!",
url: "https://github.com/BlossomiShymae/RiotBlossom",
socials: {
"nuget" : {
label: "NuGet",
href: "https://www.nuget.org/packages/BlossomiShymae.RiotBlossom",
icon: "simple-icons:nuget"
},
github: "BlossomiShymae/RiotBlossom"
},
footer: {
credits: {
icon: "",
text: "© Blossomi Shymae, made with love! 🏳️‍⚧️💚💜",
href: "https://github.com/BlossomiShymae"
}
},
github: {
dir: "BlossomiShymae.RiotBlossomDocs/content",
edit: true,
owner: "BlossomiShymae",
repo: "RiotBlossom",
branch: "master"
},
}
})
11 changes: 11 additions & 0 deletions BlossomiShymae.RiotBlossomDocs/assets/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
code {
font-family: 'Cascadia Code', monospace !important;
}

section.block-hero span.content {
font-family: 'Cascadia Code', monospace !important;
}

section.card-grid h2.title {
display: none;
}
54 changes: 54 additions & 0 deletions BlossomiShymae.RiotBlossomDocs/content/0.index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: "Home"
description: ""
---

::block-hero
---
cta:
- Overview
- /overview/about-riotblossom
secondary:
- Open on GitHub ->
- https://github.com/BlossomiShymae/RiotBlossom
snippet: dotnet add package BlossomiShymae.RiotBlossom
---
#title
RiotBlossom

#description
The asynchronous, extensible, and magical .NET API wrapper library for Riot Games helps to make things totes' easier! ☆*:.。.o(≧▽≦)o.。.:*
::

::card-grid
#title
What's included

#root
:ellipsis

#default
::card
#title
Middleware plugins.
#description
![oh-look](/img/index-oh-look.png)
Out-of-the-box naive caching, rate limiting, and retrying are available. Use the default
or include your own!
::
::card
#title
Request driver.
#description
![kaisa-pengu](/img/index-kaisa-pengu.png)
Make manual requests to the Riot API while taking full advantage of RiotBlossom's
features!
::
::card
#title
That Ashe.
#description
![that-ashe](/img/index-that-ashe.png)
I just really wanted to use this emote... <sub><sup>She isn't included in RiotBlossom. *cries*</sup></sub>
::
::
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: "About RiotBlossom"
description: ""
---

# Overview of RiotBlossom

RiotBlossom is an asynchronous, extensible, and magical Riot Games API wrapper library for C#. ☆*:.。.o(≧▽≦)o.。.:*

This library helps to make things totes' easier! Goodies include naive cache, rate limiter, and retry middleware plugins out of the box. Other services such as DataDragon and CommunityDragon are also supported! \(^▽^)/

This library is currently compatible with .NET 6 and higher.

## Why use RiotBlossom?
- Asynchronous, immutable record, no-conversion API
- API data comes as is from the source (Data transfer objects)
- In-memory caching, spread rate limiting, and automatic retrying out of the box
- Fluent client builder for advanced configuration
- A highly configurable HTTP middleware system
- Allows implementing your middleware (choosing a database to cache with)
- Extensible subsystems (one for Riot API, one for the rest)
- Reuseable data transfer objects, types, and exceptions
- Common utilities (mappers and converters)
- Riot Games API support (yep!)
- League of Legends
- Teamfight Tactics
- Legends of Runeterra
- VALORANT
- DataDragon support
- CommunityDragon support
- Love (੭ु ›ω‹ )੭ु⁾⁾♡
88 changes: 88 additions & 0 deletions BlossomiShymae.RiotBlossomDocs/content/2.get-started/0.console.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: "Console"
description: ""
---

# Tutorial: Get started with RiotBlossom using .NET Core CLI

This totes awesome tutorial will show you how to install RiotBlossom and make
a request to the Riot Games API using .NET Core CLI!

You will learn how to:
- Create a console project
- Setup RiotBlossom
- Fetching data from `summoner-v4`
- Run the app

## Prerequisites

- .NET 6.0 SDK
- Riot Games development API key
- [Riot Games Developer Policies](https://developer.riotgames.com/policies/general)
- [Riot Games Developer Portal Documentation](https://developer.riotgames.com/docs/portal)

## Create a console project

Open your preferred shell and enter the following command:

```bash
dotnet new console
```

This command will create source files within the current directory.

## Setup RiotBlossom

We will first need to install RiotBlossom from nuget.org, an online NuGet package
repository for .NET apps.

```bash
dotnet add package BlossomiShymae.RiotBlossom
```

With the package added, we can now fetch data from `summoner-v4`!

## Fetching data from `summoner-v4`

Open `Program.cs` to modify and save the code to something like this:

```csharp
using BlossomiShymae.RiotBlossom.Core;
using BlossomiShymae.RiotBlossom.Type;

string key = Environment.GetEnvironmentVariable("RIOT_API_KEY")
?? throw new InvalidOperationException("RIOT_API_KEY must be set!");
var client = RiotBlossomCore.CreateClient(key);

var summoner = await client.Riot.Summoner
.GetByNameAsync(Platform.NorthAmerica, "uwuie time");

Console.WriteLine(summoner);
```

## Run the app

Run the following command:

```bash
dotnet run
```

It should result in something similar to this:

```json
SummonerDto {
"AccountId": "0WvZHECxpBFNlntYzcCNyDkGeaqA6vthcLsklngrPVYofWE",
"ProfileIconId": 5367,
"RevisionDate": 1675651090000,
"Name": "uwuie time",
"Id": "Ao5ffQ2dOV-99YKs_iB0g2EGzGD159jXIk2Z5MjvMafLwbQ",
"Puuid": "Bd1zj7cFt3MlCZl2GI-5N94D2PHRsfpsjl-6ZM9LjXIm90Bz4JAdwR6Kw4fzbSPFfLoQI5p9hGIhfA",
"SummonerLevel": 936
}
```

Yay! You just learned how to get started with RiotBlossom in a .NET Core console
application!

![Lux](/img/get-started-lux.png)
Loading

0 comments on commit 0f0cb8a

Please sign in to comment.