Class RAiDService
public class RAiDService : IRAiDService
- Inheritance
-
RAiDService
- Implements
- Inherited Members
Constructors
RAiDService(HttpClient, IOptions<RAiDServiceOptions>, ILogger<RAiDService>)
public RAiDService(HttpClient httpClient, IOptions<RAiDServiceOptions> options, ILogger<RAiDService> logger)
Parameters
httpClient
HttpClientoptions
IOptions<RAiDServiceOptions>logger
ILogger<RAiDService>
Methods
CreateServicePointAsync(RAiDServicePointCreateRequest)
POST /service-point/ Creates a new ServicePoint.
public Task<RAiDServicePoint?> CreateServicePointAsync(RAiDServicePointCreateRequest createRequest)
Parameters
createRequest
RAiDServicePointCreateRequest
Returns
FindAllPublicRaidsAsync()
GET /raid/all-public List all public RAiDs.
public Task<List<RAiDDto>?> FindAllPublicRaidsAsync()
Returns
FindAllRaidsAsync(IEnumerable<string>?, string?, string?)
GET /raid/ List RAiDs (with optional query params).
public Task<List<RAiDDto>?> FindAllRaidsAsync(IEnumerable<string>? includeFields = null, string? contributorId = null, string? organisationId = null)
Parameters
includeFields
IEnumerable<string>contributorId
stringorganisationId
string
Returns
FindAllServicePointsAsync()
GET /service-point/ Returns all ServicePoints.
public Task<List<RAiDServicePoint>?> FindAllServicePointsAsync()
Returns
FindAllUpgradableAsync()
GET /upgradable/all Returns a list of RAiDs that are upgradable.
public Task<List<RAiDDto>?> FindAllUpgradableAsync()
Returns
FindRaidByNameAndVersionAsync(string, string, int)
GET /raid/{prefix}/{suffix}/{version} Read a RAiD at a specific version number.
public Task<object?> FindRaidByNameAndVersionAsync(string prefix, string suffix, int version)
Parameters
Returns
FindRaidByNameAsync(string, string)
GET /raid/{prefix}/{suffix} Read a specific RAiD by prefix/suffix.
public Task<RAiDDto?> FindRaidByNameAsync(string prefix, string suffix)
Parameters
Returns
FindServicePointByIdAsync(long)
GET /service-point/{id} Retrieve a ServicePoint by ID.
public Task<RAiDServicePoint?> FindServicePointByIdAsync(long id)
Parameters
id
long
Returns
GetRaidHistoryAsync(string, string)
GET /raid/{prefix}/{suffix}/history Returns JSON patch change history for the RAiD.
public Task<List<RAiDChange>?> GetRaidHistoryAsync(string prefix, string suffix)
Parameters
Returns
GetRaidPermissionsAsync(string, string)
GET /raid/{prefix}/{suffix}/permissions Retrieve RAiD permissions.
public Task<RAiDPermissionsDto?> GetRaidPermissionsAsync(string prefix, string suffix)
Parameters
Returns
MintRaidAsync(RAiDCreateRequest)
POST /raid/ Mint (create) a new RAiD.
public Task<RAiDDto?> MintRaidAsync(RAiDCreateRequest createRequest)
Parameters
createRequest
RAiDCreateRequest
Returns
PatchRaidAsync(string, string, RAiDPatchRequest)
PATCH /raid/{prefix}/{suffix} Patch a RAiD.
public Task<RAiDDto?> PatchRaidAsync(string prefix, string suffix, RAiDPatchRequest patchRequest)
Parameters
prefix
stringsuffix
stringpatchRequest
RAiDPatchRequest
Returns
SetBearerToken(string)
Sets the bearer token for all subsequent requests. Call this before calling other methods if authentication is required.
public void SetBearerToken(string bearerToken)
Parameters
bearerToken
string
SetUsernameAndPassword(string, string)
Sets the username and password for authentication. Call this before calling other methods if authentication is required.
public Task SetUsernameAndPassword(string username, string password)
Parameters
Returns
UpdateRaidAsync(string, string, RAiDUpdateRequest)
PUT /raid/{prefix}/{suffix} Update a RAiD.
public Task<RAiDDto?> UpdateRaidAsync(string prefix, string suffix, RAiDUpdateRequest updateRequest)
Parameters
prefix
stringsuffix
stringupdateRequest
RAiDUpdateRequest
Returns
UpdateServicePointAsync(long, RAiDServicePointUpdateRequest)
PUT /service-point/{id} Update a ServicePoint by ID.
public Task<RAiDServicePoint?> UpdateServicePointAsync(long id, RAiDServicePointUpdateRequest updateRequest)
Parameters
id
longupdateRequest
RAiDServicePointUpdateRequest
Returns
UpgradeRaidAsync(RAiDUpdateRequest)
POST /upgrade Upgrades a RAiD, returning the updated RAiDDto.
public Task<RAiDDto?> UpgradeRaidAsync(RAiDUpdateRequest updateRequest)
Parameters
updateRequest
RAiDUpdateRequest