Q:

How to include 3rd party API in MVC 5 - Riot Games

I am making a site and I would like to try and pull some user data via a Developer API.
I have never done this before, and I am not sure how to really search for a solution. All I know is that I think I should use AJAX and that I need to make sure it is cross-domain compatible.
The game I am making a stat page for is League of Legends, and they have an API in order to pull their information in JSON format: https://developer.riotgames.com/docs/getting-started
Their example uses this, which does: a cURL request loads RiotSchmick's basic summoner object in JSON.
curl --request GET 'https://na.api.pvp.net/api/lol/na/v1.4/summoner/by-name/RiotSchmick?api_key=<key>' --include
What I am wondering is if someone could show me a very simple way to include this within my MVC project, like a simple View that contains a single div that will update with RiotSchmick's user data, and then the AJAX/JSON call that does this magic. You can ignore the <key> since I assume I just plug my key into that location.
Thank you for all the help!

A:

For beginning asp.net json from url and jquery json parse keywords will help you.
I got started before this API but I didn't continue. 
Of course you can only download string on your controller via webclient etc and parse it javascript/framework on your view.
Use your own; Controller name, Model namespace and API key
MODEL
Public Class SummonerModel

 Public Property ID As Integer
 Public Property Name As String
 Public Property ProfileIconId As Integer
 Public Property SummonerLevel As Integer
 Public Property RevisionDate As String
 Public Property ErrorMessage As String

End Class

VIEW
<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl(Of MP.Web.Models.Site.SummonerModel)" %>

<div id="SummonerResult">
<%If Model.ErrorMessage = "" Then%>

ID : <%=Model.ID%><br />
Name : <%=Model.Name%><br />
Profile Icon Id : <%=Model.ProfileIconId%><br />
Revision Date : <%=Model.RevisionDate%><br />
SummonerLevel : <%=Model.SummonerLevel%><br />

<%Else%>

Error / <%=Model.ErrorMessage%>

<%End If%>

</div>

**CONTROLLER **
Function GetSummoner(name As String) As PartialViewResult

    Dim model = New SummonerModel

    Dim url = "https://na.api.pvp.net/api/lol/na/v1.4/summoner/by-name/" & name & "?api_key=<key>"

    Using webClient = New System.Net.WebClient()

        Try

            Dim json = webClient.DownloadString(url)

            Dim dic = (New JavaScriptSerializer()).Deserialize(Of Dictionary(Of String, SummonerModel))(json)

            model = dic.FirstOrDefault.Value

        Catch ex As Exception

            model.ErrorMessage = ex.Message

        End Try

    End Using

    Return PartialView(model)

End Function

SCRIPT
setInterval(function () { $("#SummonerResult").load("/RiotGamesApi/GetSummoner?name=RiotSchmick") }, 1000);

