HackerRankKit

0.8.1

An unofficial Swift client for the HackerRank for Work REST API, with typed models and a no-network mock backend.
adamtheturtle/HackerRankKit

What's New

0.8.1

2026-08-20T11:01:20Z

Corrections from verifying the 0.8.0 wire guesses against a live HackerRank account. Call sites that already matched the live service need no changes; call sites that relied on the wrong behaviour will start seeing the real contract.

What the live pass changed

  • Test.startTime / endTime read the live keys start_time / end_time (and still accept the schema's starttime / endtime). Writes continue to send the schema spelling, which the server accepts and echoes back underscored.
  • Team.interviewerCount is restored — live team rows still send interviewer_count even though the published schema omits it.
  • SCIMUserWriteRequest.emails encode as SCIM multi-valued objects ([{"value": …, "primary": …}]). Plain strings are rejected by the live SCIM service with HTTP 400.
  • SCIM calls go to https://services.hackerrank.com/scim/v2 by default. www.hackerrank.com/Users serves the web app, not the JSON API. The in-process mock keeps both bases on the mock host.

What the live pass confirmed

attempt_events arrive as objects, candidate questions are keyed by question id, sections are an array of objects, code-stub allowedLanguages want comma-joined API ids such as c,clojure, replace_interviewers must default to true when a list is supplied, and the richer candidate-detail additional_fields default is an acceptable size trade-off.

See UPGRADING.md for the full notes.

What's Changed

Full Changelog: 0.8.0...0.8.1

HackerRankKit

An unofficial Swift client for the HackerRank for Work REST API, with typed models and a no-network mock backend.

Documentation | Swift Package Index

Installation

.package(url: "https://github.com/adamtheturtle/HackerRankKit.git", from: "0.8.0")

Releases before 0.8.0 modelled a wire contract that did not match the API, so 0.8.0 is the earliest version worth starting from. Upgrading from an earlier one? See UPGRADING.md.

Add HackerRankKit to your app target and HackerRankKitMock to tests or demos that should run without the network.

Products

  • HackerRankKit: Typed API client for tests, candidates, questions, interviews, users, teams, and the audit log.
  • HackerRankKitMock: In-process fake API seeded with canned data.

Usage

import HackerRankKit

let client = HackerRankClient(token: "your-personal-access-token")

let tests = try await client.testsPage()
// `duration`, `roleIDs`, and `experience` are required by the create API alongside the name.
let created = try await client.createTest(
    name: "Phone screen",
    duration: 60,
    roleIDs: ["backend-engineer"],
    experience: ["Senior"]
)

Requirements

  • Swift 6.2+
  • macOS 15+, iOS 18+, tvOS 18+, watchOS 11+, or visionOS 2+

License

MIT. See LICENSE.

Description

  • Swift Tools 6.2.0
View More Packages from this Author

Dependencies

Last updated: Sun Aug 23 2026 09:17:27 GMT-0900 (Hawaii-Aleutian Daylight Time)