Giter Site home page Giter Site logo

nhlstatscrm's Introduction

NhlStatsCrm

๐Ÿšง ๐Ÿšง DISCLAIMER ๐Ÿšง ๐Ÿšง

11/14/2023 - Unfortunately as of November 2023 the NHL API has moved to https://api-web.nhle.com/. It has also undergone a lot of changes so this project will no longer work in it's current state. This is a pretty new development so documentation is catching up but if you would like to learn more about the new API please see this: https://api-web.nhle.com/application.wadl

Summary

The purpose of this project is to take all players and stats from the NHL REST endpoint and load into Dynamics 365 on a daily basis.

There are scheduled Azure functions that will run overnight and upsert players/stats using the NHL API's id's as an alternate/foreign key.

The API supports some GET requests although this API isn't intended for use by end-users since data should be observed in Dynamics 365.

Demo

Technologies

  • .NET 6
  • Mediatr
  • Automapper
  • Microsoft Identity Platform
  • CD with Github Actions
  • Power Platform Dataverse Client
  • Azure
    • App Service
    • Functions

Network

Local Development

If you haven't already, I highly recommend joining the Microsoft Developer Program. You will receive your own Microsoft 365 tenant which will include a Dynamics instance among many other things. So long as you continue to use this environment for development, your license will be renewed each 90 days. Check out sign-up info HERE.

Initial project setup

  • Create your appsettings.Production.json and appsettings.Development.json files. There is an example appsettings.json in the project
  • Set up Azure app registration
  • Create app role NhlStatsCrm.Contributor and assign to app user
  • Replace values in AzureAd prop of appsettings with those from app registration
  • Create your Dataverse connection string replacing default values below
  • Recommend using Azure Key Vault as mechanism for passing secrets to your App Service / Function app
  • Install Dynamics solution HERE.
{
	"AzureAd": {
		"Instance": "https://login.microsoftonline.com/",
		"Domain": "yourdomain.onmicrosoft.com",
		"TenantId": "00000000-0000-0000-0000-000000000000",
		"ClientId": "00000000-0000-0000-0000-000000000000",
		"Audience": "api://00000000-0000-0000-0000-000000000000",
		"CallbackPath": "/signin-oidc"
	},
	"ConnectionStrings": {
		"DATAVERSE": "AuthType=ClientSecret;ClientId=00000000-0000-0000-0000-000000000000;ClientSecret=gg;URL=https://yourdomain.crm.dynamics.com/;"
	},
	"Logging": {
		"LogLevel": {
			"Default": "Information",
			"Microsoft.AspNetCore": "Warning"
		}
	},
	"AllowedHosts": "*"
}

NHL REST API Docs

Big thanks to the legends below. Without you all paving the way, starting projects like this would be much harder. Thank you! ๐Ÿ™

nhlstatscrm's People

Contributors

tcorcor1 avatar

Stargazers

Roman avatar  avatar  avatar Matthew H. Irby avatar

Watchers

 avatar  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.