GithubHelp home page GithubHelp logo

the-hideout / tarkov-api Goto Github PK

View Code? Open in Web Editor NEW
124.0 124.0 14.0 1.21 MB

Community made GraphQL API with real-time data for everything in the Escape from Tarkov game!

Home Page: https://api.tarkov.dev/graphql

License: GNU General Public License v3.0

JavaScript 99.33% Shell 0.67%
api escape-from-tarkov graphql

tarkov-api's People

Contributors

austinhodak avatar dependabot[bot] avatar discoded avatar github-actions[bot] avatar grantbirki avatar gyran avatar kokarn avatar nicolagenesin avatar oskarrisberg avatar razzmatazzz avatar shebuka avatar thaddeus avatar the-hideout-combine-prs[bot] 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  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

tarkov-api's Issues

Incorrect data being returned in taskRequirements

Hello,

I've encountered an issue where the returned data seems to be incorrect. When sending the following query:

query {
  task(id:"60e71ccb5688f6424c7bfec4"){
    id
    name
    minPlayerLevel
    taskRequirements{
      task{
        name
      }
      status
    }
  }
}

I receive this response:

{
  "data": {
    "task": {
      "id": "60e71ccb5688f6424c7bfec4",
      "name": "Trophies",
      "minPlayerLevel": 55,
      "taskRequirements": [
        {
          "task": {
            "name": "The Cleaner"
          },
          "status": [
            "complete"
          ]
        }
      ]
    }
  }
}

However, the "taskRequirements" data is outdated and should not be present. The only requirement for unlocking the task should be having a level of 55 or higher.

This issue was discovered when my friend and I checked the in-game data and found that, despite not having completed the Task 'The Cleaner', the Task 'Trophies' is available to us.

Please look into this issue and update the data accordingly. Thank you.

Feature request: Current game patch endpoint

Feature Description

This is a request to add an endpoint to return the current patch number of the game (i.e. 0.13.5.1.26126) .
A possible source for this is the the Changelog page on the EFT Wiki or from the Tarkov Changes site.

My use case

I'm in the works on creating a site for users to report hideout scav case inputs and returns. I want to be able to track data cross-patches, but be able to filter by certain patch numbers. At this moment, I store the games current minor version (i.e 0.12, 0.13, 0.14), with plans to manually update per patch. It would be preferable to save this value down to the exact patch but it is not feasible to manually record and update this.

I would be open to looking into contributing this endpoint, although I am inexperienced with creating API's in graphql. If someone can guide me to a similar endpoint (if it exists), one which scrapes data from the wiki or tarkov changes, I can give it a shot.

HandbookCategories returns duplicate children.

Each child category is returned exactly 275 times.
This issue is not present on equivalent ItemCategories queries.

I've provided two queries highlighting the issue.

  • handbookCategories(offset:3, limit:1) {name, children{name}}
    Returns 550 children (2 categories * 275)

  • handbookCategories(offset:9, limit:1) {name, children{name}}
    Returns 1100 children (4 categories * 275)

Cannot retrieve ammo.initialSpeed on pre-wipe explosive ammo.

Cannot retrieve initial speed on the following items.

Name: "20/70 Elephant killer slug"
Error: "Int cannot represent non-integer value: 620.13"
Index: 157

Name: "20/70 Flechetta Plus"
Error: "Int cannot represent non-integer value: 618.02"
Index: 158

Cloudflare Worker

Currently running on a cloudflare worker. I don't think any further configuration is needed aside from the KV store.

'5.45x39mm PPBS gs "Igolnik"' Ammo Issue

When queuing for '5.45x39mm PPBS gs "Igolnik"' the API returns error like it doesn't exist.

My query is:
query = """ query {{ items (name: "5.45x39mm PPBS gs "Igolnik"") {{ properties{{ ...ItemProperties }} name types iconLink wikiLink updated sellFor {{ price vendor {{ name }} }} }} }} fragment ItemProperties on ItemPropertiesAmmo {{ tracer tracerColor damage armorDamage fragmentationChance ricochetChance penetrationChance penetrationPower accuracyModifier recoilModifier initialSpeed lightBleedModifier heavyBleedModifier }} """

Inconsistent Server Status

Don't know why this happens, but when running the bot with this request:

`'''
            query {
                status {
                    currentStatuses {
                        name
                        message
                        statusCode
                    }
                }
            }'''`

from Europe it returns General Server Status as well as in detail statuses, such as website, matchmaking etc... but when running this command from the USA this returns just the Genereal Server Status.
Look at this:
image
I run the first command in Europe and the second command from a server in the USA, and this is the difference. It's not a coding error, the problem is the site doesn't return the full dictionary of servers, but just the General one.
This is the difference from the server response from the USA servers:

`{
  "data": {
    "status": {
      "generalStatus": {
        "message": "N/A",
        "statusCode": "Unstable"
      },
      "currentStatuses": [
        {
          "message": "N/A",
          "statusCode": "Unstable",
          "name": "Global"
        }
      ]
    }
  }
}`

and from the EU servers:

{
  "data": {
    "status": {
      "generalStatus": {
        "message": "",
        "statusCode": "OK"
      },
      "currentStatuses": [
        {
          "message": null,
          "statusCode": "OK",
          "name": "Website"
        },
        {
          "message": null,
          "statusCode": "OK",
          "name": "Forum"
        },
        {
          "message": null,
          "statusCode": "OK",
          "name": "Authentication"
        },
        {
          "message": null,
          "statusCode": "OK",
          "name": "Launcher"
        },
        {
          "message": null,
          "statusCode": "OK",
          "name": "Group lobby"
        },
        {
          "message": null,
          "statusCode": "OK",
          "name": "Trading"
        },
        {
          "message": null,
          "statusCode": "OK",
          "name": "Matchmaking"
        },
        {
          "message": null,
          "statusCode": "OK",
          "name": "Friends and msg."
        },
        {
          "message": null,
          "statusCode": "OK",
          "name": "Inventory operations"
        },
        {
          "message": "",
          "statusCode": "OK",
          "name": "Global"
        }
      ]
    }
  }
}

Add GPS data for TD maps to API

The TD tarkov maps should be moved under tarkov.dev org control, and migrate the GPS data (and associations with task objectives) to the API.

Inconsistent naming convention in ItemCategories Key Mechanical data

Hi there,

I noticed that the naming convention in the Key Mechanical API data is inconsistent with the standard convention used for other items. While other items have spaces between words in the "name" field and hyphens between words in the "normalizedName" field, the Key Mechanical item has no spaces in the "name" field and all letters are in uppercase. This inconsistency may cause confusion and make it difficult to work with the data.

Would it be possible to update the Key Mechanical data to conform to the standard naming convention for consistency and ease of use? This would greatly help in working with the data and prevent confusion.

As English is not my native language, I may not have been able to understand the reason behind this inconsistency. If there is a valid reason for the current naming convention, please let me know so that I can better understand the situation.

Thank you for your attention to this matter. I look forward to your response.

Best regards, Seiju

Add failed quests property to Tasks

For tasks where another Task or Tasks are marked as failed when the task is completed, add a property to the Task definition which lists the quests that would be failed. This is currently represented as the "alternatives" property on quests in TD. Additionally, the reputation failure property should be added to represent changes from failures.

Currency used for x item

API returns sellFor array where price is shown but not the currency.
Is there any way I can get the currency of x item from response.

Thanks a lot and very nice work :)

Inconsistency in price of unavailable items

Currently, for "9x18mm PM RG028 gzh ammo pack (16 pcs)" (as an example), I see this returned:

        "changeLast48h": 0,
        "changeLast48hPercent": 0,
        "lastLowPrice": null,
        "low24hPrice": null,
        "avg24hPrice": 0,
        "high24hPrice": null,

I expect them to be either all 0 or all null, not a mix ๐Ÿ˜… Is there any reason for this that I'm missing?

Item sellFor field CurrencyItems throwing errors

Whenever I try to get information about the currencyItem of an ItemPrice, where the Vendor is not the flea, I got from the sellFor field of an Item I get this error: No item found with id undefined. It works fine for ItemPrices I got from the buyFor field.

That explanation is quite bad, so I attached a little visualization from my debugger, you can easily test that on the playground as well though. Excuse the bad writing, had to do that with my mouse.

Wherever currencyItem is null the error occurred, this is the case for elements 0-3 of the sellFor list

image

Server Status Region

Can you add a region parameter for the server status to check for a specific region?

Issue with query results: Incorrect kappaRequired value for "Capturing Outposts" task

Hello,

I am experiencing an issue with the query results for the following query.

query {
  tasks{
    name
    kappaRequired
  }
}

The problem is that for the "Capturing Outposts" task, the kappaRequired value is being returned as true instead of false, which is incorrect.

image

Could you please investigate this issue and let me know if there is a fix for it? Thank you.

Error retrieving trader barters.

Barter information can no longer be retrieved via the traders query.
This was likely caused by the addition of Lightkeeper, the first in-raid trader.

Query:
{traders{id, levels{barters{id}}}}

Response:

{
  "errors": [
    {
      "message": "Cannot read properties of undefined (reading 'filter')",
      "locations": [
        {
          "line": 6,
          "column": 7
        }
      ],
      "path": [
        "traders",
        0,
        "levels",
        0,
        "barters"
      ]
    },
    {
      "message": "Cannot read properties of undefined (reading 'filter')",
      "locations": [
        {
          "line": 6,
          "column": 7
        }
      ],
      "path": [
        "traders",
        1,
        "levels",
        0,
        "barters"
      ]
    },
    {
      "message": "Cannot read properties of undefined (reading 'filter')",
      "locations": [
        {
          "line": 6,
          "column": 7
        }
      ],
      "path": [
        "traders",
        2,
        "levels",
        0,
        "barters"
      ]
    },
    {
      "message": "Cannot read properties of undefined (reading 'filter')",
      "locations": [
        {
          "line": 6,
          "column": 7
        }
      ],
      "path": [
        "traders",
        3,
        "levels",
        0,
        "barters"
      ]
    },
    {
      "message": "Cannot read properties of undefined (reading 'filter')",
      "locations": [
        {
          "line": 6,
          "column": 7
        }
      ],
      "path": [
        "traders",
        4,
        "levels",
        0,
        "barters"
      ]
    },
    {
      "message": "Cannot read properties of undefined (reading 'filter')",
      "locations": [
        {
          "line": 6,
          "column": 7
        }
      ],
      "path": [
        "traders",
        5,
        "levels",
        0,
        "barters"
      ]
    },
    {
      "message": "Cannot read properties of undefined (reading 'filter')",
      "locations": [
        {
          "line": 6,
          "column": 7
        }
      ],
      "path": [
        "traders",
        6,
        "levels",
        0,
        "barters"
      ]
    },
    {
      "message": "Cannot read properties of undefined (reading 'filter')",
      "locations": [
        {
          "line": 6,
          "column": 7
        }
      ],
      "path": [
        "traders",
        7,
        "levels",
        0,
        "barters"
      ]
    },
    {
      "message": "Cannot read properties of undefined (reading 'filter')",
      "locations": [
        {
          "line": 6,
          "column": 7
        }
      ],
      "path": [
        "traders",
        8,
        "levels",
        0,
        "barters"
      ]
    }
  ],
  "data": {
    "traders": [
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null
    ]
  }
}

Unable to retrieve task objective/item count

Issue

I made an issue in the wrong place: the-hideout/tarkov-dev#855

I understand there was an api overhaul and the Quest schema was replaced with TaskObjective.
However I am unable to query the count of a Task/Quest with simply TaskObjective
I see that there areTaskObjectiveBasic and TaskObjectiveItem schemas but are currently inaccessible on https://api.tarkov.dev/ (as far as I know, I could be mistaken) The Task.objectives is simply a list of TaskObjective i.e [TaskObjective]

I would love to work on this. I'm not too familiar with the code base though so any guidance would be helpful.

Context

On https://api.tarkov.dev/

query {
  tasks {
    id
    name
    }
    objectives {
      id
      type
    	description
      maps {
        normalizedName
      }
      optional
    }
  }
}

Sample quest(an element of tasks.objectives: [TaskObjectives]):

{
        "id": "5967733e86f774602332fc84",
        "name": "Shortage",
        "objectives": [
          {
            "id": "5968edc086f77420d2328014",
            "type": "findItem",
            "description": "Find Salewa first aid kits in raid",
            "maps": [],
            "optional": false
          },
          {
            "id": "59689eb886f7740d137ebfc3",
            "type": "giveItem",
            "description": "Hand over the first aid kits",
            "maps": [],
            "optional": false
          }
        ]
      }

Unable to determine how many Salewa first aid kits are required

lang: zh make no effect.

I tried this code:

query {
  items(lang: zh) {
    id,
    name,
    shortName,
    basePrice,
    avg24hPrice
  }
}

But it returns all data with English name, not Chinese name.

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.