Ruby gem for interacting with the Halo:Reach API
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 35 commits behind agoragames:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.document
.gitignore
.rvmrc
Gemfile
Gemfile.lock
LICENSE.txt
README.rdoc
Rakefile
VERSION
halo-reach-api.gemspec

README.rdoc

Halo::Reach::API

Ruby gem for interacting with the Halo:Reach API

Requirements

  • HTTParty

  • JSON

  • FakeWeb (testing)

  • Mocha (testing)

Install

  • sudo gem install halo-reach-api

Example

>> require 'halo-reach-api'
=> true
>> halo_reach_api = Halo::Reach::API.new('xxx') # An API key will cost you 750 MS points/year for your application
=> #<Halo::Reach::API:0x1015ec2c8 @token="xxx", @api_url="http://www.bungie.net/api/reach/reachapijson.svc/">

Look at the unofficial wiki for complete descriptions of the API calls.

FAQ

Q: How do I get an API key?

A: You must be a Bungie Pro subscriber. www.haloreachapi.net/wiki/API_key

Q: Can I have your API key?

A: No. You can subscribe to Bungie Pro and generate an API key for your application.

Q: Dates are funky and not parsed as dates. For example:

>> { “Credits” : 1000,

"Description" : "Earn 20 assists today in multiplayer Matchmaking.",
"ExpirationDate" : "/Date(1290510000000-0800)/",
"IsWeeklyChallenge" : false,
"Name" : "Pass the Rock"
},

A: Yes they are funky. Yes. They. Are. I'm considering how I would actually parse that out. I may write a helper method on the API class to take a date like that and parse it into something useable. Or you can submit a patch for that?!

Contributing to halo-reach-api

  • 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

  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

  • 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 © 2010 David Czarnecki. See LICENSE.txt for further details.