All Projects → gionoa → Formula1API

gionoa / Formula1API

Licence: MIT license
Swift Package for accessing Formula 1 data from the Ergast API

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Formula1API

F1-Web-Viewer
A simple grid-based web viewer for Formula 1
Stars: ✭ 78 (+310.53%)
Mutual labels:  formula1, f1
flask-react-d3-celery
A full-stack dockerized web application to visualize Formula 1 race statistics from 2016 to present, with a Python Flask server and a React front-end with d3.js as data visualization tool.
Stars: ✭ 20 (+5.26%)
Mutual labels:  formula1, ergast-api
client
Job listings from all the Formula 1 teams on the grid
Stars: ✭ 27 (+42.11%)
Mutual labels:  formula1
formula1-telemetry-kafka
No description or website provided.
Stars: ✭ 99 (+421.05%)
Mutual labels:  formula1
formula-one-ergast
Java implementation to get a historical record of motor racing data from Ergast Developer API
Stars: ✭ 18 (-5.26%)
Mutual labels:  formula1
F1-AppleTV
F1TV app for the Apple TV
Stars: ✭ 16 (-15.79%)
Mutual labels:  formula1
f1
Second edition of F1 Calendar 🏎📅
Stars: ✭ 155 (+715.79%)
Mutual labels:  formula1
dut-iptv
Github repo containing Kodi addons for CanalDigitaal IPTV, F1 TV, KPN/Telfort/XS4All iTV, NLZiet, Telenet, T-Mobile TV, Videoland and Ziggo Go
Stars: ✭ 26 (+36.84%)
Mutual labels:  f1
updater
Update mechanism of f1jobs.co
Stars: ✭ 20 (+5.26%)
Mutual labels:  formula1
f1-telemetry-client
A Node UDP client and telemetry parser for Codemaster's Formula 1 series of games
Stars: ✭ 128 (+573.68%)
Mutual labels:  formula1

Formula 1 API

This Swift library provides endpoint access to Formula 1 data provided by the Ergast API. By using this library, you won't have to build the interactive layer yourself, and can just start consuming the data.

Installing / Getting started

Formula 1 API supports Swift Package Manager. To use SwiftPM, you should use Xcode 11 to open your project.

Click File -> Swift Packages -> Add Package Dependency, enter Formula1API repo's URL. Or you can login Xcode with your GitHub account and just type Formula1API to search.

After select the package, you can choose the dependency type (tagged version, branch or commit). As of now, since there's no 1.0.0 release yet, choose master branch.

Initial Configuration

No configuration needed!

Deploying / Publishing

You can't run this library in your own server since it interacts with the live network. If you're interested in running your own server to fetch F1 data, check out this repository.

Features

Formula1API provides functions that allow you to access endpoints for data.

Currently, you can fetch:

  • Circuits (all, specified season)
  • Seasons
  • Constructors (all, specified season)
  • Race Schedule (specified season)
  • Race Results (specified season)
  • Qualifying Results (specified season),
  • Pit Stops (specified season),
  • Laps(specified season)

More endpoints will be accessible as development progresses.

Usage

Usage of this library within your app or package is simple.

Access endpoints by the Formula1API object.

Example:

Formula1API.allConstructors(for: .year(2020)) { result in
    switch result {
        case .success(let constructors):
            print(schedule)
        case .failure(let error):
            print(error)
    }
}

Formula1API.constructors { result in
    switch result {
        case .success(let constructors):
            print(schedule)
        case .failure(let error):
            print(error)
    }
}

Licensing

The code in this project is licensed under MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].