SobekCM.Core.Client.SobekEngineClient_ItemEndpoints.Get_Item_Tracking_Work_History C# (CSharp) Method

Get_Item_Tracking_Work_History() public method

Gets the work history for a single digital resource item
public Get_Item_Tracking_Work_History ( string BibID, string VID, Custom_Tracer Tracer ) : Item_Tracking_Details
BibID string Bibliographic identifier (BibID) for the digital resource
VID string Volume identifier (VID) for the digital resource
Tracer SobekCM.Tools.Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
return SobekCM.Core.Items.Item_Tracking_Details
        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;
        }