Git Product home page Git Product logo

leagueapi's Introduction

LeagueAPI - Documentation

Build Status CocoaPods Compatible Carthage Compatible Platform MIT Licensed

League API is a League of Legends Framework in Swift. It provides an easy way to get League's data into your iOS, WatchOS, TvOS and MacOS & Linux application.

It is designed to be easy to use, taking advantage of Swift enums. It also comes with some internal mechanisms, to handle any API key rate limit.

Support League of Legends, Clash, Teamfight Tactics and League of Runnetera APIs

🚧 Installation 🚧

CocoaPods

  • Go in your project, in the folder where is located YourProject.xcodeproj.
  • Run pod init.
  • Open Podfile for editing (do not use Textedit as it will insert invalid characters).
  • Right under "use_frameworks!", write pod 'LeagueAPI'.
  • Run pod install.
  • A YourProject.xcworkspace was created. From now, you should open this file instead of YourProject.xcodeproj.
  • If you can write import LeagueAPI in your project without compiler error, you're done. Great job! If it is not the case, you can open an issue so that I can look at your problem.

Carthage

  • Go in your project, in the folder where is located YourProject.xcodeproj.
  • Create a file named Cartfile and write github "Kelmatou/LeagueAPI" in it.
  • Run carthage bootstrap --platform iOS --use-xcframeworks in Terminal (for Xcode < 12, you don't necessarily need to add --use-xcframeworks).
  • Open YourProject.xcodeproj and go to target General settings.
  • Add LeagueAPI.framework in Embedded Binaries (located at Carthage/Build/LeagueAPI.xcframework).
  • If you can write import LeagueAPI in your project without compiler error, you're done. Great job! If it is not the case, read the troubleshooting section below.

Manual

  • Download a Release version here (or Github content but you may get a version with experimental changes).
  • Open LeagueAPI/LeagueAPI.xcodeproj.
  • Select LeagueAPI-Release scheme and build it (play button or cmd+b) for your desired platform (Simulator or iOS Generic Device).
  • In the Project Navigator, you'll find a folder Products with LeagueAPI.framework. Drag and drop it in your project general settings -> Embedded Binaries.
  • If you can write import LeagueAPI in your project without compiler error, you're done. Great job! If you encounter a problem on this step, check if you selected the same platform as LeagueAPI.framework in you project's destination target (Simulator or iOS device). If it does not solve your problem, read the troubleshooting section below.

Troubleshooting

This section lists the main solutions to be able to import LeagueAPI in your project.

  • Go back to your project, target settings -> Build Settings -> Framework Search Paths, then add the path to LeagueAPI.framework.

If none of these helped you, open an issue describing your problem and I'll try to check it out as soon as possible.

πŸ“‹ Requirements πŸ“‹

πŸ“¦ Minimum versions πŸ“¦

πŸ“± iOS 9.0
⌚ WatchOS 2.0
πŸ“Ί TvOS 9.0
πŸ’» MacOS 10.9 (Mavericks)

πŸ”‘ Riot API Key πŸ”‘

To use LeagueAPI, you'll require a Riot API Key. You'll get one by visiting https://developer.riotgames.com. Create an account and on you dashboard, you'll be able to generate your key. By default, Riot will generate a 'Development Key', which expires in 24h. When your application is ready to be deployed and respects Riot API usage conditions, you can apply for a 'Production Key'. Please note that you should agree with Riot API usage policy

😈 First Blood 😈

Starting using this framework requires you to create an instance of LeagueAPI by writing:

let league = LeagueAPI(APIToken: "*INSERT YOUR KEY HERE*")

Now use this instance everywhere, you shouldn't recreate the LeagueAPI variable.

🧐 And then? 🧐

LeagueAPI is divided in 4 different APIs:

  • Riot API
  • League of Legends API
  • Team Fight Tactics API
  • Legends of Runnetera API

Riot API

Riot API returns information about Riot Games accounts for each player.
It is accessible from league.riotAPI. From there you'll access the methods for:

League of Legends API

League of Legends API contains methods related to League of Legends game.
It is accessible through league.lolAPI. From there you'll get information about:

League of Legends

Clash

Teamfight Tactics

Teamfight Tactics API contains methods related to Teamfight Tactics game.
It is accessible through league.tftAPI. From there you'll find information for:

Legends of Runnetera

Legends of Runnetera API contains methods related to Leagueof Runnetera game.
It is accessible through league.lorAPI. From there you'll get information about:

Full documentation is available here.
Note that only the last release will appear in the documentation. See previous revisions for older LeagueAPI versions.

Make LeagueAPI Grow Up!

If anything you wanted was missing, do not hesitate to open an issue or create a pull request. It could help future developers. If you found LeagueAPI helpful or cool to use don't hesitate to promote it by adding a ⭐️ πŸ˜‰

Contributors

Antoine Clop (Kelmatou)
Ronan Cendrier (Hanoki)
Ammon Parry (AmmonP)
Sandi Karajic (SKarajic)

leagueapi's People

Contributors

ammonp avatar hanoki avatar kelmatou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

leagueapi's Issues

Adding support to v4 Endpoints

Riot Games recently announced v4 endpoints changes.

Therefore, v3 Endpoints is now deprecated and will be removed on 28th January 2019.

LeagueAPI will update before the end of the month to deliver implementation of new API routes.

No LICENSE

This library doesn't have a LICENSE associated with it and it should if you want other people to be able to use it.

LoR Support

Riot API has a new route for League of Runnetera Ranked

LeagueAPI will bring support to this endpoint in 2.4.0

getRankedTier isn't working

The function to get the Tier images isn't working anymore.
I tried the example from the wiki but only get the error wich tells me to create an issue

Clash Support

Riot API has a new route for Clash
Support to this API will be in version 2.4.0

[TFT] Add traits

LeagueAPI will add method for TFT traits of champions and combo.

It should be part of LeagueAPI v2.5.0, but not prioritized for now.
If you need them, just πŸ‘this issue :)

[TFT] Adding Support for new routes

Riot published new routes for TFT mode that provide data for:

  • Summoner
  • Ranked/League
  • Match History

LeagueAPI 2.3.0 brings support for these routes. Documentation is on its way
Note that TFT is still "Beta" and there are some bigs changes at every patch

[8.18] Constants to add

As Patch 8.18 arrived, new game constants will be added.

Game Mode

  • Odyssey: Extraction games

Map

  • Crash Site

Queue Mode

  • Odyssey: Extraction Intro
  • Odyssey: Extraction Cadet
  • Odyssey: Extraction Crewmember
  • Odyssey: Extraction Captain
  • Odyssey: Extraction Onslaught

Installation failed

Hello,

I would like to code an app with some friends. We are not really used to swift code, that would be more like an introduction for us. We are facing an installation issue. By following the instruction, carthage bootstrap --platform iOS gives us an error (see sc), so we used carthage update --use-xcframeworks, but still doesn't work. The terminal installation doesn't finish succesfully.

We have the error "Could not find module 'LeagueAPI' for target 'x86_64-apple-ios-simulator'; found: arm64, armv7-apple-ios, arm64-apple-ios, arm, armv7" in xCode and we can't figure where it comes from.

We may miss something obvious here but we are struggling to find a solution for a week now. We'll highly appreciate any help please.

Have a good day.

Capture d’écran 2021-02-26 aΜ€ 11 26 11

Capture d’écran 2021-02-26 aΜ€ 11 26 40

[9.14] Team Fight Tactic support

New Place/Map:

  • Convergence

New Queue modes:

  • Teamfight Tactics
  • Ranked Teamfight Tactics

New Game mode:

  • Teamfight Tactics

Will be included in LeagueAPI 2.1.0

[LOR] Add method for static assets

Static assets of League of Runnetera (cards for example) are store on a static file server.

LeagueAPI will add new methods to access those ressources in v2.5.0 v3.1.0

From QueueMode.QueueModes to String

Hello,

First of all thank you very much for this project.
I want to display the QueueMode into a Label, but i did not find out how to maybe force cast the QueueMode.QueueModes variable...

Maybe i'm not doing something great ?

Thanks and have a nice day :)

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.