static TutorialData() { TutorialQueries = new List <TutorialQuery>(); var query = new TutorialQuery { MissionId = "9760", TutorialId = "9689", Title = "cp-apim-sales-tracker-services-enable" }; TutorialQueries.Add(query); }
private TutorialResponse GetMiniNavigatorContext(TutorialQuery tutorialQuery) { string requestUrl = string .Concat(ResourseUrlBefore, $".{tutorialQuery.TutorialId}.mission.{tutorialQuery.MissionId}.json", ResourseUrlAfter); var client = new RestClient(_appConfiguration.ProdUrl); var request = new RestRequest(requestUrl, Method.GET); var response = client.Execute(request); if (response.StatusCode == HttpStatusCode.OK) { return(JsonConvert.DeserializeObject <TutorialResponse>(response.Content)); } else { throw new WebException($"Mission was not recieved. HttpStatusCode: {response.StatusCode}"); } }
public NextStep GetNextStep(TutorialQuery tutorialQuery) { return(GetMiniNavigatorContext(tutorialQuery).Steps.NextStep); }
public Mission GetMission(TutorialQuery tutorialQuery) { return(GetMiniNavigatorContext(tutorialQuery).Context.Mission); }