# HubsManager
Reach these methods through the `hubs` field on `client::Client`.
## list
`GET /hubs`
| `query` | query | `String` | no |
| `scope` | query | `String` | no |
| `sort` | query | `String` | no |
| `direction` | query | `GetDirection` | no |
| `marker` | query | `String` | no |
| `limit` | query | `i64` | no |
**Returns:** `Hubs`
**Example**
```rust
let mut pages = client.hubs.list(None);
while let Some(item) = pages.next().await {
// use item
}
```
Paginated — `list(...)` returns a paginator you drive with `.next().await`, threading the cursor for you. See the [pagination guide](../pagination.md).
## create
`POST /hubs`
**Request body** (`application/json`): `HubCreateRequest`
**Returns:** `Hub`
**Example**
```rust
let result = client.hubs.create(schemas::HubCreateRequest { /* … */ }).await?;
```
## list_enterprise
`GET /enterprise_hubs`
| `query` | query | `String` | no |
| `sort` | query | `String` | no |
| `direction` | query | `GetDirection` | no |
| `marker` | query | `String` | no |
| `limit` | query | `i64` | no |
**Returns:** `Hubs`
**Example**
```rust
let mut pages = client.hubs.list_enterprise(None);
while let Some(item) = pages.next().await {
// use item
}
```
Paginated — `list_enterprise(...)` returns a paginator you drive with `.next().await`, threading the cursor for you. See the [pagination guide](../pagination.md).
## get
`GET /hubs/{hub_id}`
| `hub_id` | path | `String` | yes |
**Returns:** `Hub`
**Example**
```rust
let result = client.hubs.get("HUB_ID".to_string()).await?;
```
## update
`PUT /hubs/{hub_id}`
| `hub_id` | path | `String` | yes |
**Request body** (`application/json`): `HubUpdateRequest`
**Returns:** `Hub`
**Example**
```rust
let result = client.hubs.update("HUB_ID".to_string(), schemas::HubUpdateRequest { /* … */ }).await?;
```
## delete
`DELETE /hubs/{hub_id}`
| `hub_id` | path | `String` | yes |
**Returns:** no content
**Example**
```rust
client.hubs.delete("HUB_ID".to_string()).await?;
```
## copy
`POST /hubs/{hub_id}/copy`
| `hub_id` | path | `String` | yes |
**Request body** (`application/json`): `HubCopyRequest`
**Returns:** `Hub`
**Example**
```rust
let result = client.hubs.copy("HUB_ID".to_string(), schemas::HubCopyRequest { /* … */ }).await?;
```