-
Notifications
You must be signed in to change notification settings - Fork 6
/
TarkovAPI.cs
257 lines (223 loc) · 7.86 KB
/
TarkovAPI.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
namespace TarkovPriceViewer
{
public class TarkovAPI
{
public class BartersFor
{
public Trader trader { get; set; }
public List<RequiredItem> requiredItems { get; set; }
public List<RewardItem> rewardItems { get; set; }
public TaskUnlock taskUnlock { get; set; }
}
public class BartersUsing
{
public Trader trader { get; set; }
public List<RequiredItem> requiredItems { get; set; }
public List<RewardItem> rewardItems { get; set; }
}
public class BuyFor
{
public string currency { get; set; }
public int? priceRUB { get; set; }
public Vendor vendor { get; set; }
}
public class CraftsFor
{
public Station station { get; set; }
public List<RequiredItem> requiredItems { get; set; }
public List<RewardItem> rewardItems { get; set; }
}
public class CraftsUsing
{
public Station station { get; set; }
public List<RequiredItem> requiredItems { get; set; }
public List<RewardItem> rewardItems { get; set; }
}
public class Data
{
public List<Item> items { get; set; }
public List<HideoutStation> hideoutStations { get; set; }
}
public class DefaultAmmo
{
public string name { get; set; }
}
public class HideoutStation
{
public string name { get; set; }
public List<Level> levels { get; set; }
}
public class Item
{
public string id { get; set; }
public string name { get; set; }
public string normalizedName { get; set; }
public List<string> types { get; set; }
public int? lastLowPrice { get; set; }
public int? avg24hPrice { get; set; }
public DateTime? updated { get; set; }
public int? fleaMarketFee { get; set; }
public string link { get; set; }
public string wikiLink { get; set; }
public int? width { get; set; }
public int? height { get; set; }
public Properties properties { get; set; }
public List<SellFor> sellFor { get; set; }
public List<BuyFor> buyFor { get; set; }
public List<BartersUsing> bartersUsing { get; set; }
public List<CraftsFor> craftsFor { get; set; }
public List<CraftsUsing> craftsUsing { get; set; }
public List<BartersFor> bartersFor { get; set; }
public List<UsedInTask> usedInTasks { get; set; }
public Ballistic ballistic = null;
public string lootTier = null;
public string className = null;
public String[] Data()
{
return (new String[] {
name
, ""
, ""
, ""
, ""
, ""
, ""
});
//return (new String[] {
// name
// , (recoil != null ? recoil : "")
// , (accuracy != null ? accuracy : "")
// , (ergo != null ? ergo : "")
// , (price_last != null ? price_last : "")
// , (buy_from_trader_price != null ? buy_from_trader_price.Replace(" ", "").Replace(@"~", @" ≈") : "")
// , (buy_from_trader != null ? buy_from_trader : "")
//});
}
}
public class ItemRequirement
{
public Item item { get; set; }
public int? count { get; set; }
}
public class Level
{
public int? level { get; set; }
public string id { get; set; }
public List<ItemRequirement> itemRequirements { get; set; }
}
public class Map
{
public string name { get; set; }
}
public class Objective
{
public string id { get; set; }
public string description { get; set; }
public List<Map> maps { get; set; }
}
public class Properties
{
//public string caliber { get; set; }
//public int? ergonomics { get; set; }
//public int? defaultRecoilVertical { get; set; }
//public int? defaultRecoilHorizontal { get; set; }
public int? defaultWidth { get; set; }
public int? defaultHeight { get; set; }
//public DefaultAmmo defaultAmmo { get; set; }
//public int? uses { get; set; }
//public int? accuracyModifier { get; set; }
[JsonProperty(PropertyName = "class")]
public int? _class { get; set; }
//public int? damage { get; set; }
//public int? projectileCount { get; set; }
//public int? penetrationPower { get; set; }
//public int? armorDamage { get; set; }
//public double? fragmentationChance { get; set; }
//public string ammoType { get; set; }
}
public class RequiredItem
{
public Item item { get; set; }
public float? count { get; set; }
public float? quantity { get; set; }
}
public class RewardItem
{
public Item item { get; set; }
public float? count { get; set; }
public float? quantity { get; set; }
}
public class Root
{
public Data data { get; set; }
}
public class SellFor
{
public string currency { get; set; }
public int? priceRUB { get; set; }
public Vendor vendor { get; set; }
}
public class Station
{
public string name { get; set; }
public List<Level> levels { get; set; }
}
public class TaskUnlock
{
public string name { get; set; }
}
public class Trader
{
public string name { get; set; }
public List<Level> levels { get; set; }
}
public class TraderLevelRequirement
{
public int? level { get; set; }
}
public class UsedInTask
{
public List<Objective> objectives { get; set; }
public string id { get; set; }
public string name { get; set; }
public Trader trader { get; set; }
public Map map { get; set; }
public int? minPlayerLevel { get; set; }
public List<TraderLevelRequirement> traderLevelRequirements { get; set; }
}
public class Vendor
{
public string name { get; set; }
public int? minTraderLevel { get; set; }
}
}
}
/*
Item:
public Ballistic ballistic = null;
public string lootTier = null;
public string className = null;
public class Properties
{
//public string caliber { get; set; }
//public int? ergonomics { get; set; }
//public int? defaultRecoilVertical { get; set; }
//public int? defaultRecoilHorizontal { get; set; }
public int? defaultWidth { get; set; }
public int? defaultHeight { get; set; }
//public DefaultAmmo defaultAmmo { get; set; }
//public int? uses { get; set; }
//public int? accuracyModifier { get; set; }
[JsonProperty(PropertyName = "class")]
public int? _class { get; set; }
//public int? damage { get; set; }
//public int? projectileCount { get; set; }
//public int? penetrationPower { get; set; }
//public int? armorDamage { get; set; }
//public double? fragmentationChance { get; set; }
//public string ammoType { get; set; }
}
*/