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

Commit

Permalink
Add extensions section and update ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
BlossomiShymae committed May 14, 2023
1 parent 32328a7 commit 045f316
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 0 deletions.
106 changes: 106 additions & 0 deletions BlossomiShymae.RiotBlossomDocs/content/4.fundamentals/4.extensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
title: "Extensions"
description: ""
---

# Extensions

:badge[Added in 1.2.0]

RiotBlossom provides extensions that turbo charges the provided type enums! This should
be way better than the old way of manually referencing a mapper or converter, hehe!

![hehe](/img/fundamentals-extensions-hehe.png)

Provided examples of each available method are shown below:

## LeagueDivisionExtensions

```csharp
// => "IV"
LeagueDivision.IV.GetValue();
```

## LeagueQueueExtensions

```csharp
// => "RANKED_SOLO_5x5"
LeagueQueue.RankedSolo5x5.GetValue();
```

## LeagueTierExtensions

```csharp
// => "PLATINUM"
LeagueTier.Platinum.GetValue();
```

## LorRegionExtensions

```csharp
// => "americas"
LorRegion.Americas.GetId();
```

## PlatformExtensions

```csharp
// => "JP"
Platform.Japan.GetAbbreviation();
```

```csharp
// => "Europe Nordic and East"
Platform.EuropeNordicEast.GetPrettyName();
```

```csharp
// => Region.Asia
Platform.Korea.GetRegion();
```

```csharp
// => "na1"
Platform.NorthAmerica.GetId();
```

```csharp
// => "americas"
Platform.Brazil.GetRegionId();
```

```csharp
// => "ja_JP"
Platform.Japan.GetDefaultLocale();
```

## RegionExtensions

```csharp
// => "americas"
Region.Americas.GetId();
```

```csharp
// => "Asia"
Region.Asia.GetPrettyName();
```

## TftLeagueQueueExtensions

```csharp
// => "RANKED_TFT_TURBO"
TftLeagueQueue.RankedTftTurbo.GetValue();
```

## ValRegionExtensions

```csharp
// => "NA"
ValRegion.NorthAmerica.GetAbbreviation();
```

```csharp
// => "ap"
ValRegion.AsiaPacific.GetId();
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 045f316

Please sign in to comment.