hevy 0.1.0

An async Rust client library for the Hevy public API (https://api.hevyapp.com/docs/)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use hevy::HevyClient;
use wiremock::MockServer;

/// The fake API key used by all integration tests.
pub const TEST_API_KEY: &str = "test-api-key-1234";

/// Starts a fresh mock HTTP server for a test.
pub async fn mock_server() -> MockServer {
    MockServer::start().await
}

/// Builds a [`HevyClient`] pointed at the given mock server.
pub fn client_for(server: &MockServer) -> HevyClient {
    HevyClient::with_base_url(TEST_API_KEY, server.uri())
}