Interface IRAiDService
Service to interact with the RAiD API.
public interface IRAiDService
Methods
CreateServicePointAsync(RAiDServicePointCreateRequest)
POST /service-point/ Creates a new ServicePoint.
Task<RAiDServicePoint?> CreateServicePointAsync(RAiDServicePointCreateRequest createRequest)
Parameters
createRequest
RAiDServicePointCreateRequest
Returns
FindAllPublicRaidsAsync()
GET /raid/all-public List all public RAiDs.
Task<List<RAiDDto>?> FindAllPublicRaidsAsync()
Returns
FindAllRaidsAsync(IEnumerable<string>?, string?, string?)
GET /raid/ List RAiDs (with optional query params).
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.
Task<List<RAiDServicePoint>?> FindAllServicePointsAsync()
Returns
FindAllUpgradableAsync()
GET /upgradable/all Returns a list of RAiDs that are upgradable.
Task<List<RAiDDto>?> FindAllUpgradableAsync()
Returns
FindRaidByNameAndVersionAsync(string, string, int)
GET /raid/{prefix}/{suffix}/{version} Read a RAiD at a specific version number.
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.
Task<RAiDDto?> FindRaidByNameAsync(string prefix, string suffix)
Parameters
Returns
FindServicePointByIdAsync(long)
GET /service-point/{id} Retrieve a ServicePoint by ID.
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.
Task<List<RAiDChange>?> GetRaidHistoryAsync(string prefix, string suffix)
Parameters
Returns
GetRaidPermissionsAsync(string, string)
GET /raid/{prefix}/{suffix}/permissions Retrieve RAiD permissions.
Task<RAiDPermissionsDto?> GetRaidPermissionsAsync(string prefix, string suffix)
Parameters
Returns
MintRaidAsync(RAiDCreateRequest)
POST /raid/ Mint (create) a new RAiD.
Task<RAiDDto?> MintRaidAsync(RAiDCreateRequest createRequest)
Parameters
createRequest
RAiDCreateRequest
Returns
PatchRaidAsync(string, string, RAiDPatchRequest)
PATCH /raid/{prefix}/{suffix} Patch a RAiD.
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.
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.
Task SetUsernameAndPassword(string username, string password)
Parameters
Returns
UpdateRaidAsync(string, string, RAiDUpdateRequest)
PUT /raid/{prefix}/{suffix} Update a RAiD.
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.
Task<RAiDServicePoint?> UpdateServicePointAsync(long id, RAiDServicePointUpdateRequest updateRequest)
Parameters
id
longupdateRequest
RAiDServicePointUpdateRequest
Returns
UpgradeRaidAsync(RAiDUpdateRequest)
POST /upgrade Upgrades a RAiD, returning the updated RAiDDto.
Task<RAiDDto?> UpgradeRaidAsync(RAiDUpdateRequest updateRequest)
Parameters
updateRequest
RAiDUpdateRequest