Coder Social home page Coder Social logo

halosharp's Introduction

HaloSharp

The purpose of this project is to create a dead simple C# wrapper for the official Halo® Game Data API (developer.haloapi.com).

HaloSharp attempts to fully support all available official endpoints.

Usage

  1. Create an instance of HaloClient (provide your SubscriptionKey and optionally a RateLimit).
  2. Call the StartSession method.
  3. Call the .Query<TResult>() method and pass in a prepackaged Query object.
Sample
var developerAccessProduct = new Product
{
    SubscriptionKey = "00000000000000000000000000000000",
    RateLimit = new RateLimit
    {
        RequestCount = 10,
        TimspSpan = new TimeSpan(0, 0, 0, 10),
        Timeout = Timeout.InfiniteTimeSpan
    }
};

var client = new HaloClient(developerAccessProduct);

using (var session = client.StartSession())
{
    var query = new GetMatches()
      .InGameMode(Enumeration.GameMode.Arena)
      .ForPlayer("Furiousn00b");

    var matchSet = await session.Query(query);

    foreach (var result in matchSet.Results)
    {
        Console.WriteLine($"MatchId: {result.Id.MatchId}");
    }
}

NuGet

A Nuget package is available at www.nuget.org/packages/HaloSharp

PM> Install-Package HaloSharp

Changelog

v.1.2.2.0 (2016-02-20)
  1. Updated Medal enum.
  • New Medal Type: Ball
  1. Updated Requisition model.
  • New property: HideIfNotAcquired
v.1.2.1.0 (2016-02-14)
  1. Updated CampaignMatch model.
  • New property: CharacterIndex
  1. Updated MatchSet model.
  • New property: MatchCompletedDateFidelity
v.1.2.0.0 (2016-01-31)
  1. Query validation.
  • Validation exceptions will be thrown for bad queries (missing mandatory fields, invalid gamertags etc.).
  1. Updated GetArenaServiceRecord query.
  • New SeasonId parameter.
  1. Updated ArenaServiceRecord model.
  • New property: ArenaPlaylistStatsSeasonId
  • New property: HighestCsrSeasonId
  1. Updated Requisition model.
  • New property: LevelRequirement
v.1.1.0.0 (2015-12-26)
  1. Rate Limiter
  • Optional rate limiter with timeout settings.
  1. JSON Structural Validation (JSON Schema).
  • A significant update to the test harness. Using JSON schemas to detect changes to API responses.
  1. Serialization.
  • Strongly typed models are now serializable.
  1. Metadata Endpoints.
  • Seasons
  1. Profile Endpoints
  • Emblem Url
  • Spartan Url
v.1.0.0.0 (2015-11-04)######
  1. Metadata Endpoints
  • Campaign Missions
  • Commendations
  • CSR Designations
  • Enemies
  • Flexible Stats
  • Game Base Variants
  • Game Variants
  • Impulses
  • Map Variants
  • Maps
  • Medals
  • Playlists
  • Requisition Packs
  • Requisitions
  • Skulls
  • Spartan Ranks
  • Team Colors
  • Vehicles
  • Weapons
  1. Profile Endpoints
  • Emblem Image
  • Spartan Image
  1. Stats Endpoints
  • Player Matches
  • Arena Carnage Report
  • Arena Service Record
  • Campaign Carnage Report
  • Campaign Service Record
  • Custom Carnage Report
  • Custom Service Record
  • Warzone Carnage Report
  • Warzone Service Record

Notes

  • The Halo® Game Data API is still in a Beta period. Breaking changes are to be expected.
  • Pull requests are welcome.
  • If you see something or think something could be done better, shout out. I'm all ears.
  • Review the HaloSharp.Test project for examples on each of the different endpoints and their usages.
  • You'll need to provide your own API Key to run the test suite. (Setup.cs)

About

This application is offered by Damon Pollard, which is solely responsible for its content. It is not sponsored or endorsed by Microsoft. This application uses the Halo® Game Data API. Halo © 2015 Microsoft Corporation. All rights reserved. Microsoft, Halo, and the Halo Logo are trademarks of the Microsoft group of companies.

halosharp's People

Contributors

jacobsnyder avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.