{"id":22886769,"url":"https://github.com/evolutionjobs/evolution-stepstone","last_synced_at":"2025-03-31T19:12:29.242Z","repository":{"id":38103837,"uuid":"245405813","full_name":"EvolutionJobs/Evolution-StepStone","owner":"EvolutionJobs","description":"Evolution's API for connecting to StepStone's service","archived":false,"fork":false,"pushed_at":"2022-12-08T09:52:14.000Z","size":47,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-06T23:28:57.398Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EvolutionJobs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-06T11:45:38.000Z","updated_at":"2024-06-09T17:40:04.000Z","dependencies_parsed_at":"2023-01-25T06:15:41.866Z","dependency_job_id":null,"html_url":"https://github.com/EvolutionJobs/Evolution-StepStone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvolutionJobs%2FEvolution-StepStone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvolutionJobs%2FEvolution-StepStone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvolutionJobs%2FEvolution-StepStone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvolutionJobs%2FEvolution-StepStone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvolutionJobs","download_url":"https://codeload.github.com/EvolutionJobs/Evolution-StepStone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523874,"owners_count":20791444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T20:27:44.383Z","updated_at":"2025-03-31T19:12:29.213Z","avatar_url":"https://github.com/EvolutionJobs.png","language":"C#","readme":"# Evolution-StepStone\n\n![.NET Core](https://github.com/EvolutionJobs/Evolution-StepStone/workflows/.NET%20Core/badge.svg)\n\nEvolution's DI library for connecting to V6.17.1 StepStone's Federated Candidate Search API.\n\nThis is a preview API and is not ready for production release.\n\n## How to set up\n\nAdd a config section holding the connection details for the StepStone brand to `appsettings.json`:\n\n```json\n\"StepStone\": [\n    {\n        \"Name\":              \"Optional, fallback to Url\",\n        \"Url\":               \"https://recruiter.{StepStone brand site}\",\n        \"ClientID\":          \"████████-████-████-████-████████████\",\n        \"ClientSecret\":      \"████████-████-████-████-████████████\",\n        \"RecruiterUsername\": \"████████\",\n        \"RecruiterPassword\": \"████████\"\n    },\n    ...\n]\n```\n\nThis can then be added using the standard Dependency Injection pattern in `Startup.cs`:\n\n```c#\npublic void ConfigureServices(IServiceCollection services)\n{\n     ...\n     services.AddStepStoneService(\"MyAppName\", this.Configuration.GetSection(\"StepStone\"));\n```\n\nThis can then be referenced as a DI service: `[FromServices] IStepStoneService stepStone`\n\n## How to use\n\nAssuming you have the DI instance `IStepStoneService stepStone`...\n\n### Authenticate\nFirst you need to get the authentication token:\n\n```c#\n// Authenticate a new token, the username and key are your internal ones\nvar token = await stepStone.Authenticate(\"your username\", \"your session key\");\n```\n\nThis token can be re-used for up to `token.Expires` in seconds.\n\nThis token will hold the keys for all the services configured and is unique to the user, it should not be shared between users.\n\nThe username and session key are passed in the header for every request - they can be anything, but should uniquely identify the application user.\n\n#### Authentication Errors\n\nAuthentication can time out and will throw a `StepStoneAuthenticationException` if a request is made with an outdated token.\n\nWrap calls to the API in a `try-catch` to handle this:\n\n```c#\nFunc\u003cStepStoneToken\u003e action = /* Action calling StepStone API */;\n\ntry { return await action(token) }\ncatch (StepStoneAuthenticationException authEx)\n{\n    logger.LogError(authEx, \"Authentication exception, getting a new token.\");\n\n    // Clear the old token and get a new one\n    var newToken = await this.StepStoneToken(user);\n\n    // Save this new token\n \n    // Try again with a new token, but don't wrap in try-catch again\n    return await action(newToken);\n}\n```\n\nDon't use this pattern for the `Authenticate` method, as in that context `StepStoneAuthenticationException` means your credentials are incorrect.\n\n### Quotas\nTo check a quota pass the token and the name (if configured) or the `https://recruiter.{StepStone brand site}`:\n\n```c#\nvar quota = await stepStone.Quota(token, \"brand name\");\n```\n\n### Run a search\nBuild a [`SearchRequest`](Models/SearchRequest.cs) with the details of the search, then call:\n\n```c#\nSearchRequest request = /* Build search request object */;\n\nvar searchResults = await stepStone.Search(token, \"brand name\", request);\n// OR, the last 2 flags are optional\nvar searchResults = await stepStone.Search(token, \"brand name\", request, includeFacets, includeCandidatesActivity);\n\nint resultCount = searchResults.TotalResultsCount;\n\n// If includeFacets: true passed to Search\nvar facets = searchResults.Facets;\n\nforeach(var candidate in searchResults.Candidates) {\n    // Unique ID to get the candidate's contact details or CV\n    var id = candidate.Id;\n}\n```\n\nThe `Search` method will attempt to resolve invalid requests, for instance if you pass a salary filter and a salary facet the facet will be removed. When these validation changes are made the `ILoggerFactory` will log a warning.\n\nThe results will include anonymised candidates, and you can use the `Id` property to fetch the full version.\n\n### Get a candidate\n\nThere are two methods, `Candidate` gets the same structure as search, but with contact details, `CV` gets the CV  file as a collection of `byte`:\n\n```c#\nvar candidate = await stepStone.Candidate(token, \"brand name\", id);\nvar cv = await stepStone.CV(token, \"brand name\", id);\n```\n\nCalling either of these will reduce quota by one unless the candidate is already recently purchased.\n\n### Exceptions\n\nThree kinds of expected exceptions can be thrown:\n\n- `StepStoneAuthenticationException` if thrown by `Authenticate` this means invalid credentials, otherwise it means the current token has expired.\n- `StepStoneServiceException` issues with the service or gateway, generally 500 status errors.\n- `StepStoneSearchException` issues with the search request object, containing the response message from the API.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevolutionjobs%2Fevolution-stepstone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevolutionjobs%2Fevolution-stepstone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevolutionjobs%2Fevolution-stepstone/lists"}