Torn-Playground / tornapi-documentation

Unofficial documentation for the API of Torn.

Home Page:http://tornapi.tornplayground.eu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

User/Jobpoints missing structures

Llyfrs opened this issue · comments

commented

Hi,

I noticed that Job points are missing the Companies and Company Structures. They seem to be defined in the code but not added to the final section structure.

Also the Jobs structure is incomplete.

Good spot, will add the structures on the page itself.
Do you have a list of the other keys? I personally don't have those in my list, I won't just guess them.

commented

This is what torn PDA uses, considering it has enough users to test it, I would say it's most likely correct.

class Jobs { 
   Jobs({ 
     this.army, 
     this.medical, 
     this.casino, 
     this.education, 
     this.law, 
     this.grocer, 
   }); 
  
   int army; 
   int medical; 
   int casino; 
   int education; 
   int law; 
   int grocer; 
  
   factory Jobs.fromJson(Map<String, dynamic> json) => Jobs( 
         army: json["army"] == null ? 0 : json["army"], 
         medical: json["medical"] == null ? 0 : json["medical"], 
         casino: json["casino"] == null ? 0 : json["casino"], 
         education: json["education"] == null ? 0 : json["education"], 
         law: json["law"] == null ? 0 : json["law"], 
         grocer: json["grocer"] == null ? 0 : json["grocer"], 
       );

p.s I'm on the phone right now so I hope it formatted correctly lol