-
Notifications
You must be signed in to change notification settings - Fork 6
Home
here you will find experimental/useless commands documentation
- set_steamid()
- copy_session()
- use_session()
- partner_id_to_steam_id()
- toggle_messages()
- vote_2018()
- cottage()
this command will set a steamID for non-logged-in Handlers (if used on a logged-in handler, an exception will raise).
-
steamid
can be a steamID, profileID, or trade link can be useful if you want to use other commands without logging-in and without parameters.
require 'steam-trade'
logged = Handler.new('username','password')
logged.set_steamid("CardExchange") # raise an exception
hash = logged.sets_count() #will return the current username badges
nonlogged = Handler.new()
hash = logged.sets_count() # will raise an exception cause no steamID given
nonlogged.set_steamid("CardExchange") # will succeed, keep in my mind you are still not logged in
hash = logged.sets_count() # will return CardExchange's badge list
nonlogged.set_steamid("nomg3r") # will succeed cause you are not logged in
hash = logged.sets_count() # will return nomg3r's badge list
this command returns the Handler's Mechanize instance
require 'steam-trade'
logged = Handler.new('username','password')
session = logged.copy_session() # will return a logged in session to steam you can use however you want using mechanize commands
nonlogged = Handler.new()
nonloggedsession = nonlogged.copy_session # gives you an empty session yo might as well call Mechanize.new
this gives you access to the current Mechanize instance, linked to the Handler.
This can be useful to parse steam related services (steamcommunity.com,store.steampowered..) while authenticated.
IMPORTANT: you are interacting with Mechanize instance, therefore you need to use mechanize's commands
require 'steam-trade'
logged = Handler.new('username','password')
html = logged.use_session.get("https://steamcommunity.com/").content ##will give HTML with and account logged in
-
steamID32
is the ID to convert into a steamID64
require 'steam-trade'
handler = Handler.new()
puts handler.partner_id_to_steam_id(83905207) ## will output 76561198044170935
this command is a switch to enable/disable messages from the script.
you will always receive the login messages.
require 'steam-trade'
acc = Handler.new('username', 'password', 'shared_secret')
acc.toggle_messages()
#2018-04-27 21:41:14 +0100 :: Handler started for xxxx
#2018-04-27 21:41:21 +0100 :: logging-in
#2018-04-27 21:41:24 +0100 :: logged in as xxxxx
#2018-04-27 21:41:24 +0100 :: your steamid is xxxxx
#2018-04-27 21:41:24 +0100 :: loaded API_KEY : xxxxxx
#no more messages after this
this command will vote in the steam awards of 2018 randomly.
require 'steam-trade'
acc = Handler.new('username', 'password', 'shared_secret')
acc.vote_2018()
this command will open all of the doors that are available to be opened ( winter sale 2018 )
require 'steam-trade'
acc = Handler.new('username', 'password', 'shared_secret')
acc.cottage