public Item_Tracking_Details Get_Item_Tracking_Work_History(string BibID, string VID, Custom_Tracer Tracer)
{
// Add a beginning trace
Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_Tracking_Work_History", "Get work history for an item by bibid/vid");
// Look in the cache
if (Config.UseCache)
{
Item_Tracking_Details fromCache = CachedDataManager.Items.Retrieve_Item_Tracking(BibID, VID, Tracer);
if (fromCache != null)
{
Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_Tracking_Work_History", "Found work history on the local cache");
return fromCache;
}
}
// Get the endpoint
MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Items.GetItemTrackingWorkHistory", Tracer);
// Format the URL
string url = String.Format(endpoint.URL, BibID, VID);
// Call out to the endpoint and deserialize the object
Item_Tracking_Details returnValue = Deserialize<Item_Tracking_Details>(url, endpoint.Protocol, Tracer);
// Add to the local cache
if ((Config.UseCache) && (returnValue != null))
{
Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_Tracking_Work_History", "Store work history on the local cache");
CachedDataManager.Items.Store_Item_Tracking(BibID, VID, returnValue, Tracer);
}
// Return the object
return returnValue;
}