Coder Social home page Coder Social logo

leagueofapi's Introduction

A library to facilitate access to the Riot API.

Build codecov

Usage

import 'package:league_of_api/api/consts/region_routing_values.dart';
import 'package:league_of_api/api/models/riot_id.dart';
import 'package:league_of_api/api/models/tag_line.dart';
import 'package:league_of_api/league_of_api.dart';

void main() async {
  final leagueApi = LeagueOfApi('your_api_key');
  var account = await leagueApi.accountV1Service.getAccountByRiotId(
    RegionRoutingValue.AMERICAS,
    RiotId('Driky', TagLine('5441')),
  );
  print(account);
}

Riot API key

Get your key here

Contribution

I appreciate any contributions to this package. Any not yet implemented endpoints can be added similarly to the other implementations. Feel free to reach out to me to ask any questions.

Model code generation

The DTOs fromJson and toJson methods are generated with json_serializable.

Every time a model class annotated with @JsonSerializable is modified, you need to run the following command:

pub run build_runner build --delete-conflicting-outputs

Note: You can remove the --delete-conflicting-outputs if you are the last person who ran this command (faster execution by using a local cache)

Note 2: The plugin AutoJson for Android Studio/IntelliJ provides a handy shortcut for that command.

leagueofapi's People

Watchers

 avatar  avatar

leagueofapi's Issues

Exception Forbidden

I'm trying to use the package but when I run the test code it throws me an error that I can't understand why.

I thought it would be because of the internet permissions, but since it is a desktop application, the permissions are already given automatically, I have also verified it by simply putting an Image.network() and it worked fine.
I don't know what it could be, here I leave a capture with the error.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.