0.0
No commit activity in last 3 years
No release in over 3 years
Retrieves and parses JSON data, which it gets from http://api.steampowered.com
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.6
~> 10.0
 Project Readme

Steam web API

Gem Version

Steam Web API library in Ruby. Retrieves data from API server and parses it(JSON only). If you want more information about the API go to:

Installation

Open up your terminal or cmd or whatever and copypasta this code

gem install steamwebapi

To use it in your application, add the following to your Gemfile:

gem 'steamwebapi', '~> 1.0.1'

Usage

Retrieve a user's friend list:

# retrieve friend list of user with SteamID64 being 76561197960435530
SteamUser.key('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').friend_list('76561197960435530')
# some functions require an api key(IPlayerService, ISteamUser, and some ISteamUserStats)

Retrieve news for a Steam app:

# retrieve news for Steam app
SteamApp.get_news('440', '1', '1')
# this will retrieve 1 article of app 440 with the content's length being 1("A...")

You can also use the SteamAPI module's get function

# return news for a Steam app - this does the same thing as the example above, its just messier(IMO)
SteamAPI.get('ISteamNews', 'GetNewsForApp', 'v0002', args = {appid: '440', count: '1', maxlength: '1'})