ArunPrakashG / valorant_client

Unofficial valorant client to interact with riot's valorant game api.
MIT License
6 stars 2 forks source link
dart flutter hacktoberfest hacktoberfest2021 valorant valorant-api

ValorantClient

[pub.dev](https://pub.dev/packages/valorant_client) ![Dart](https://img.shields.io/badge/dart-%230175C2.svg?style=for-the-badge&logo=dart&logoColor=white) ![Flutter](https://img.shields.io/badge/Flutter-%2302569B.svg?style=for-the-badge&logo=Flutter&logoColor=white) [![likes](https://badges.bar/valorant_client/likes)](https://pub.dev/packages/valorant_client/score) [![popularity](https://badges.bar/valorant_client/popularity)](https://pub.dev/packages/valorant_client/score) [![pub points](https://badges.bar/valorant_client/pub%20points)](https://pub.dev/packages/valorant_client/score) **valorant_client** is a library to interact with VALORANT Game API's to fetch user specific data such as matches played, user info, store info etc.

Usage

dependencies:
  valorant_client: ^1.1.3
import 'package:valorant_client/valorant_client.dart';
ValorantClient client = ValorantClient(
    UserDetails(userName: {'your_username'}, password: {'your_password'}, region: {your_region}),
    callback: Callback(
      onError: (String error) {
        print(error);
      },
      onRequestError: (DioError error) {
        print(error.message);
      },
    ),
  );

NOTE: Passing the callback here is optional. However, to know if your request failed internally due to wrong status code etc, you will require the callback.

await client.init(true);

NOTE: This is an async function, it authorizes this client to valorant API's. without calling this, you will not get results from the api.

final currentPlayer = await client.playerInterface.getPlayer();

Features Implemented

Buy Me A Coffee