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
requestCreateCustomMapRequestThe custom-map request.
cancellationTokenCancellationTokenA 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
requestCreateCustomMapFromConfigRequestThe custom-map-from-config request.
cancellationTokenCancellationTokenA 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
requestMapGenerationRequestThe generation parameters.
cancellationTokenCancellationTokenA 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
cancellationTokenCancellationTokenA 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
orgIdstringThe organisation to scope to, if any.
cancellationTokenCancellationTokenA 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
mapIdstringThe map identifier.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
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
sizeintThe map size.
seedintThe map seed.
stagingboolWhether to query the staging branch.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
GetMapByUrlAsync(string, CancellationToken)
Gets a map by its RustMaps URL.
Task<Result<MapInfo>> GetMapByUrlAsync(string url, CancellationToken cancellationToken = default)
Parameters
urlstringThe RustMaps map URL.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
GetMapSettingsAsync(string, CancellationToken)
Gets the custom-map settings used to generate a map.
Task<Result<CustomMapSettings>> GetMapSettingsAsync(string mapId, CancellationToken cancellationToken = default)
Parameters
mapIdstringThe map identifier.
cancellationTokenCancellationTokenA 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
cancellationTokenCancellationTokenA 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
querySearchQueryThe search query.
pageintThe zero-based page index.
optionsSearchOptionsOptional query parameters.
orgIdstringThe organisation to scope to, if any.
cancellationTokenCancellationTokenA 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
filterIdstringThe saved filter identifier.
pageintThe zero-based page index.
optionsSearchOptionsOptional query parameters.
orgIdstringThe organisation to scope to, if any.
cancellationTokenCancellationTokenA 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
uploadMapUploadThe upload payload.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
- Task<Result<UploadedMap>>
The uploaded map.