Latest 2.0.0
Homepage https://github.com/Kelmatou/LeagueAPI
License MIT
Platforms ios 8.0, osx 10.9, watchos 2.0, tvos 9.0
Authors

Build Status
CocoaPods Compatible
Carthage Compatible
Platform
MIT Licensed

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

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 application.

🚧 Installation 🚧

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 in Terminal.
  • Open YourProject.xcodeproj and go to target General settings.
  • Add LeagueAPI.framework in Embedded Binaries.
  • 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.

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.

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 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 8.1
⌚ 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 has 2 major parts:

  • Riot API’s methods
  • Other custom methods

Riot API

Riot API provides data related to players, that are evolving when you play. LeagueAPI offers a safe (all problems such as key’s rate limit are handled) wrapper on this Riot service. It is accessible from league.riotAPI. From there, you’ll access many informations on:

Custom Methods

Some League of Legends data only change with patches (champions, items…). Those data can be found directly without creating a LeagueAPI instance league. You’ll be able to get data on:

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 helpfull or cool to use don’t hesitate to promote it by adding a ⭐️ 😉

Authors

Antoine Clop (Kelmatou)
Ronan Cendrier (Hanoki)

Latest podspec

{
    "name": "LeagueAPI",
    "version": "2.0.0",
    "summary": "League of Legends API Framework in Swift",
    "description": "LeagueAPI provides League of Legends data, images related to players, champions, games...nReferences in Riot Public Library: https://discussion.developer.riotgames.com/articles/61/public-libraries-for-the-riot-games-api.html",
    "homepage": "https://github.com/Kelmatou/LeagueAPI",
    "screenshots": [
        "https://raw.githubusercontent.com/kelmatou/LeagueAPI/master/screenshots/homepage.png",
        "https://raw.githubusercontent.com/kelmatou/LeagueAPI/master/screenshots/live_game.gif",
        "https://raw.githubusercontent.com/kelmatou/LeagueAPI/master/screenshots/history.gif",
        "https://raw.githubusercontent.com/kelmatou/LeagueAPI/master/screenshots/champion_info.png"
    ],
    "documentation_url": "https://github.com/Kelmatou/LeagueAPI/wiki",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Antoine CLOP": "[email protected]"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.9",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/Kelmatou/LeagueAPI.git",
        "tag": "2.0.0"
    },
    "source_files": "LeagueAPI/**/*.swift",
    "swift_version": "5.0"
}

Pin It on Pinterest

Share This