diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml index 511a33e..f662303 100644 --- a/.github/linters/.markdown-lint.yml +++ b/.github/linters/.markdown-lint.yml @@ -1,20 +1,30 @@ default: true -header-increment: false -blanks-around-headers: 0 + +MD001: false # heading-increment +MD022: false # blanks-around-headings +MD033: false # no-inline-html +MD041: false # first-line-heading + header-style: style: atx + ul-style: style: dash + code-block-style: style: fenced + code-fence-style: style: backtick + emphasis-style: style: underscore + strong-style: style: asterisk + line-length: - line_length: 250 + line_length: 400 code_blocks: false tables: false headings: false diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml index 607978a..a512b2d 100644 --- a/.github/workflows/markdown-lint.yml +++ b/.github/workflows/markdown-lint.yml @@ -14,7 +14,7 @@ jobs: - name: Get changed files id: changed-files - uses: tj-actions/changed-files@v23.1 + uses: tj-actions/changed-files@v40 with: files: | **/*.md diff --git a/wiki/dragon6/desktop/en.md b/wiki/dragon6/desktop/en.md deleted file mode 100644 index a4b6c46..0000000 --- a/wiki/dragon6/desktop/en.md +++ /dev/null @@ -1,17 +0,0 @@ -# Dragon6 Desktop - -Dragon6 Desktop (previously known as Dragon6 Electron) is a Windows edition of Dragon6 web, with support for additional features -including news feeds, saved players, recent players, more stats and faster loading times. - -The client can be downloaded on compatible Windows devices from the [Microsoft Store](https://www.microsoft.com/en-gb/p/dragon6/9n88cqpkgs15). - -### History - -Dragon6 Desktop was initially released in February 2019 as a WPF app, which was replaced a few months later with a client that closer matched the website (bundled as an [Electron app](https://www.electronjs.org/)). -In March 2021, the Electron backend was replaced in favour of a WebView2-backed system maintained in-house by the DragonFruit development team. -It shares most of its code with the Orbit implementation, with the most notable changes including the omission of update checking at startup and a different colour scheme. - -### Trivia - -- When downloading the Dragon6 desktop app, Windows 11 users will have a significantly smaller download and disk footprint -due to [Windows bundling WebView2](https://blogs.windows.com/windowsdeveloper/2021/10/04/developing-for-windows-11/) with new versions of Windows diff --git a/wiki/dragon6/developers/accounts/en.md b/wiki/dragon6/developers/accounts/en.md deleted file mode 100644 index 8e332d3..0000000 --- a/wiki/dragon6/developers/accounts/en.md +++ /dev/null @@ -1,25 +0,0 @@ -# Ubisoft Account API -Ubisoft provides a set of endpoints that can be used to lookup general account information, including reverse-id searching. - -| Property | Description | -|------------|------------------------------------------------------------------------------------------------------------------| -| Username | | -| Platform | The platform the user was looked up on | -| Image | A url for the user's avatar image (256x256px) | -| ProfileId | The id used to return stats. This is not always the same as the other identifiers | -| UbisoftId | The id of the Ubisoft account. Can be used in conjunction with the Platform to get a user's current account info | -| PlatformId | The id of the user on the original platform | - -### Usage -> This assumes you have created a custom [Dragon6Client](/wiki/dragon6/developers/clients) - -```cs -private async Task GetAccountInfo(string identifier, Platform platform) -{ - // NOTE: you can also run GetAccountsAsync instead and pass a load of identifiers to get back - var accInfo = await Client.GetAccountAsync(identifier, platform, IdentifierType.UserId).ConfigureAwait(false); - - // for the account, get their activity on R6 - var loginData = await Client.GetAccountActivityAsync(accInfo).ConfigureAwait(false); -} -``` \ No newline at end of file diff --git a/wiki/dragon6/developers/assets/en.md b/wiki/dragon6/developers/assets/en.md deleted file mode 100644 index afa33ee..0000000 --- a/wiki/dragon6/developers/assets/en.md +++ /dev/null @@ -1,12 +0,0 @@ -# Assets -Dragon6 offers static JSON datasets for legacy operator info and seasons, along with seasonal backgrounds and operator icon images. -Each type of data in the repo is licensed differently. Refer to the [readme](https://github.com/dragonfruitnetwork/dragon6-assets) for more info and licenses - -### Usage -> All data is accessable at https://dragonfruitnetwork.github.io/dragon6-assets - -| Type | URL Template | -|----------------|----------------------------------| -| Backgrounds | `/backgrounds/[seasonId].jpg` | -| Operator Icons | `/ops/[name].png` | -| Datasets | `/data/[seasons/operators].json` | \ No newline at end of file diff --git a/wiki/dragon6/developers/clients/en.md b/wiki/dragon6/developers/clients/en.md deleted file mode 100644 index 6491218..0000000 --- a/wiki/dragon6/developers/clients/en.md +++ /dev/null @@ -1,58 +0,0 @@ -# Dragon6 Client -Dragon6 is built on [DragonFruit.Data](https://github.com/dragonfruitnetwork/dragonfruit-common), a framework which is used across all DragonFruit APIs to enable consistency when working with our libraries. -Due to how Ubisoft authentication works, developers must inherit the base `Dragon6Client` class and provide a way for the client to obtain a token for the provided `UbisoftService`. -It is recommended that some form of persistent storage is used to hold tokens due to strict ratelimits imposed on logins. -**Requesting tokens too frequently can result in a tempoary IP ban. You should save the token recieved to some form of storage (redis, files, etc.)** - -These clients are designed to be either `static` or `Singleton` (if using a dependency container system), and all management is automatic, with performance and memory optimisations out-the-box. - -As of version [2022.702](https://github.com/dragonfruitnetwork/dragon6-api/releases/tag/2022.702), the `GetToken()` method is fully asynchronous, which improves performance due to networking/IO tasks that occur. - -### Example -> It is bad practise to store credentials in plain code. Store them somewhere safe, like a configuration file or environment variables - -```cs -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; -using DragonFruit.Data.Serializers.Newtonsoft; -using DragonFruit.Six.Api; -using DragonFruit.Six.Api.Authentication; - -namespace DragonFruit.Six.Web.Services -{ - public class StatsClient : Dragon6Client - { - private string GetTokenPath(UbisoftService service) => Path.Combine(Path.GetTempPath(), $"ubi-{service.ToString().ToLowerInvariant()}.token") - - /// - /// Tells the Dragon6 Client how to get a token in the case it's restarted or expired - /// - /// - /// This is a thread-safe method and will not be called more than once at a time, regardless of how many requests the client receives. - /// - protected override ValueTask GetToken(UbisoftService service, string sessionId) - { - var path = GetTokenPath(service); - - if (File.Exists(path)) - { - // if we have a file with some potentially valid keys, try that first - var token = FileServices.ReadFile(path); - - if (!token.Expired) - return token; - } - - // store logins somewhere that is NOT in the code - var username = "username"; - var password = "password"; - var newToken = await this.GetUbiTokenAsync(service, username, password).ConfigureAwait(false); - - FileServices.WriteFile(path, newToken); - return newToken; - } - } -} -``` diff --git a/wiki/dragon6/developers/en.md b/wiki/dragon6/developers/en.md deleted file mode 100644 index 40cd542..0000000 --- a/wiki/dragon6/developers/en.md +++ /dev/null @@ -1,15 +0,0 @@ -# Dragon6 API -![NuGet Publishing](https://github.com/dragonfruitnetwork/dragon6-api/workflows/Publish/badge.svg) -[![NuGet](https://img.shields.io/nuget/v/DragonFruit.Six.Api)](https://www.nuget.org/packages/DragonFruit.Six.Api/) - -Dragon6 API is a client wrapper for the Ubisoft services, aiming to create a frictionless and quick development experience. - -| Page | Description | -|---------------------------------------------------------------------|--------------------------------------------------------------------------| -| [Getting Started](/wiki/dragon6/developers/quickstart) | A quick guide for getting started | -| [Migration Guides](/wiki/dragon6/developers/migration-guides) | A collection of guides to help migrating to newer versions of the API | -| [Clients](/wiki/dragon6/developers/clients) | How to create a client that can communicate with the Ubisoft servers | -| [Accounts](/wiki/dragon6/developers/accounts) | Information on how account searching works | -| [Legacy Stats](/wiki/dragon6/developers/legacy) | Notes on the legacy stats system (the one that Ubisoft replaced in 2020) | -| [Seasonal Stats](/wiki/dragon6/developers/seasonal) | How to view ranked and casual stats for a specific season | -| [Assets](/wiki/dragon6/developers/assets) | How to use our asset repository to consume seasonal information | diff --git a/wiki/dragon6/developers/legacy/en.md b/wiki/dragon6/developers/legacy/en.md deleted file mode 100644 index cfae212..0000000 --- a/wiki/dragon6/developers/legacy/en.md +++ /dev/null @@ -1,43 +0,0 @@ -# Legacy Stats -Dragon6 API offers access to the stats used by the official website prior to September 2020. These include: - -### Mode and Playlist stats -Classic stats such as overall kills/deaths, wins/losses and time played are available for all modes (Casual and Unranked, Ranked, Training) and rulesets (Secure, Bomb, Hostage) - -```cs -var generalStats = await client.GetLegacyStatsAsync(account).ConfigureAwait(false); - -generalStats.Casual.Kills; // get the casual kills -generalStats.Hostage.Wins; // get wins on hostage mode -generalStats.Barricades; // get total barricades deployed -``` - -### Weapons -Weapon stats are returned in an `IEnumerable` type containing the weapon class, kills, picks, headshots and some accuracy metrics - -```cs -var weaponStats = await client.GetLegacyWeaponStatsAsync(account).ConfigureAwait(false); - -foreach(var weapon in weaponStats) -{ - weapon.Class; // get the weapon type (as an enum) - weapon.Kills; // get the kills for this weapon class -} -``` - -### Operators -Operator stats (pre Y6S4) are included with kills, deaths, wins, losses, time played, experience gained and headshot count. In order to get metadata for the operators (name, attack/defender, organisation), the Dragon6 dataset can be fetched and left or inner-joined against the stats to get a complete list of stats - -```cs -var operatorInfo = await client.GetLegacyOperatorInfoAsync().ConfigureAwait(false); -var operators = await client.GetLegacyOperatorStatsAsync(account).ConfigureAwait(false); - -// this combines both operator info and stats into a Tuple -var stats = operatorInfo.Join(operators, i => i.OperatorId, s => s.OperatorId, (i, s) => Tuple.Create(i, s)).ToArray(); - -foreach(var (operatorInfo, operatorStats) in stats) -{ - operatorInfo.Name; // get the name of the operator - operatorStats.Kills; // get the operator killcount -} -``` \ No newline at end of file diff --git a/wiki/dragon6/developers/migration-guides/2022.1223/en.md b/wiki/dragon6/developers/migration-guides/2022.1223/en.md deleted file mode 100644 index afd6ba3..0000000 --- a/wiki/dragon6/developers/migration-guides/2022.1223/en.md +++ /dev/null @@ -1,39 +0,0 @@ -# DragonFruit.Six.Api Migration Guide 2022.1223 - -This is a migration guide listing the biggest breaking changes to the library that developers should pay attention to. - -### 🗑️ Removal of account activity methods -Ubisoft has stopped updating the times users has last logged into the game, and as it doesn't look like it's getting unblocked soon we've removed the ability to access the data. - -### ⚠️ Changes to Authentication -Because of the way authentication is managed on some of the APIs used internally to fetch data, tokens from multiple sources may need to be used. -For example, the Ranked2 endpoints need to be authenticated as the game itself, but the token used to load those stats cannot be used to get some stats on other platforms. - -In response to adding the new endpoints, the way tokens are fetched has been changed to accompodate some endpoints requring specific service tokens: - -- The `SetUbiAppId()` method has been removed, and has been replaced with the `DefaultService` property -- The `GetToken()` method now accepts both a `UbisoftService` and `string` parameters - - ```cs - // old - protected override Task GetToken(string sessionId) { } - - // new - protected override Task GetToken(UbisoftService service, string sessionId) { } - ``` - -### 🌱 Removal of legacy levels and introduction of cross-platform levels -The old levels API has been removed due to levels not reflecting potential cross-platform changes, and has been replaced with a cross-platform compatible alternative. - -There are a couple of differences with this endpoint: - -- It's not batch-lookup compatible -- It doesn't return alpha-pack chances unlike the previous endpoint - -```cs -// old -var level = await client.GetLegacyLevelAsync(account).ConfigureAwait(false); - -// new -var level = await client.GetAccountLevelAsync(account).ConfigureAwait(false); -``` diff --git a/wiki/dragon6/developers/migration-guides/en.md b/wiki/dragon6/developers/migration-guides/en.md deleted file mode 100644 index b7e9a65..0000000 --- a/wiki/dragon6/developers/migration-guides/en.md +++ /dev/null @@ -1,16 +0,0 @@ -# Dragon6 API Migration Guides -These guides are aimed at developers using the Dragon6 API, and need a quick reference of breaking changes and how to resolve them. -Guides are written by contributors, and checked by primary maintainers. Where possible, guides will continue from one-another, reducing the complexity of large version jumps. - -## Icons -Each change is marked with an icon to denote it's meaning/effort required to resolve. This list may expand as new icons are needed - -| Icon | Description | -|--------|------------------------------------| -| 🗑️ | Removal | -| ⚠️ | User written-code changes required | -| 🌱 | Replacement/Addition | - -## Guides - -- [2022.1223](/wiki/dragon6/developers/migration-guides/2022.1223) diff --git a/wiki/dragon6/developers/quickstart/en.md b/wiki/dragon6/developers/quickstart/en.md deleted file mode 100644 index ffcf9b6..0000000 --- a/wiki/dragon6/developers/quickstart/en.md +++ /dev/null @@ -1,21 +0,0 @@ -# Getting Started -> Applies to library version **2022.1222** and higher - -### Create a project and add Dragon6 - -1. If you haven't already, create a c# project in Visual Studio, Rider or whatever IDE you're using that targets .NET 6.0 or higher. -2. Once you've created it, right click the project in the Solution explorer and click `Manage Nuget Packages` -3. (On Visual Studio, click Browse first) then type into the search box `DragonFruit.Six.Api` -4. Select the package and press install (on Rider it is a plus icon) - -### Create the stats client -You now need to decide how you want to cache access tokens. This is important as when debugging, you'll likely restart the app multiple times which will run your login quota dry quickly. -We recommend storing the token in a text file and try to retrieve it from there before resorting to online measures. In production, you could consider using other providers such as Redis, or a NoSQL database to store the token instead. - -To create a stats client, add a new class that inherits `Dragon6Client` and implement the function `GetToken`. -A single instance should then be initialised for the duration of the session, either marking it as `static` or using a dependency container with a `Singleton` lifetime (or equivalent). - -See the "Usage" section in [Clients](/wiki/dragon6/developers/clients) to see an example of how to implement the client. - -### Use the client -When accessing the client, the library provides a set of extension methods to get developers started as soon as possible. Refer to the [Dragon6 Developer homepage](/wiki/dragon6/developers) for specific aspects of the library and examples. diff --git a/wiki/dragon6/developers/seasonal/en.md b/wiki/dragon6/developers/seasonal/en.md deleted file mode 100644 index a717abb..0000000 --- a/wiki/dragon6/developers/seasonal/en.md +++ /dev/null @@ -1,28 +0,0 @@ -# Seasonal Stats -Dragon6 offers the ability to retrieve seasonal stats for both Casual and Ranked modes with the ability to retrieve previous seasons' data. - -#### Season Id -The season id starts at `5`, and increments by one each season. Refer to the [Dragon6 Dataset](https://github.com/dragonfruitnetwork/dragon6-assets/blob/master/public/data/seasons.json) for the season names and metadata. The default value of `-1` will return the current season. - -#### Region -Prior to Y5S2, an account could have up-to three ranks based on the region they played in. These regions are: - -- `EMEA` - Europe and the Middle East -- `NCSA` - North, Centeral and South America -- `APAC` - Asia and The Pacific - -You will need to specify which one you want to return stats for if getting stats prior to season `18`. - -#### Playlist -Casual seasonal stats were introduced to the api in Y4S3 (season id `17`) and attempting to retrieve casual stats for a previous season will result in faulure. - -#### Ranks -Ranks are automatically calculated based on official rank values and in casual, MMR. These are correct for the season the user played in (for example, a player can achieve Gold 4 in Y3S4, but not now). These can be accessed with the `Rank` and `MMRRank` properties. - -### Usage - -```cs -var currentSeasonRanked = await client.GetSeasonalStatsAsync(account).ConfigureAwait(false); -var currentSeasonCasual = await client.GetSeasonalStatsAsync(account, board: BoardType.Casual).ConfigureAwait(false); -var previousSeason = await client.GetSeasonalStatsAsync(account, 10).ConfigureAwait(false); -``` \ No newline at end of file diff --git a/wiki/dragon6/discord/en.md b/wiki/dragon6/discord/en.md deleted file mode 100644 index 64db86f..0000000 --- a/wiki/dragon6/discord/en.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -tags: - - discord - - bot ---- - -# Dragon6 Discord - -Dragon6 offers a Discord bot that can be used to access stats within the Discord chat interface. The bot can be invited using the link on the [Dragon6 website](https://dragon6.dragonfruit.network/discord) - -## Using the bot - -After inviting the bot using the link above, it's ready to use. We recommend setting a couple of dedicated channels for commands to be sent from to prevent over-cluttering, which can be done by visiting your [server's integrations page](https://support.discord.com/hc/en-us/articles/360045093012-Server-Integrations-Page). - -> Admins of a server can use all slash commands in any text channel, regardless of restrictions applied in the integrations page - -Commands are invoked by typing a forward slash (`/`), followed by the command name and any options required. Some commands may require more information than others - the table below outlines each command, its options and expected response. - -## Commands - -Command options in [square brackets] denote the option is required, while options surrounded by (curved brackets) are optional - -### `/about [username] (platform)` - -Gets basic information about an account including: - -- Time since last gameplay session -- Number of gameplay sessions -- Date the game was first played - -### `/level [username] (platform)` - -Gets the level and alpha pack chances of the provided user. - -### `/overview [username] (platform)` - -Fetches and displays a general overview of the user's gameplay over the past ~60 days. Stats are aggregated from Casual, Ranked and Unranked gameplay. - -### `/seasonal [board] [username] (platform)` - -Fetches the user's seasonal stats for the provided leaderboard (ranked, casual or deathmatch). The user must have played (or abandoned) at least one match for the command to return any meaningful response. - -### `/operators [username] (platform)` - -Displays the players most picked operators from the past ~60 days across casual, unranked and ranked - -### `/players` - -Displays the number of players currently online who own the game through Steam - -### `/dragon6-apps` - -Returns a set of links to other Dragon6 apps (only the caller can view the response) - -## Trivia - -- The platform parameter is not needed unless the user is not on PC/UPlay -- Linking a Discord account from the Dragon6 website allows callers to substitute the `username` option to `me` -- Most errors are returned as [ephemeral messages](https://support.discord.com/hc/en-us/articles/1500000580222-Ephemeral-Messages-FAQ), meaning they will expire and others cannot view them diff --git a/wiki/dragon6/legal/news-publishers/en.md b/wiki/dragon6/legal/news-publishers/en.md deleted file mode 100644 index ff8c8ea..0000000 --- a/wiki/dragon6/legal/news-publishers/en.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -tags: - - news - - publishers ---- - -# Dragon6 News Sources - - - -Dragon6 apps display news sourced from the [Official Ubisoft website](https://steamcommunity.com/dev) for easy access to a near-identical experience to the ones found in other clients. -These articles are written and maintained by Ubisoft, and do not contain third party aggregated content. Enquiries relating to the content of these articles should be directed to [Ubisoft Customer Support](https://www.ubisoft.com/en-us/help). - -Please note DragonFruit Network and Dragon6 do **not** publish their own content within these feeds. diff --git a/wiki/dragon6/legal/privacy/en.md b/wiki/dragon6/legal/privacy/en.md deleted file mode 100644 index 7ab04c4..0000000 --- a/wiki/dragon6/legal/privacy/en.md +++ /dev/null @@ -1,65 +0,0 @@ -# Dragon6 Privacy Policy -#### Last Updated: January 2023 - -### **Overview** -Dragon6 is owned and operated by DragonFruit Network (also refered to as "We"). -The use of this service is subject to the agreement of the terms outlined in this page. Please also note that we may change these at any time, without notice. - -### **Terms of Use** -You can find the Terms of Use [here](/wiki/dragon6/legal/terms) - -### **What data do you collect?** -To operate Dragon6, we need to collect the player’s username and platform to be able to find their stats. This may mean that users lookup other players/accounts that aren’t theirs. These usernames are aliases and are publicly visible across different games/platforms. - -When using the Dragon6 client, we also collect non-identifiable app version info (consisting of operating system and app version ids) to protect our service from unauthorized use. - -### **What 3rd Party services do you use?** -We use Sentry to automatically report errors. This may involve sending non-identifiable device information (for example OS and browser version) to us to help diagnose issues. -In some older versions of Dragon6, we have also used Google Analytics to learn how people use our service. - -### **What about the Discord Bot?** -The Dragon6 Discord bot uses slash commands, and as such is only able to see the data directly provided to it. If you use the account name 'me', the bot will use your Discord account identifier to locate a linked account in our systems. No data provided to the Discord bot is retained after the interaction has completed. - -### **What data do you store?** -Accounts being searched normally have no data stored except from the account information which is cached for approximately 12 hours. If you decide to signup to the site to access limited features, a Ubisoft profile will be required to link to a Social Media account (provided via Google). In this case we only use the Social Media login to consume the user ids. We store the Ubisoft id and Firebase id (social media login) along with any additional data provided by the user. - -Supporters (donors) get extra privileges, like the ability to upload custom backgrounds. DragonFruit Network accepts no responsibility for the content uploaded, but if you are an owner and would like a photo removed please email inbox@dragonfruit.network to discuss this. - -Identifiers used for the purposes of logins are not shared, but some information is publicly available via our API. This data cannot be used to identify an account, nor identify its owner. An example of a public user profile can be seen below. - -```json -{ - "profile_id": "14c01250-ef26-4a32-92ba-e04aa557d619", - "profile_type": 6, - "title": null, - "title_icon": "admin_panel_settings", - "title_colour": null, - "cover": { - "raw": "https://objectstorage.uk-london-1.oraclecloud.com/n/lrhdo0i9vwyu/b/dragon6-covers/o/64d69726202d4f2694a9dc5f699d61d0.jpg", - "large": "https://img.dragonfruit.network/jffn7YmC5WmzDjlg3Mc-ktgsE_8zENWG1HfnbLbnWeU/quality:95/resize:auto:1920:1080:0:0/aHR0cHM6Ly9vYmplY3RzdG9yYWdlLnVrLWxvbmRvbi0xLm9yYWNsZWNsb3VkLmNvbS9uL2xyaGRvMGk5dnd5dS9iL2RyYWdvbjYtY292ZXJzL28vNjRkNjk3MjYyMDJkNGYyNjk0YTlkYzVmNjk5ZDYxZDAuanBn.jpg", - "banner": "https://img.dragonfruit.network/XUHhWmFbFhOIZ8oLcn7YDjuPD_PiUZilTJKmA9WRCuc/quality:85/crop:0:300/gravity:ce/aHR0cHM6Ly9vYmplY3RzdG9yYWdlLnVrLWxvbmRvbi0xLm9yYWNsZWNsb3VkLmNvbS9uL2xyaGRvMGk5dnd5dS9iL2RyYWdvbjYtY292ZXJzL28vNjRkNjk3MjYyMDJkNGYyNjk0YTlkYzVmNjk5ZDYxZDAuanBn.jpg", - "mobile": "https://img.dragonfruit.network/oIVC8sgzm-_m9ej54tsKiwrRQnQyqsrd7Xowsds15DU/quality:90/crop:0:750/gravity:ce/aHR0cHM6Ly9vYmplY3RzdG9yYWdlLnVrLWxvbmRvbi0xLm9yYWNsZWNsb3VkLmNvbS9uL2xyaGRvMGk5dnd5dS9iL2RyYWdvbjYtY292ZXJzL28vNjRkNjk3MjYyMDJkNGYyNjk0YTlkYzVmNjk5ZDYxZDAuanBn.jpg" - } -} -``` - -### **Do you sell data?** -No. We don’t sell data. - -### **So, I signed up. Where is my data being stored?** -Sign-ins are currently managed by Google, with all other data securely stored on servers within the United Kingdom. All data is transferred using industry-standard encryption and is also encrypted at rest. - -### **Can I request data collected from my is deleted?** -Yes, you can send an email to inbox@dragonfruit.network and we'll repsond with more details. - -### **I don’t want people looking my account up. How do I stop this?** -No problem. All you need to do is email inbox@dragonfruit.network with a screenshot of the Dragon6 Stats page open and some proof of ownership (i.e. a Uplay window or a R6 Home Screen with the squad list open). We’ll then block your account and if you signed up, we’ll delete you from our database. - -### **How accurate is the data you’re showing me?** -As accurate as it can be. On any of our sites/apps, the data is taken directly from Ubisoft servers, with no processing in-between. Your device processes this and displays the data directly. Very little of the data is cached, and when it is, it won't be for any longer than 10 minutes. - -### **What about cookies?** -Cookies may be used for analytical purposes or storing signins. We suggest using an ad-blocker to prevent the use of non-essential cookies. - -### **I have another question that you haven’t answered.** -Seriously? It’s not an issue. Email inbox@dragonfruit.network with your question and we’ll get back to you ASAP. diff --git a/wiki/dragon6/legal/service-termination/en.md b/wiki/dragon6/legal/service-termination/en.md deleted file mode 100644 index 16988f7..0000000 --- a/wiki/dragon6/legal/service-termination/en.md +++ /dev/null @@ -1,7 +0,0 @@ -# Dragon6 Service Termination Notice - -Dragon6 has been around since 2018 and during that time has evolved many times, including the addition of "modern stats", casual/unranked skill levels and more recently, Ranked 2.0 stats. At this point in time Ubisoft is making so many breaking changes it has become more time-consuming to repair the website and client, and with lower user counts compared to alternative services. - -As a result of this, DragonFruit will discontinue the service as of **3rd April 2023**, after which the website and clients will no longer function. The API will be maintained for the forseeable future to allow others to embed stats into their own apps, with support being offered to developers using the library. We will also be making the token-rotating system we use internally public, and will archive dragon6-assets, dragon6 and dragon6-locale projects on GitHub. - -Thank you to everyone that has used the service, especially those who have contributed to the development of the client. \ No newline at end of file diff --git a/wiki/dragon6/legal/terms/en.md b/wiki/dragon6/legal/terms/en.md deleted file mode 100644 index 0559833..0000000 --- a/wiki/dragon6/legal/terms/en.md +++ /dev/null @@ -1,36 +0,0 @@ -# Dragon6 Terms of Service -#### Last Updated: April 2021 - -### **Overview** -DragonFruit Network is offering you a service, which is conditioned on your acceptance, without any modification whatsoever to the following terms, conditions, and notices. By visiting and/or using the services offered by this site (https://dragon6.dragonfruit.network) or any affiliated services (henceforth referenced as "Dragon6"), you are acknowledging your full compliance to the terms and conditions listed here. As a condition of your use of this web site, you warrant that you will not use this web site, or any of the content obtained from this web site, for any purpose that is unlawful or prohibited by these terms. In addition to this policy, please also make sure to visit and understand our [Privacy Policy](/wiki/dragon6/legal/privacy). If you violate any of these Terms of Use, your permission to use the web site automatically terminates. - -### **Description Of Service** -Dragon6 provides Rainbow Six gameplay statistics free of charge to end users, along with the ability to link accounts to other platforms for use with other Dragon6 products, like the Discord bot. Dragon6 also provides users with a means of hosting user created content allowing other users to gain access to uploaded content. - -The Dragon6 management (hereby refered to as "We") make no guarantees as to whether any user-uploaded content and information is accurate, current, or of substantial quality. We assume no responsibility as to whether objectionable content has been uploaded and assume no responsibility over whether users have the rights to distribute uploaded content. - -### **Modifications To Terms Of Service** -Dragon6 may change the terms and conditions of the TOS from time to time, without notice. Your failure to abide by the modified terms can (and likely will) result in termination of your access to Dragon6 services. - -Your continued use of the Service consists of: - -1. an acknowledgment of the terms and its modifications -2. and an agreement to abide and be bound by the TOS and its modifications - -### **Modifications To Service** -We reserve the right to modify or discontinue the Service with or without notice to you. DragonFruit Network shall not be liable to you or any third party should we exercise its right to modify or discontinue the Service. - -### **Warranty Disclaimer** -THE USER EXPRESSLY AGREES THAT USE OF THE SERVICE IS AT THEIR SOLE RISK. THE SERVICE IS PROVIDED ON AN "AS IS" AND "AS AVAILABLE" BASIS. YOU UNDERSTAND AND EXPRESSLY AGREE THAT USE OF Dragon6 SERVICES ARE AT YOUR SOLE RISK, THAT ANY MATERIAL AND/OR DATA DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF Dragon6 SERVICES IS AT YOUR OWN DISCRETION AND RISK AND THAT YOU WILL BE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR LOSS OF DATA THAT RESULTS FROM THE DOWNLOAD OF SUCH MATERIAL AND/OR DATA. EXCEPT AS EXPRESSLY SET FORTH ON OUR SITES, Dragon6 DISCLAIMS ALL WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT OR TITLE AND IT MAKES NO WARRANTY OR REPRESENTATION REGARDING THE RESULTS THAT MAY BE OBTAINED FROM THE USE OF Dragon6 SERVICES, REGARDING THE ACCURACY OR RELIABILITY OF ANY INFORMATION OBTAINED THROUGH Dragon6 SERVICES, REGARDING ANY GOODS OR SERVICES PURCHASED OR OBTAINED THROUGH Dragon6 SERVICES, REGARDING ANY TRANSACTIONS ENTERED INTO THROUGH Dragon6 SERVICES OR THAT Dragon6 SERVICES WILL MEET ANY USER'S REQUIREMENTS, BE UNINTERRUPTED, TIMELY, SECURE OR ERROR FREE. The links to third party sites on this web site are for your convenience only, and the inclusion of such links within this web site does not imply any endorsement, guarantee, warranty or representation by Dragon6. Dragon6 user agrees that Dragon6 is hereby absolved from any and all liabilities, losses, costs and claims, including attorney's fees asserted against Dragon6, its agents, officers, employees, or associates, that may arise or result from any service provided, performed, be agreed to be performed by Dragon6. Dragon6 MAKES NO WARRANTY THAT THE SERVICE WILL MEET YOUR REQUIREMENTS, OR THAT THE SERVICE WILL BE UNINTERRUPTED, TIMELY, SECURE, OR ERROR FREE; NOR DOES Dragon6 MAKE ANY WARRANTY AS TO THE RESULTS THAT MAY BE OBTAINED FROM THE USE OF THE SERVICE OR AS TO THE ACCURACY OR RELIABILITY OF ANY INFORMATION OBTAINED THROUGH THE SERVICE OR THAT DEFECTS IN THE SOFTWARE WILL BE CORRECTED. - -### **Limitation of Liability** -IN NO EVENT SHALL Dragon6, ITS OFFICERS, DIRECTORS, EMPLOYEES, OR AGENTS, BE LIABLE TO YOU FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES WHATSOEVER RESULTING FROM ANY (I) ERRORS, MISTAKES, OR INACCURACIES OF CONTENT, (II) PERSONAL INJURY OR PROPERTY DAMAGE, OF ANY NATURE WHATSOEVER, RESULTING FROM YOUR ACCESS TO AND USE OF OUR WEBSITE, (III) ANY UNAUTHORIZED ACCESS TO OR USE OF OUR SECURE SERVERS AND/OR ANY AND ALL PERSONAL INFORMATION AND/OR FINANCIAL INFORMATION STORED THEREIN, (IV) ANY INTERRUPTION OR CESSATION OF TRANSMISSION TO OR FROM OUR WEBSITE, (V) ANY BUGS, VIRUSES, TROJAN HORSES, OR THE LIKE, WHICH MAY BE TRANSMITTED TO OR THROUGH OUR WEBSITE BY ANY THIRD PARTY, AND/OR (VI) ANY ERRORS OR OMISSIONS IN ANY CONTENT OR FOR ANY LOSS OR DAMAGE OF ANY KIND INCURRED AS A RESULT OF YOUR USE OF ANY CONTENT POSTED, EMAILED, TRANSMITTED, OR OTHERWISE MADE AVAILABLE VIA THE Dragon6 WEBSITE, WHETHER BASED ON WARRANTY, CONTRACT, TORT, OR ANY OTHER LEGAL THEORY, AND WHETHER OR NOT THE COMPANY IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. WHILE THE FOREGOING LIMITATION OF LIABILITY SHALL APPLY TO THE FULLEST EXTENT PERMITTED BY LAW IN THE APPLICABLE JURISDICTION, WHERE CONDITIONS, WARRANTIES OR OTHER RIGHTS ARE IMPLIED IN THIS AGREEMENT OR OTHERWISE CONFERRED BY LAW, AND IT IS NOT LAWFUL OR POSSIBLE TO EXCLUDE THEM, THEN THOSE CONDITIONS, WARRANTIES OR OTHER RIGHTS WILL (BUT ONLY TO THE EXTENT REQUIRED BY LAW) APPLY TO THIS AGREEMENT. AT THE OPTION OF Dragon6, OUR LIABILITY FOR BREACH OF IMPLIED CONDITIONS OR WARRANTIES IS LIMITED, TO THE EXTENT PERMITTED BY LAW TO, IF THE BREACH RELATES TO GOODS, (I) THE REPLACEMENT OF THE GOODS OR THE SUPPLY OF EQUIVALENT GOODS, (II) THE REPAIR OF THE GOODS, (III) THE PAYMENT OF THE COST OF REPLACING THE GOODS OR OF ACQUIRING EQUIVALENT GOODS, OR (IV) THE PAYMENT OF HAVING THE GOODS REPAIRED AND, IF THE BREACH RELATES TO SERVICES, (I) THE SUPPLY OF THE SERVICES AGAIN; OR (II) THE PAYMENT OF THE COST OF HAVING THE SERVICES SUPPLIED AGAIN. YOU SPECIFICALLY ACKNOWLEDGE THAT Dragon6 SHALL NOT BE LIABLE FOR USER SUBMISSIONS OR THE DEFAMATORY, OFFENSIVE, OR ILLEGAL CONDUCT OF ANY THIRD PARTY AND THAT THE RISK OF HARM OR DAMAGE FROM THE FOREGOING RESTS ENTIRELY WITH YOU. The Website is controlled and offered by Dragon6 from its facilities in the European Union (EU). Dragon6 makes no representations that the Dragon6 Website is appropriate or available for use in other locations. Those who access or use the Dragon6 Website from other jurisdictions do so at their own volition and are responsible for compliance with local law. - -### **Indemnity** -You agree to defend, indemnify and hold harmless Dragon6, its parent corporation, officers, directors, employees and agents, from and against any and all claims, damages, obligations, losses, liabilities, costs or debt, and expenses (including but not limited to attorney's fees) arising from: (i) your use of and access to the Dragon6 Website; (ii) your violation of any term of these Terms of Service; (iii) your violation of any third party right, including without limitation any copyright, property, or privacy right; or (iv) any claim that one of your User Submissions caused damage to a third party. This defense and indemnification obligation will survive these Terms of Service and your use of the Dragon6 Website. - -### **Your use of content on the site** -You understand that when using the Dragon6, you will be exposed to User Submissions from a variety of sources, and that Dragon6 is not responsible for the accuracy, usefulness, safety, or intellectual property rights of or relating to such User Submissions. You further understand and acknowledge that you may be exposed to User Submissions that are inaccurate, offensive, indecent, or objectionable, and you agree to waive, and hereby do waive, any legal or equitable rights or remedies you have or may have against Dragon6 with respect thereto, and agree to indemnify and hold Dragon6, its Owners/Operators, affiliates, and/or licensors, harmless to the fullest extent allowed by law regarding all matters related to your use of the site. - -### **User Submission and Content Removal Policy** -You shall be solely responsible for your own User Submissions and the consequences of posting or publishing them. In connection with User Submissions, you affirm, represent, and/or warrant that: you own or have the necessary licenses, rights, consents, and permissions to use and authorize Dragon6 to use all patent, trademark, trade secret, copyright or other proprietary rights in and to any and all User Submissions to enable inclusion and use of the User Submissions in the manner contemplated by the Website and these Terms of Service. In connection with User Submissions, you further agree that you will not submit material that is copyrighted, protected by trade secret or otherwise subject to third party proprietary rights, including privacy and publicity rights, unless you are the owner of such rights or have permission from their rightful owner to post the material and to grant Dragon6 all of the license rights granted herein. Dragon6 does not endorse any User Submission or any opinion, recommendation, or advice expressed therein, and Dragon6 expressly disclaims any and all liability in connection with User Submissions. Dragon6 does not permit copyright infringing activities and infringement of intellectual property rights on its Website, and Dragon6 will remove all Content and User Submissions if properly notified that such Content or User Submission infringes on another's intellectual property rights. Dragon6 reserves the right to remove Content and User Submissions without prior notice and restrict the use of submission features. \ No newline at end of file diff --git a/wiki/dragon6/verification/en.md b/wiki/dragon6/verification/en.md deleted file mode 100644 index b56d78d..0000000 --- a/wiki/dragon6/verification/en.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -tags: - - verification - - users ---- - -# Dragon6 User Verification -Dragon6 operates a verification system to recognise supporters and contributors to the ecosystem. "Verified" accounts come in one of six types: - -| Role | Description | -|-------------|--------------------------------------------------------------------------| -| Beta | Users who are/have participated in a beta test | -| Translators | Users who have contributed to localisation efforts on Crowdin | -| Verified | Users who have been verified by the Dragon6 team members | -| Supporter | Users who have donated financially to the project | -| Contributor | Users who have contributed to the Dragon6 backend | -| Developer | The Admins responsible for manging user verifications and service health | - -Other statuses include: - -- Blocked - the user's account information cannot be viewed due to either a GDPR request or a user ban -- Normal - the user has not been verified on Dragon6 - -### Requesting verification - -Translators and contributors to the Dragon6 projects can apply to recieve the respective role. Users should join the [DragonFruit Discord](https://dragonfruit.network/a/discord) Server and request verification in the `#apps` channel. \ No newline at end of file diff --git a/wiki/dragon6/web/en.md b/wiki/dragon6/web/en.md deleted file mode 100644 index 3a0b5c2..0000000 --- a/wiki/dragon6/web/en.md +++ /dev/null @@ -1,13 +0,0 @@ -# Dragon6 Web - -The Dragon6 Website acts as the core component for Dragon6 clients and services, including API, token management, Discord bot and verification services. - -![](/wiki/dragon6/web/img/dragon6-web.png "Dragon6 Website frontpage") - -While the website displays some stats, it can be seen as 'lightweight' compared to the [desktop](/wiki/dragon6/desktop) and mobile clients. - -## History - -Released in early 2018, the Dragon6 website was originally written in ASP.NET Framework with no Discord bot or API. It has since been rewritten to run on .NET, using DSharpPlus to provide the Discord bot and DragonFruit.Six.Api to manage connections to the Ubisoft services. - -Login support was added in June 2019, where users were able to login to set cover photos (verified accounts only) and link Discord accounts (after February 2020). diff --git a/wiki/dragon6/web/img/dragon6-web.png b/wiki/dragon6/web/img/dragon6-web.png deleted file mode 100644 index d08993a..0000000 Binary files a/wiki/dragon6/web/img/dragon6-web.png and /dev/null differ diff --git a/wiki/en.md b/wiki/en.md index 8e46b1a..5afb633 100644 --- a/wiki/en.md +++ b/wiki/en.md @@ -1,4 +1,4 @@ -Welcome to the DragonFruit wiki, the open-source knowledgebase for DragonFruit products and services +Welcome to the DragonFruit Wiki, the knowledgebase for DragonFruit products and services. > We're currently in the process of documenting products, so some may be incomplete or not exist yet. @@ -18,23 +18,19 @@ Welcome to the DragonFruit wiki, the open-source knowledgebase for DragonFruit p -

Dragon6

A free to use family of Rainbow Six | Siege stats trackers +

DragonFruit ID

The platform that powers identity management for DragonFruit Services - Products » Web · Desktop · Discord -
- Services » Developers · Verification -
- Legal » Privacy · Terms · News Publishers + Articles » Overview · Privacy -

DragonFruit ID

+

DragonFruit.Data

A lightweight, extensible HTTP/REST framework for .NET - Overview · Privacy + Articles » Overview · Getting Started - \ No newline at end of file + diff --git a/wiki/rest-client/en.md b/wiki/rest-client/en.md new file mode 100644 index 0000000..d87726e --- /dev/null +++ b/wiki/rest-client/en.md @@ -0,0 +1,22 @@ +# DragonFruit REST Client + +[![Latest Nuget](https://img.shields.io/nuget/v/DragonFruit.Data?label=DragonFruit.Data&logo=nuget)](https://nuget.org/packages/DragonFruit.Data) +[![Latest Nuget](https://img.shields.io/nuget/v/DragonFruit.Data.Roslyn?label=DragonFruit.Data&logo=nuget)](https://nuget.org/packages/DragonFruit.Data.Roslyn) + +### Overview + +DragonFruit.Data is a HTTP REST client for .NET that is designed to be easy to use and acts as the main web communication system for many DragonFruit products, including internal tools. + +The design of the system is focused on three main components: + +- **Requests** modeled from a REST/HTTP service, defining queries, forms, bodies and headers to be sent +- **Clients** that are responsible for taking requests and sending them to their destination +- **Serializers** that transfer objects between the client and server + +Additionally, the optional source generator can be used to improve runtime performance by pre-generating the request building logic at compile time instead of using reflection at run-time. + +### Table of Contents + +| Page | Description | +|---------------------------------------------------------------------|--------------------------------------------------------------------------| +| [Getting Started](/wiki/rest-client/getting-started ) | A quick guide for getting started | diff --git a/wiki/rest-client/getting-started/en.md b/wiki/rest-client/getting-started/en.md new file mode 100644 index 0000000..fa616b3 --- /dev/null +++ b/wiki/rest-client/getting-started/en.md @@ -0,0 +1,96 @@ +# Getting Started +In this guide, we will be creating a basic command-line program that can make a simple GET request to a remote server, and deserialize the response. + +This assumes an empty command-line project targeting .NET 6 or newer. + +### Installation +The two packages [`DragonFruit.Data`](https://nuget.org/packages/DragonFruit.Data) and (optionally) [`DragonFruit.Data.Roslyn`](https://nuget.org/packages/DragonFruit.Data.Roslyn) can be installed from NuGet via `` tags in a `csproj` file or through your preferred GUI. + +### Create a Client +An `ApiClient` needs to be created somewhere visible to everything that will access it, for example as a static property (or Singleton instance if using a dependency-injection framework) + +The represents the default serializer used for classes that don't have a specific serializer chosen for them. There are two default serializers that are provided by default: `ApiJsonSerializer` +and `ApiXmlSerializer`. + +In the example `Program.cs` file below an internally accessable client is created `Program.Client`: + +```cs +using System.Threading.Tasks; +using DragonFruit.Data; +using DragonFruit.Data.Serializers; + +namespace DataExample; + +public class Program +{ + internal static ApiClient Client = new ApiClient + { + UserAgent = "DataExample" + }; + + public static async Task Main(string[] args) + { + // main app logic goes here... + } +} +``` + +### Create a request +Next we need model a request to send. + +In this example, we want to contact the Steam API for news about a specific game. We can create a class inheriting from `ApiRequest` with the parameters (the game id, number of items, etc.) defined as properties: + +```cs +using DragonFruit.Data; +using DragonFruit.Data.Requests; + +namespace DataExample; + +public partial class SteamNewsRequest : ApiRequest +{ + public override string RequestPath => "https://api.steampowered.com/ISteamNews/GetNewsForApp/v0002"; + + public SteamNewsRequest(int appId) + { + AppId = appId; + } + + [RequestParameter(ParameterType.Query, "appid")] + public int AppId { get; set; } + + [RequestParameter(ParameterType.Query, "count")] + public int? Count { get; set; } + + [RequestParameter(ParameterType.Query, "maxlength")] + public int? MaxLength { get; set; } + + [RequestParameter(ParameterType.Query, "format")] + protected string Format => "json"; +} +``` + +In this example, a `SteamNewsRequest` requires an `AppId`, but `Count` and `MaxLength` are optional. If they are not set (`null`) they will not be included in the request. + +The class is marked as `partial` to allow the source generator to pre-compute the procedure needed to take the request and build it for the client to send. + +### Perform the request and get the output +After the client has been created and a request has been defined, we can make the request. Updating the `Main` method from `Program.cs`, we can now get some data back: + +```cs +public static async Task Main(string[] args) +{ + var tf2NewsRequest = new SteamNewsRequest(440); + var tf2News = await Client.PerformAsync(tf2NewsRequest); + + // in this example we didn't define a set of classes to model the response, you can replace JsonObject with the response class type to deserialize directly. + var latestArticleTitle = tf2News["appnews"]["newsitems"][0]["title"].GetValue(); +} +``` + +### Conclusion +This is only a very basic demonstration of what the library can do. Refer to the additional documents to see more features of the library including: + +- Sending other types of requests with complex data +- Downloading files with modification date checks +- Customising the client +- Creating custom serializers