Coder Social home page Coder Social logo

arkplanner's Introduction

arkplanner-api

Hosted instances available at https://ark.kyou.dev/plan and https://ak.kyou.dev/plan. Will probably not make a frontend for this. Scroll down to API for example usage.

arkplanner-api is an API focused fork of ycremar's ArkPlanner with an added emphasis on catering to non-Chinese servers.

ArkPlanner is a tiny python program for the mobile game Arknights. The variety of items dropping at different stages and complicated crafting system makes it difficult to create the most efficient plan to obtain items. ArkPlanner helps you to make the optimal plan for any given combinations of the required item based on open-sourced stats data, items crafting formulas, and linear programming algorithms.

API

The only endpoint available is the /plan endpoint.

{
    // The only required field, 'required' must have a length > 1.
    // Keys may be either one of a properly formed item name in EN/CN/JP/KR,
    // case sensitive, or an item's ID. The type of key must be consistent.
    "required": "{ string: integer } !required",
    // Items already owned by the user, key parsing is the same as used in 'required'
    // default: {}
    "owned": "{ string: integer }",
    // Output language, will match language used in required if not specified.
    // default: "en"
    "out_lang": "string",
    // Consider crafting byproducts
    // default: false
    "extra_outc": "bool",
    // Compatibility mode for non Chinese servers (EN/JP/KR) to only consider
    // content that is available to them.
    // default: false
    "non_cn_compat": "bool",
    // A list of stage codes to ignore.
    // default: []
    "exclude": "list[string]",
    // default: false
    "exp_demand": "bool",
    // default: true
    "gold_demand": "bool",
}

Curl example:

curl -XPOST 'https://ark.kyou.dev/plan' \
--header 'Content-Type: application/json' \
--data-raw '{
    "out_lang": "en",
    "non_cn_compat": true,
    "required": {
        "Polymerization Preparation": 192,
        "Bipolar Nanoflake": 218,
        "D32 Steel": 184,
        "Orriock Concentration": 275,
        "Sugar Lump": 250,
        "Polyester Lump": 237,
        "Oriron Block": 190,
        "Keton Colloid": 203,
        "Optimized Device": 160,
        "White Horse Kohl": 270,
        "Manganese Trihydrate": 224,
        "Grindstone Pentahydrate": 265,
        "RMA70-24": 213
    },
    "owned": {},
    "extra_outc": false,
    "exp_demand": false,
    "gold_demand": true
}'

Deployment

Deployable on Heroku, albeit rather slow (see https://ak.kyou.dev/plan). TODO: Heroku deploy instructions.

鸣谢 - Acknowledgement

数据来源:

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.