Skip to content

Commit 4c36247

Browse files
author
JW Wesson
committed
updates for SuggestSkillsFromProfessions
1 parent 162ab17 commit 4c36247

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

src/main/java/com/sovren/SovrenClient.java

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,13 +1678,15 @@ public CompareSkillsToProfessionResponse compareSkillsToProfessions(
16781678
* Suggests skills related to given professions. The service returns salient skills that are strongly associated with the professions.
16791679
* @param professionCodeIds The code IDs of the professions to suggest skills for.
16801680
* @param limit The maximum amount of suggested skills returned. The maximum amount allowed is 10. If not sure what value should be, provide 10 as default limit.
1681+
* @param outputLanguage The language to use for the returned descriptions. If not provided, no descriptions are returned. Must be one of the supported <a href="https://sovren.com/technical-specs/latest/rest-api/data-enrichment/overview/#skills-languages">ISO code</a>
16811682
* @return The API response body
16821683
* @throws SovrenException Thrown when an API error occurs
16831684
*/
1684-
public SuggestSkillsResponse suggestSkillsFromProfessions(List<Integer> professionCodeIds, int limit) throws SovrenException {
1685+
public SuggestSkillsResponse suggestSkillsFromProfessions(List<Integer> professionCodeIds, int limit, String outputLanguage) throws SovrenException {
16851686
SuggestSkillsFromProfessionsRequest request = new SuggestSkillsFromProfessionsRequest();
16861687
request.ProfessionCodeIds = professionCodeIds;
16871688
request.Limit = limit;
1689+
request.OutputLanguage = outputLanguage;
16881690

16891691
RequestBody body = createJsonBody(request);
16901692
Request apiRequest = new Request.Builder()
@@ -1699,21 +1701,22 @@ public SuggestSkillsResponse suggestSkillsFromProfessions(List<Integer> professi
16991701
/**
17001702
* Suggests skills related to given professions. The service returns salient skills that are strongly associated with the professions.
17011703
* @param professionCodeIds The code IDs of the professions to suggest skills for.
1704+
* @param outputLanguage The language to use for the returned descriptions. If not provided, no descriptions are returned. Must be one of the supported <a href="https://sovren.com/technical-specs/latest/rest-api/data-enrichment/overview/#skills-languages">ISO code</a>
17021705
* @return The API response body
17031706
* @throws SovrenException Thrown when an API error occurs
17041707
*/
1705-
public SuggestSkillsResponse suggestSkillsFromProfessions(List<Integer> professionCodeIds) throws SovrenException {
1706-
return suggestSkillsFromProfessions(professionCodeIds, 10);
1708+
public SuggestSkillsResponse suggestSkillsFromProfessions(List<Integer> professionCodeIds, String outputLanguage) throws SovrenException {
1709+
return suggestSkillsFromProfessions(professionCodeIds, 10, outputLanguage);
17071710
}
17081711

17091712
/**
17101713
* Suggests skills related to a resume based on the recent professions in the resume.
17111714
* @param resume The resume to suggest skills for (based on the professions in the resume).
1712-
* @param limit The maximum amount of suggested skills returned. The maximum amount allowed is 10. If not sure what value should be, provide 10 as default limit.
1715+
* @param outputLanguage The language to use for the returned descriptions. If not provided, no descriptions are returned. Must be one of the supported <a href="https://sovren.com/technical-specs/latest/rest-api/data-enrichment/overview/#skills-languages">ISO code</a>
17131716
* @return The API response body
17141717
* @throws SovrenException Thrown when an API error occurs
17151718
*/
1716-
public SuggestSkillsResponse suggestSkillsFromProfessions(ParsedResume resume, int limit) throws SovrenException {
1719+
public SuggestSkillsResponse suggestSkillsFromProfessions(ParsedResume resume, String outputLanguage) throws SovrenException {
17171720
if(resume != null && resume.EmploymentHistory != null && resume.EmploymentHistory.Positions != null){
17181721
List<Integer> normalizedProfs = new ArrayList<Integer>();
17191722
for(Position position: resume.EmploymentHistory.Positions){
@@ -1723,7 +1726,7 @@ public SuggestSkillsResponse suggestSkillsFromProfessions(ParsedResume resume, i
17231726
}
17241727

17251728
if (normalizedProfs.size() > 0){
1726-
return suggestSkillsFromProfessions(normalizedProfs,limit);
1729+
return suggestSkillsFromProfessions(normalizedProfs, outputLanguage);
17271730
}
17281731
}
17291732
throw new IllegalArgumentException("No professions were found in the resume, or the resume was parsed without professions normalization enabled");
@@ -1736,22 +1739,22 @@ public SuggestSkillsResponse suggestSkillsFromProfessions(ParsedResume resume, i
17361739
* @throws SovrenException Thrown when an API error occurs
17371740
*/
17381741
public SuggestSkillsResponse suggestSkillsFromProfessions(ParsedResume resume) throws SovrenException {
1739-
return suggestSkillsFromProfessions(resume, 10);
1742+
return suggestSkillsFromProfessions(resume, null);
17401743
}
17411744

17421745
/**
17431746
* Suggests skills related to a job based on the profession title in the job.
17441747
* @param job The resume to suggest skills for (based on the professions in the resume).
1745-
* @param limit The maximum amount of suggested skills returned. The maximum amount allowed is 10. If not sure what value should be, provide 10 as default limit.
1748+
* @param outputLanguage The language to use for the returned descriptions. If not provided, no descriptions are returned. Must be one of the supported <a href="https://sovren.com/technical-specs/latest/rest-api/data-enrichment/overview/#skills-languages">ISO code</a>
17461749
* @return The API response body
17471750
* @throws SovrenException Thrown when an API error occurs
17481751
*/
1749-
public SuggestSkillsResponse suggestSkillsFromProfessions(ParsedJob job, int limit) throws SovrenException {
1752+
public SuggestSkillsResponse suggestSkillsFromProfessions(ParsedJob job, String outputLanguage) throws SovrenException {
17501753
if(job != null && job.JobTitles != null && job.JobTitles.NormalizedProfession != null && job.JobTitles.NormalizedProfession.Profession != null && job.JobTitles.NormalizedProfession.Profession.CodeId != null){
17511754
List<Integer> ids = new ArrayList<Integer>();
17521755
ids.add(job.JobTitles.NormalizedProfession.Profession.CodeId);
17531756

1754-
return suggestSkillsFromProfessions(ids,limit);
1757+
return suggestSkillsFromProfessions(ids, outputLanguage);
17551758
}
17561759
throw new IllegalArgumentException("No professions were found in the job, or the job was parsed without professions normalization enabled");
17571760
}
@@ -1763,7 +1766,7 @@ public SuggestSkillsResponse suggestSkillsFromProfessions(ParsedJob job, int lim
17631766
* @throws SovrenException Thrown when an API error occurs
17641767
*/
17651768
public SuggestSkillsResponse suggestSkillsFromProfessions(ParsedJob job) throws SovrenException {
1766-
return suggestSkillsFromProfessions(job, 10);
1769+
return suggestSkillsFromProfessions(job, null);
17671770
}
17681771

17691772
/**

src/main/java/com/sovren/models/api/dataenrichment/ontology/request/SuggestProfessionsRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ public class SuggestProfessionsRequest {
1515
public boolean ReturnMissingSkills = false;
1616
/** The maximum amount of professions returned. If not specified this parameter defaults to 10. */
1717
public int Limit = 10;
18+
/** The language to use for the returned descriptions. */
19+
public String OutputLanguage;
1820
}

src/main/java/com/sovren/models/api/dataenrichment/ontology/request/SuggestSkillsFromProfessionsRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ public class SuggestSkillsFromProfessionsRequest {
1313
public List<Integer> ProfessionCodeIds;
1414
/** The maximum amount of suggested skills returned. If not specified this parameter defaults to 10. This limit cannot exceed 10. */
1515
public int Limit = 10;
16+
/** The language to use for the returned descriptions. */
17+
public String OutputLanguage;
1618
}

src/main/java/com/sovren/models/api/dataenrichment/ontology/response/SkillScore.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ public class SkillScore {
1111
public float Score;
1212
/** The ID of the skill in the skills taxonomy. */
1313
public String Id;
14+
/** The description of the skill in the Skills Taxonomy. Will only be returned if OutputLanguage is specified in the request. This has no effect in a request body. */
15+
public String Description;
1416
}

0 commit comments

Comments
 (0)