Project

sc2profile

0.0
No commit activity in last 3 years
No release in over 3 years
Scrapes name, 1v1 league and 1v1 league points from a Battle.net StarCraft II profile.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.0
~> 1.5.2

Runtime

~> 1.4.4
 Project Readme

SC2Profile

Parses a Battle.net StarCraft 2 profile for name, race, portrait, 1v1 league and 1v1 league points.

Usage

p = SC2Profile.new("<profile url>")
=> <Name> (<League>, <Race>, <Points> pts)

p.name
=> <Name>


p.race
=> <Race>

p.race.to_style
=> background: url('<Path>race-symbols.png') <ImageX> <ImageY> no-repeat; width: 25px; height: 25px;


p.league
=> <LeagueName> <LeagueType> Rank <Rank>

p.league.to_style # size => :small, :medium, :big
=> background: url('<Path><LeagueName>.png') <ImageX> <ImageY> no-repeat; width: <ImageSize>; height: <ImageSize>;

p.league.to_json
=> "{'league_name': 'gold', 'league_type': '1v1','rank': '25'}"


p.points
=> <Points>


p.portrait_style
=> background: url('<Path><ImageIndex>-90.jpg') <ImageX> <ImageY> no-repeat; width: 90px; height: 90px;

p.portrait_style.to_json
=> "{'image_index': 0, 'image_x': '0px','image_y': '0px'}"

A profile that has not yet been placed will return:

<Name> (No league, 0 pts)

Contributing to SC2Profile

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

== Copyright

Copyright (c) 2011 Julian Møller. See LICENSE.txt for further details.