/// <summary> /// Create a Matching UI session to score one or more target documents against a source job /// </summary> /// <param name="sovClient">The SovrenClient</param> /// <param name="sourceJob">The source job</param> /// <param name="targetDocuments">The target resumes/jobs</param> /// <param name="preferredWeights"> /// The preferred category weights for scoring the results. If none are provided, /// Sovren will determine the best values based on the source job /// </param> /// <param name="settings">Settings to be used for this scoring request</param> /// <typeparam name="TTarget">Either <see cref="ParsedResumeWithId"/> or <see cref="ParsedJobWithId"/></typeparam> /// <exception cref="SovrenException">Thrown when an API error occurs</exception> public static async Task <GenerateUIResponse> BimetricScore <TTarget>( this SovrenClientWithUI sovClient, ParsedJobWithId sourceJob, List <TTarget> targetDocuments, CategoryWeights preferredWeights = null, SearchMatchSettings settings = null) where TTarget : IParsedDocWithId { BimetricScoreJobRequest request = sovClient.InternalClient.CreateRequest(sourceJob, targetDocuments, preferredWeights, settings); UIBimetricScoreJobRequest uiRequest = new UIBimetricScoreJobRequest(request, sovClient.UISessionOptions); return(await sovClient.InternalClient.UIBimetricScore(uiRequest)); }
/// <summary> /// Create a Matching UI session to view a single job from a Bimetric Score API response /// </summary> /// <param name="sovClient">The SovrenClient</param> /// <param name="bimetricResponse">The Bimetric Score API response containing the result you want to view</param> /// <param name="job">The specific job/id in the result set that you want to view</param> /// <param name="sourceDocType">The type of document this result was scored against</param> /// <param name="htmlJob">Optionally, the HTML job to display in the details view</param> /// <exception cref="SovrenException">Thrown when an API error occurs</exception> public static async Task <GenerateUIResponse> ViewDetails( this SovrenClientWithUI sovClient, BimetricScoreResponseValue bimetricResponse, ParsedJobWithId job, Models.Matching.IndexType sourceDocType, string htmlJob = null) { BimetricScoreJobDetails details = new BimetricScoreJobDetails { Result = bimetricResponse.Matches.Single(m => m.Id == job.Id), AppliedCategoryWeights = bimetricResponse.AppliedCategoryWeights, JobData = job.JobData, SourceDocumentType = sourceDocType, HtmlDocument = htmlJob }; UIBimetricScoreJobDetailsRequest uiRequest = new UIBimetricScoreJobDetailsRequest(details, sovClient.UISessionOptions?.UIOptions); return(await sovClient.InternalClient.UIViewDetails(uiRequest)); }
static TestBase() { Credentials data = JsonSerializer.Deserialize <Credentials>(File.ReadAllText("credentials.json")); GeocodeCredentials = new GeocodeCredentials() { Provider = GeocodeProvider.Google, ProviderKey = data.GeocodeProviderKey }; Client = new SovrenClient(data.AccountId, data.ServiceKey, new DataCenter("https://staging-rest.resumeparsing.com", "v10", true)); ParseResumeResponseValue parseResumeResponseValue = Client.ParseResume(new ParseRequest(TestData.Resume)).Result.Value; TestParsedResume = parseResumeResponseValue.ResumeData; parseResumeResponseValue = Client.ParseResume(new ParseRequest(TestData.ResumeWithAddress)).Result.Value; TestParsedResumeWithAddress = parseResumeResponseValue.ResumeData; ParseJobResponseValue parseJobResponseValue = Client.ParseJob(new ParseRequest(TestData.JobOrder)).Result.Value; TestParsedJob = parseJobResponseValue.JobData; parseJobResponseValue = Client.ParseJob(new ParseRequest(TestData.JobOrderWithAddress)).Result.Value; TestParsedJobWithAddress = parseJobResponseValue.JobData; parseJobResponseValue = Client.ParseJob(new ParseRequest(TestData.JobOrderTech)).Result.Value; TestParsedJobTech = parseJobResponseValue.JobData; TestParsedJobWithId = new ParsedJobWithId() { Id = "1", JobData = TestParsedJob }; TestParsedResumeWithId = new ParsedResumeWithId() { Id = "1", ResumeData = TestParsedResume }; }