Code Monkey home page Code Monkey logo

irleagueapicore's People

Contributors

sschulze1989 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

aschadek

irleagueapicore's Issues

Feature: Add the number of races scored to standings

Description

In order to determine which races a driver did score or not score based on the Point System Filters this information should be added to the standings rows.

Tasks

  • Add columns in database schema
  • Add mapping for columns
  • Calculate values during standing calculations

Feature: Endpoint to load results from iRacing API

Description

Load the results for a single session from the iracing API given the subsession id

Tasks

  • #120
  • Add internal query to iracing API to get the results
  • Add endpoint that accepts a event-id and a iracing-subsession-id to perform and automatic result upload to the specified event

Feature: Automatic penalties

Description

Add option to configure automatic penalties that are applied when one or more conditions are fulfilled

Possible conditions

  • Incidents add penalty points per incident count

Tasks

  • Create data transfer model for automatic penalty configuration
  • Create Entity for automatic penalty configuration
  • Implement handling of configuration through API
  • Calculate AddPenalties from automatic configuration during result calculation

Return league subscription information

Description

Return the information about the current league subscription if the requesting user has either the admin or organizer role:

  • Subscription type (Expired, Trial, Paid, Lifetime)
  • Expiration Date

Tasks

  • Add Required fields to LeagueModel dto
  • Add handling for data
    • Only return these values if user is in Admin or Organizer role

Feature: Treat all `DateTime` objects as UTC in json response

Description

currently all date times stored in the database are treated as UTC already.
However the dateTime column in the database has no information about the offset and so times read from the database are initialized as local and not utc times.
This leads to the times also not being properly serialized in the json response with the trailing Z to mark as UTC time.

Tasks

  • Add conversion on the mapping to treat all DateTime objects as UTC date times.

Add secure way to store and read credentials from hosting environment

Description

In order to be able to authenticate towards the iracing API the credentials need to be safely stored on the server and made accesible to the calling function at runtime.

Ideas

  • Store credentials in the service configuratiion
    • The user can control the environment variables
    • It is possible to load the environment from a root protected file

Feature: Add Admin panel functions to manage payments

Description

Managing of payments and subscriptions will first start off manually and then be enhanced by an automated process later.
In order to manage subscriptions manually the API should be enhanced by admin methods to manage the subscriptions status of leagues.

Tasks

  • Add Endpoint to view all Subscriptions
  • Add Endpoint to filter Subscriptions by league
  • Add Endpoint to get single Payment
  • Add Endpoint to activate a subscription for a league
    • This should automatically set the League subscription state and expired date as well
  • Add Endpoint to deactivate a subscription
    • This should automatically set the League subscription state and expired date as well
  • Add Endpoint to set the subscription state of a league without payment

Additional Info

  • All endpoints should be available in the api documentation but not part of the API client

Feature: Allow combinatorics in Results filters

Description

As of now the Filters for results only work individually but are applied one after another on the same data set.
That is great for simple filtering but does not allow to combine conditios that are exclusive to each other.

Example:
Simple filter with non exclusive condition that works:

  1. Remove with IR > 1000
  2. Remove with IR < 2000
    This returns the drivers with IR range between 1000 - 2000

Exclusive condition that does not work:

  1. Remove with IR < 2000
  2. Keep driver X (with IR > 2000)
    Since driver X has already been removed from the set through filter 1. the keep filter has no effect.
    Subsequently filter 2. will only keep driver X so any remaining driver with IR < 2000 will also be removed
    The result is an empty set

Expected Behaviour

Make the filters dependend on their order an the previous operation

  • removeshould behave as before and filter out any previous entries.
  • keep should keep any entry even if it was removed before.
  • only if keep is the first filter entry it should be as regarded as keep only and remove all entries that are not marked as to keep

Task

  • Adapt filter logic in result calculation
  • Enhance tests for new conditions

Feature: Allow upload of iRacing Team results

Description

Currently the API will throw an Error when trying to upload a result from a team event.
This is because the backend is expecting a driver result row in the top level of the json session results but instead finds a team. The individual driver rows can be found one level deeper.

What needs to be changed?

To enable the upload of team results the backend would need to check if it is a team result and then catch the individual driver rows one level below. Right now there it seems not required to save any data from the team result row directly because all of the information can be later taken from the individual driver rows.
Additionally the Teams need to be assigned from the teamId or name.
If a team does not yet exist it should be newly created.
If a team does exists its driver list should be updated according to the drivers in the result:

  • Add drivers to the team if not already in there
  • Do not remove drivers from the team if they are not in the result.
  • Remove driver from team / assign to different team if driver is part of a different team in the result

Tasks

  • Add check to detect a team result
  • Get driver result rows from driver_results field
  • Add unit tests using a test team result set
  • Add IRacingTeamId field to TeamEntity to identify which team from iracing is already created
  • Check for existing teams and create new / update existing according to drivers in the current result

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.