Accessing code values other than items | API Development | TORN

Accessing code values other than items

    • This_Name_Sucks [1828226]
    • Role: Civilian
    • Level: 100
    • Posts: 555
    • Karma: 76
    • Last Action: 56 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Thread created on 16:35:55 - 06/02/24 (7 months ago)
    |
    Last replied 22:07:54 - 06/02/24 (7 months ago)
    I'm not sure if this has been asked before, but I was curious if there is a reference for or way to access code values that are not available via the "items" selection API (https://api.torn.com/torn/?selections=items&key=). Some samples of what I'm referring to are at the end of this post.

    Some of these are intuitive or can be extrapolated from sources such as the API documentation, wiki, etc. However, others can only be interpreted by viewing the corresponding log text.

    I assume some of these items are not standardized or subject to change often enough not be made available as an API selection, but wanted to ask just in case.

    (Moderators) I don't this is sensitive information based on the plethora of user-created Torn applications already available, but if it is, then please advise accordingly and grave this post. Not vouching for their accuracy either :)

    Data Data Code Data Value
    ammo 1 12 Gauge Cartridge
    ammo 2 9mm Parabellum Round
    ...
    bachelor BIO Biology
    bachelor BUS Business Management
    ...
    cityshops 100 Big Al's Gun Shop
    cityshops 101 Sally's Sweet Shop
    ...
    destination 1 Torn City
    destination 2 Mexico
    ...
    dvdtype 1 Action
    dvdtype 2 Comedy
    ...
    error 0 Unknown error
    error 1 Key is empty
    ...
    finishing_hits axehits Clubbing Weapons
    finishing_hits chahits Mechanical Weapons
    ...
    gym 8 Global Gym
    gym 24 Georges
    ...
    honortype 0 Misc
    honortype 1 Defaults
    ...
    medaltype ATK Attacking
    medaltype CMT Commitment
    ...
    mission 15 Rolling in It
    mission 16 Scammer
    ...
    mod 2 Holographic Sight
    mod 3 ACOG Sight
    ...
    newsletter 51 Torn City Newsletter - Autumn 2020
    newsletter 52 Torn City Newsletter - Winter 2020
    ...
    origin 1 Torn City
    origin 2 Mexico
    ...
    ornament 45 Snowshoes Ornament
    ornament 46 Skis Ornament
    ...
    property 0 Shack
    property 1 Trailer
    ...
    rank 1 Absolute beginner
    rank 2 Beginner
    ...
    track 6 Uptown
    track 7 Withdrawal
    ...
    upgrade 1 Strip Out
    upgrade 5 Uprated Springs (Medium)
    • Kwack [2190604]
    • Role: Civilian
    • Level: 15
    • Posts: 1,865
    • Karma: 2,838
    • Last Action: 4 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 17:08:33 - 06/02/24 (7 months ago)
    Post link copied to clipboard Copy post link
    Nope, when we use it it's stuff we found in other parts of the site.

    For example, the ammo IDs can be found on the ammo page by buying it and reading the outgoing params of the dispatched request. Edu course codes can be seen on the education page (screenshot). Otherwise look in the URL on the relevant page to find the IDs.
    • This_Name_Sucks [1828226]
    • Role: Civilian
    • Level: 100
    • Posts: 555
    • Karma: 76
    • Last Action: 56 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 18:42:39 - 06/02/24 (7 months ago)
    Post link copied to clipboard Copy post link
    Thanks. Kind of figured it was a "throw a you go" approach. Never occurred to me to check URL's rather than raw or parsed JSON responses - might save me a few clicks.
    • Omanpx [1906686]
    • Role: Civilian
    • Level: 100
    • Posts: 1,934
    • Karma: 11,352
    • Last Action: 2 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 19:41:54 - 06/02/24 (7 months ago)
    Post link copied to clipboard Copy post link
    Also, don't forget about torn/ endpoints in the api. Edu course IDs can be fetched via

    https://api.torn.com/torn/?selections=education&key=

    Toolbox - a collection of my tools and spreadsheets made for Torn.

    Guidebook - a collection of guides i made for Torn.

    • This_Name_Sucks [1828226]
    • Role: Civilian
    • Level: 100
    • Posts: 555
    • Karma: 76
    • Last Action: 56 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 22:07:54 - 06/02/24 (7 months ago)
    Post link copied to clipboard Copy post link
    Good to know - thanks!
Reply
Thread Title: