Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.
/ WFA-SDK Public archive

SDK for getting API data provided by WFA

Notifications You must be signed in to change notification settings

Richasy/WFA-SDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warframe Alerting Prime - C# SDK

WFA SDK out of maintenance

Introduce about Warframe Alerting Prime

Warframe Alerting Prime (hereinafter referred to as WFA) is an application developed by 云之幻(Richasy) to display Warframe game information. It has now integrated many services such as Warframe Market and WFA Riven Market.

UWP application download: Microsoft Store

Install SDK

SDK name Richasy.Wfa.Sdk
Target Platform .Net Standard 2.0
Build tools Visual Studio 2019

Nuget: Download

The source code is also open now, and you can adapt it according to the needs of your platform.

How to use

Authorization

To use this SDK, you need to apply for qualification certification, please refer to this document for specific application methods.

Start

After installing the SDK and applying for CliendId and ClientSecret, you can use the SDK as follows:

- Create Client

Client contains all the methods you can use, you need to create it before using it.

There are two ways to create:

  1. Pass in your ClientId, ClientSecret, requested Permission, and target game platform.
Client client = new Client(clientId, clientSecret, permissions, PlatformType.PC);

This creation method is suitable for the first use of the SDK. After the creation is completed, the client.InitAsync() method is called, and a token will be applied to the WFA server. After execution, you need to save the value of client.Token and use The second way to create (this will increase your loading speed)

  1. Pass in the tokens and target game platforms that have been obtained before
Client client = new Client(token, PlatformType.PC);

The validity period of the token is two weeks. Within these two weeks, you can call this method to create the Client class.

- Initializing client

await client.InitAsync();

In the previous step, you created the client, but it cannot be used immediately. You need to initialize. This initialization is reflected in two aspects:

  • The Client created by ClientId needs to send a request to the server to get the authorization token.
  • A Client created by Token needs to send a simple request to verify the validity of the token (if you confirm that Token is valid, you can skip this step).

- Add exception handler

client.OnException += Client_OnException;

This error handling is a global error handling, that is, this event will be triggered no matter which module you have network request error. But if it is an internal data processing error, an exception will be thrown.

Get information

For a description of all information modules, see this document.

Just call the method

Examples:

- Get total information

string total = await client.GetAllGameInfoAsync();

The obtained information contains all the modules of the game data and will be transmitted as a json string.

- Get part information

Taking Cetus day and night information as an example, there are usually two ways to obtain segment information:

  1. Request the server to obtain data
CetusStatus cetus = await client.GetCetusStatusAsync();
  1. Parse all the game information strings obtained before
CetusStatus cetus = cleint.GetCetusStatus(total);

Permission

For accounts that apply for WFA access, the following permissions are available:

  • wfa.basic : Involving game information and WM information
  • wfa.riven.query : Involving in WFA Riven Market
  • wfa.user.read : Involving WFA user information reading
  • wfa.lib.query : Involves reading database entries

Welcome to my developer blog: Richasy's Blog.

You can find all WFA APIs information here: WFA API Introduce.

You can find all dicts here: WFA Dictionary.

About

SDK for getting API data provided by WFA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages