Click or drag to resize

HoarderServiceClient Class

A .NET client class for the Hoarder web service API. All methods, request bodies and response bodies are mapped to strongly-typed C# shared library classes.
Inheritance Hierarchy
System.Object
  Orthogonal.Hoarder.StdLib.HoarderServiceClient

Namespace: Orthogonal.Hoarder.StdLib
Assembly: Orthogonal.Hoarder.StdLib (in Orthogonal.Hoarder.StdLib.dll) Version: 8.0.9
Syntax
C#
public sealed class HoarderServiceClient : IDisposable

The HoarderServiceClient type exposes the following members.

Constructors
 NameDescription
Public methodHoarderServiceClient Constructs a strongly-typed .NET client to the Hoarder REST-style web service.
Top
Properties
 NameDescription
Public propertyServiceUri Gets the Uri of the base endpoint of the web service.
Public propertyToken Gets the authorization token (JSON Web Token) of the web service.
Top
Methods
 NameDescription
Public methodAddVisitorBookEntryAdds an entry to the visitor book.
Public methodAssignSourceAssigns a source title in a set of titles.
Public methodBulkAssignBulk assigns the property values of many Titles to the same values.
Public methodCheckApiKeyChecks an ApiKey to gain application permissions.
Public methodClearTitleGenresClears all genres from Titles with Ids that match an argument set of Ids.
Public methodDataFixup Performs a custom fixup (repair) of certain information in Titles, and then updates the configuration document to ensure it is synchronised with the Titles.
Public methodDeletePictureBlobDeletes a picture blob.
Public methodDeleteTitleDeletes a title.
Public methodDeleteWorkerLogDeletes a worker log.
Public methodDisposeReleases all resources used by the HoarderServiceClient
Public methodExportCollectionToJsonBlobStarts an export of the entire database to a JSON document in the backup container.
Public methodExportCollectionToXmlBlobStarts an export of the entire database to an XML document in the backup container.
Public methodExportToAzureTablesStarts an exports the entire database to Azure Tables in the backup storage account.
Public methodExportToTsvNormalisedStarts an export of the entire database to normalized TSV files in the backup container.
Public methodGetDatabaseStatsRetrieves database query statistics and performance information.
Public methodGetDatabaseSummaryRetreives a summary of the counts of different types and values in the database.
Public methodGetGlobalConfigReturns the Hoarder application suite configuration values.
Public methodGetMetadataLists metadata about the web service and the data manager.
Public methodGetWorkerLogLinesGets the lines of a specific worker log.
Public methodGlobalNameSearchRuns a global search for a string in Title titles, Picture names, Track names, File names and Contributor names.
Public methodListBlobVDirMetadataGets metadata for picture blobs with a virtual directory prefix -- WARNING LARGE RESPONSE BODY.
Public methodListContributorsInvertedGets an array of inverted contributors.
Public methodListDuplicateTitlesLists duplicate titles.
Public methodListPicMetaShortGets short metadata for picture blobs.
Public methodListPicturesInvertedGets an array of inverted pictures.
Public methodListRandomTitlesLists random titles.
Public methodListThumbMetaShortGets short metadata for picture blobs.
Public methodListTitleItems 
Public methodListTitles This is a special method to convert a previous POST into a new GET.
Public methodListTitlesByContributorNameLists titles containing a specified name as one of the contributors.
Public methodListTitlesByLegacyIdLists titles with a legacy Int32 Id from previous databases.
Public methodListTitlesByPictureBlobNameLists titles containing a specified blob name as one of the pictures.
Public methodListUniqueContributorNamesLists unique constributor names in all titles in the database.
Public methodListVisitorBookEntriesLists all visitor book entries.
Public methodListWorkerLogsLists the short blob names of all worker logs.
Public methodLoginConverts an API Key into a JWT.
Public methodPurgeGenrePurges a genre from the database and removes it from all titles.
Public methodReadBlobMetadataGets metadata attached to the picture blob.
Public methodReadConfigReads the Hoarder database configuration record.
Public methodReadGlobalConfigReturns the Hoarder application configuration.
Public methodReadTitleRetrieves a single title by Id.
Public methodRenameContributorRenames a contributor and all Title references to the contributor.
Public methodRenameLocationRenames a Location in all titles that reference the name.
Public methodRenameMediaRenames a Media in all titles that reference the name.
Public methodRenameOwnerRenames an Owner in all titles that reference the name.
Public methodRenameTagRenames a Tag in all titles that reference the name.
Public methodRepairMissingPhotosScans the Pictures references in Titles to see if they exist as a blob.
Public methodRepsertTitleReplaces or inserts a title.
Public methodSetPictureMetadataSets picture metadata.
Public methodUpdateConfigUpdates the Hoarder database configuration record.
Public methodUpdateTitleFromItemUpdates a title with values from a title list item.
Public methodUploadPictureUploads a picture.
Public methodUseCountGenreGets a count of titles with a specified genre name.
Public methodUseCountLocationGets a count of titles with a specified location name.
Public methodUseCountMediaGets a count of titles with a specified media name.
Public methodUseCountOwnerGets a count of titles with a specified owner name.
Public methodUseCountRoleGets a count of titles with a specified role name.
Public methodUseCountTagGets a count of titles with a specified tag name.
Top
Fields
 NameDescription
Public fieldStatic memberAuthHeaderName This is the name of the custom request header that the Hoarder web service recognises as providing an authorisation key to access features that update the database or retrieve private information. Failure to provide the key causes the service to redact selected private information from responses or reject some operations.
Top
Remarks

The Hoarder web service only returns response codes 200, 403 and 404. This client class handles these codes as follows:

200 (OK) Corresponds to a web service successful call. The type documented for the method is returned.
403 (Unauthorized) Corresponds to a service failure due to lack of authorization. A valid authorization token must be placed in the Token property for the call to succeed. The absence of an authorization token will cause some service calls to return redacted data, but some calls require the token and in these cases the 403 status code is converted into a UnauthorizedAccessException.
404 (NotFound) Only two service endpoints return status 404 (ReadTitle(String) and ReadBlobMetadata(String)), and in both cases the 404 is converted into a null return value indicating to the client caller that the requested data was not found.
Other Any other status code is interpreted as an unhandled error and it converted in to an Exception. The main causes of this condition might be a 'bug' in the Hoarder code or data, or an external problem such as a network failure that is unrelated to the Hoarder code.
See Also