Skip to content

Rust SDK: Implement client hierarchy and sub-clients #8182

@iamnamananand996

Description

@iamnamananand996

Description

Replace the basic client struct with a complete hierarchy of clients and sub-clients.

Current Implementation

pub struct ApiClient {
    client: Client,
    base_url: String,
}

Target Implementation

pub struct ApiClient {
    config: ClientConfig,
    users: UsersClient,
    orders: OrdersClient,
    payments: PaymentsClient,
    notifications: NotificationsClient,
}

pub struct UsersClient {
    http_client: HttpClient,
}

pub struct HttpClient {
    client: reqwest::Client,
    config: ClientConfig,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions