Skip to content

Commit 68e6470

Browse files
author
babelshift
committed
Merged some EconItems classes to one file for convenience.
1 parent d32fccf commit 68e6470

8 files changed

Lines changed: 74 additions & 105 deletions

SteamWebAPI2.Models/Economy/EconItem.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

SteamWebAPI2.Models/Economy/EconItemAttribute.cs

Lines changed: 0 additions & 19 deletions
This file was deleted.

SteamWebAPI2.Models/Economy/EconItemAttributeAccountInfo.cs

Lines changed: 0 additions & 14 deletions
This file was deleted.

SteamWebAPI2.Models/Economy/EconItemEquipped.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

SteamWebAPI2.Models/Economy/EconItemResult.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,76 @@
1-
using System;
1+
/*
2+
*
3+
* These are models related to the JSON response of the GetPlayerItems method from various IEconItems_<AppId> interfaces.
4+
*
5+
*/
6+
7+
using Newtonsoft.Json;
28
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
69

710
namespace SteamWebAPI2.Models.Economy
811
{
912
public class EconItemResultContainer
1013
{
1114
public EconItemResult Result { get; set; }
1215
}
13-
}
16+
17+
public class EconItemResult
18+
{
19+
public int Status { get; set; }
20+
21+
[JsonProperty(PropertyName = "num_backpack_slots")]
22+
public int NumBackpackSlots { get; set; }
23+
24+
public IList<EconItem> Items { get; set; }
25+
}
26+
27+
public class EconItemEquipped
28+
{
29+
[JsonProperty(PropertyName = "class")]
30+
public int ClassId { get; set; }
31+
32+
public int Slot { get; set; }
33+
}
34+
35+
public class EconItemAttributeAccountInfo
36+
{
37+
public long SteamId { get; set; }
38+
public string PersonaName { get; set; }
39+
}
40+
41+
public class EconItemAttribute
42+
{
43+
public int DefIndex { get; set; }
44+
public long Value { get; set; }
45+
46+
[JsonProperty(PropertyName = "float_value")]
47+
public double FloatValue { get; set; }
48+
49+
[JsonProperty(PropertyName = "account_info")]
50+
public EconItemAttributeAccountInfo AccountInfo { get; set; }
51+
}
52+
53+
public class EconItem
54+
{
55+
public long Id { get; set; }
56+
57+
[JsonProperty(PropertyName = "original_id")]
58+
public long OriginalId { get; set; }
59+
60+
public int DefIndex { get; set; }
61+
public int Level { get; set; }
62+
public int Quality { get; set; }
63+
public long Inventory { get; set; }
64+
public int Quantity { get; set; }
65+
public int Origin { get; set; }
66+
public IList<EconItemEquipped> Equipped { get; set; }
67+
public int Style { get; set; }
68+
public IList<EconItemAttribute> Attributes { get; set; }
69+
70+
[JsonProperty(PropertyName = "flag_cannot_trade")]
71+
public bool? FlagCannotTrade { get; set; }
72+
73+
[JsonProperty(PropertyName = "flag_cannot_craft")]
74+
public bool? FlagCannotCraft { get; set; }
75+
}
76+
}

SteamWebAPI2.Models/Economy/SchemaResultContainer.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
// Generated by Xamasoft JSON Class Generator
22
// http://www.xamasoft.com/json-class-generator
33

4+
/*
5+
*
6+
* These are models related to the JSON response of the GetSchema method from various IEconItems_<AppId> interfaces.
7+
*
8+
*/
9+
410
using Newtonsoft.Json;
511
using System.Collections.Generic;
612

SteamWebAPI2.Models/SteamWebAPI2.Models.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@
105105
<Compile Include="DOTA2\TeamInfoResult.cs" />
106106
<Compile Include="DOTA2\TeamInfo.cs" />
107107
<Compile Include="DOTA2\TeamInfoResultContainer.cs" />
108-
<Compile Include="Economy\EconItem.cs" />
109-
<Compile Include="Economy\EconItemAttribute.cs" />
110-
<Compile Include="Economy\EconItemAttributeAccountInfo.cs" />
111-
<Compile Include="Economy\EconItemEquipped.cs" />
112-
<Compile Include="Economy\EconItemResult.cs" />
113108
<Compile Include="Economy\EconItemResultContainer.cs" />
114109
<Compile Include="Economy\SchemaResultContainer.cs" />
115110
<Compile Include="FeedData.cs" />

0 commit comments

Comments
 (0)