Table of Contents

Interface IRustMapsClient

Namespace
RustMapsApi.V4
Assembly
RustMapsApi.dll

A strongly-typed client for the RustMaps API v4.

public interface IRustMapsClient

Methods

CreateCustomMapAsync(CreateCustomMapRequest, CancellationToken)

Requests generation of a custom map from explicit settings.

Task<Result<MapGenerationStatus>> CreateCustomMapAsync(CreateCustomMapRequest request, CancellationToken cancellationToken = default)

Parameters

request CreateCustomMapRequest

The custom-map request.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Result<MapGenerationStatus>>

The generation status.

CreateCustomMapFromConfigAsync(CreateCustomMapFromConfigRequest, CancellationToken)

Requests generation of a custom map from a saved config.

Task<Result<MapGenerationStatus>> CreateCustomMapFromConfigAsync(CreateCustomMapFromConfigRequest request, CancellationToken cancellationToken = default)

Parameters

request CreateCustomMapFromConfigRequest

The custom-map-from-config request.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Result<MapGenerationStatus>>

The generation status.

CreateMapAsync(MapGenerationRequest, CancellationToken)

Requests generation of a standard map.

Task<Result<MapGenerationStatus>> CreateMapAsync(MapGenerationRequest request, CancellationToken cancellationToken = default)

Parameters

request MapGenerationRequest

The generation parameters.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Result<MapGenerationStatus>>

The generation status.

GetDefaultCustomConfigAsync(CancellationToken)

Gets the default custom-map configuration.

Task<Result<CustomMapSettings>> GetDefaultCustomConfigAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Result<CustomMapSettings>>

The default settings.

GetLimitsAsync(string?, CancellationToken)

Gets the current map-generation limits.

Task<Result<MapGenLimits>> GetLimitsAsync(string? orgId = null, CancellationToken cancellationToken = default)

Parameters

orgId string

The organisation to scope to, if any.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Result<MapGenLimits>>

The generation limits.

GetMapByIdAsync(string, CancellationToken)

Gets a map by its identifier.

Task<Result<MapInfo>> GetMapByIdAsync(string mapId, CancellationToken cancellationToken = default)

Parameters

mapId string

The map identifier.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Result<MapInfo>>

The map information.

GetMapBySeedAndSizeAsync(int, int, bool, CancellationToken)

Gets a procedural map by its size and seed.

Task<Result<MapInfo>> GetMapBySeedAndSizeAsync(int size, int seed, bool staging, CancellationToken cancellationToken = default)

Parameters

size int

The map size.

seed int

The map seed.

staging bool

Whether to query the staging branch.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Result<MapInfo>>

The map information.

GetMapByUrlAsync(string, CancellationToken)

Gets a map by its RustMaps URL.

Task<Result<MapInfo>> GetMapByUrlAsync(string url, CancellationToken cancellationToken = default)

Parameters

url string

The RustMaps map URL.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Result<MapInfo>>

The map information.

GetMapSettingsAsync(string, CancellationToken)

Gets the custom-map settings used to generate a map.

Task<Result<CustomMapSettings>> GetMapSettingsAsync(string mapId, CancellationToken cancellationToken = default)

Parameters

mapId string

The map identifier.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Result<CustomMapSettings>>

The settings tree.

GetSavedConfigsAsync(CancellationToken)

Gets the caller's saved custom-map configs.

Task<Result<IReadOnlyList<MapSettings>>> GetSavedConfigsAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Result<IReadOnlyList<MapSettings>>>

The saved, named configs.

SearchAsync(SearchQuery, int, SearchOptions?, string?, CancellationToken)

Searches maps using a structured query.

Task<Result<IReadOnlyList<MapThumbnail>>> SearchAsync(SearchQuery query, int page, SearchOptions? options = null, string? orgId = null, CancellationToken cancellationToken = default)

Parameters

query SearchQuery

The search query.

page int

The zero-based page index.

options SearchOptions

Optional query parameters.

orgId string

The organisation to scope to, if any.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Result<IReadOnlyList<MapThumbnail>>>

The matching map thumbnails.

SearchByFilterAsync(string, int, SearchOptions?, string?, CancellationToken)

Searches maps using a saved filter.

Task<Result<IReadOnlyList<MapThumbnail>>> SearchByFilterAsync(string filterId, int page, SearchOptions? options = null, string? orgId = null, CancellationToken cancellationToken = default)

Parameters

filterId string

The saved filter identifier.

page int

The zero-based page index.

options SearchOptions

Optional query parameters.

orgId string

The organisation to scope to, if any.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Result<IReadOnlyList<MapThumbnail>>>

The matching map thumbnails.

UploadMapAsync(MapUpload, CancellationToken)

Uploads a pre-generated map save file.

Task<Result<UploadedMap>> UploadMapAsync(MapUpload upload, CancellationToken cancellationToken = default)

Parameters

upload MapUpload

The upload payload.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Result<UploadedMap>>

The uploaded map.