steam-trade 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +44 -6
- data/lib/meta/version.rb +1 -1
- data/steam-trade.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50a1b55f030872416e219023edbb69bc4656359b
|
4
|
+
data.tar.gz: 477213399072d3e7ecba7dac4c94b4814f9dea1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ac05b9c5853b3e108c6eec513241c171d1dcfef34e7e303d16e80b29e6af88f7992eeafff7d00a88fb33458ff9711fcd4b46d1f24f737af9572eaef7e625aba
|
7
|
+
data.tar.gz: 2d2804d9c70d288a77fc3585986477c08f2c23883a882ec7dfbbfc4f8329ef04a4f4aadc7a10d5618a492e979015d548dc18809813abbbd898f52523a271a598
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# steam-trade
|
1
|
+
# steam-trade V0.0.8
|
2
2
|
|
3
3
|
This gem simplifes/allows sending steam trade offers programmatically.
|
4
4
|
|
@@ -86,24 +86,62 @@ each item is a hash which contains information about the item in the form of `{"
|
|
86
86
|
|
87
87
|
**IMPORTANT**: `normal_get_inventory()` will load the whole target inventory, for each **5k** of items, you are adding **~40MB** to your memory and of course will affect performance of the code and the computer
|
88
88
|
## Sending a trade offer
|
89
|
+
#### `send_offer(myarray,theirarray,trade_offer_link,message)`
|
89
90
|
then you can send your offer
|
90
|
-
- `
|
91
|
+
- `myarray` is an array which contains hashes of selected items to send in the offer. (currently you must get this alone)
|
91
92
|
- `Theirarray` is an array which contains hashes of selected items to receive in the offer. (currently you must get this alone)
|
92
|
-
- `trade_offer_link`
|
93
|
-
- `trade_offer_link` can
|
93
|
+
- `trade_offer_link` can be the trade link of you partner `ex: https://steamcommunity.com/tradeoffer/new/?partner=410155236&token=H-yK-GFt`
|
94
|
+
- `trade_offer_link` can be a steamID, however using a steamID requires you and your partner to be friends on steam
|
95
|
+
- `trade_offer_link` can be a profileID, however using a profileID requires you and your partner to be friends on steam
|
94
96
|
- `message` is the comment you want to include in the trade offer
|
95
97
|
|
96
|
-
- `
|
98
|
+
- `myarray`, `theirarray`, `trade_offer_link` are required, `message` is optional
|
97
99
|
```ruby
|
98
100
|
require 'steam-trade'
|
99
101
|
|
100
102
|
account = Handler.new('username','password','shared_secret')
|
101
103
|
account.mobile_info('identity_secret')
|
102
104
|
|
105
|
+
me = account.normal_get_inventory()
|
106
|
+
his = account.normal_get_inventory("nomg3r")
|
107
|
+
|
108
|
+
myarray = [me[5] , me[20] , me[60]].compact!
|
109
|
+
theirarray = [his[1], his[20], his[30]].compact!
|
110
|
+
|
111
|
+
# if you are friends
|
112
|
+
account.send_offer(myarray,theirarray,"nomg3r",message)
|
113
|
+
#or (as friends)
|
114
|
+
account.send_offer(myarray,theirarray,'76561198370420964',message)
|
115
|
+
|
116
|
+
# whenever
|
117
|
+
account.send_offer(myarray,theirarray,"https://steamcommunity.com/tradeoffer/new/?partner=410155236&token=H-yK-GFt",message)
|
103
118
|
|
104
|
-
account.send_offer(Myarray,Theirarray,trade_offer_link,message)
|
105
119
|
```
|
120
|
+
## Counting badges owned
|
121
|
+
#### `sets_count(target,non_marketable)`
|
122
|
+
**this command does not count foil badges (only normal trading cards)**
|
123
|
+
- `target` can be a steamID, a profileID or a trade link
|
124
|
+
- `non_marketable` this is a switch to count marketable cards(defaults to true if not specified)
|
125
|
+
- a .txt will be created from this command to read the badges
|
126
|
+
- this returns a hash `{'sets' => appsets, 'appxsets' => setsowned, 'totalsets' => numberofsets, 'totalcards' => total_non_foil, 'marketable' => true}`
|
127
|
+
- `'sets'` is a hash with game appids as keys and each card and number of copies owned of each card `{'appid1' => {'card1' => 5,'card2' => 3, ... 'cardN' => Z},{'appid1' => {'card1' => 0,'card2' => 2, ... 'cardN' => K} }`
|
128
|
+
- `'appxsets'` is a hash containing the number of sets available of each set `{'appid1' => 5,'appid2' => 20,...'appidN' => Z}`
|
129
|
+
- `'totalsets'` is an integer equals to the number of sets owned
|
130
|
+
- `totalcards'` is an integer equals to the number of non-foil cards account for
|
131
|
+
```ruby
|
132
|
+
require 'steam-trade'
|
106
133
|
|
134
|
+
account = Handler.new('username','password','shared_secret')
|
135
|
+
account.mobile_info('identity_secret')
|
136
|
+
#with login
|
137
|
+
hash = account.sets_count()
|
138
|
+
|
139
|
+
#without login
|
140
|
+
hash = account.sets_count('CardExchange')
|
141
|
+
hash = account.sets_count(76561198370420964)
|
142
|
+
hash = account.sets_count('https://steamcommunity.com/tradeoffer/new/?partner=410155236&token=H-yK-GFt',false)
|
143
|
+
|
144
|
+
```
|
107
145
|
|
108
146
|
## License
|
109
147
|
|
data/lib/meta/version.rb
CHANGED
data/steam-trade.gemspec
CHANGED
@@ -7,12 +7,12 @@ require 'meta/version'
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = Meta::GEM_NAME
|
9
9
|
spec.version = Meta::VERSION
|
10
|
-
spec.date =
|
10
|
+
spec.date = Time.new.strftime("%Y-%m-%d")
|
11
11
|
spec.authors = ["OmG3r"]
|
12
12
|
spec.email = ["adam.boulila@live.fr"]
|
13
13
|
spec.files = Dir['lib/ *.rb'] + Dir['bin/*'] + Dir['lib/meta/*rb'] + Dir['lib/blueprints/*json']
|
14
14
|
spec.summary = %q{A steambot library to manage steam trading offers.}
|
15
|
-
spec.description = %q{Send steam trading offers, generate steam 2FA codes, confirm steam trade offers, get inventories}
|
15
|
+
spec.description = %q{Send steam trading offers, generate steam 2FA codes, confirm steam trade offers, get inventories,count badges}
|
16
16
|
spec.homepage = "https://github.com/OmG3r/steam-trade/"
|
17
17
|
spec.license = "MIT"
|
18
18
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: steam-trade
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OmG3r
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: 2.7.0
|
61
61
|
description: Send steam trading offers, generate steam 2FA codes, confirm steam trade
|
62
|
-
offers, get inventories
|
62
|
+
offers, get inventories,count badges
|
63
63
|
email:
|
64
64
|
- adam.boulila@live.fr
|
65
65
|
executables: []
|