ASH.ResourceLibrary.WebApi

<back to all web services

ResourceItemCompletionRequest

Requires Authentication
The following routes are available for this service:
GET/memberResourceCompletions/{MemberId}/{StartDate}/{EndDate}Retrieves all completion records of all types for the member and the given date range.
GET/memberResourceCompletions/{MemberId}/{StartDate}/{EndDate}/{ResourceType}Retrieves all completion records for the specified type and date range of the member.
GET/memberResourceCompletions/{MemberId}/{StartDate}/{EndDate}/{ResourceType}/{RetrievalAmount}Retrieves member completions based on date range and resource type. If no resource type is specified it will return all completions.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ASH.ResourceLibrary.Interfaces.ServiceModels;
using ASH.ResourceLibrary.Interfaces.Models;

namespace ASH.ResourceLibrary.Interfaces.Models
{
    public partial class ResourceItemCompletion
    {
        public virtual int ResourceCompletionId { get; set; }
        public virtual int ResourceProgressId { get; set; }
        public virtual int ProgressOnCompletion { get; set; }
        public virtual string ResourceId { get; set; }
        public virtual string ResourceName { get; set; }
        public virtual string ResourceType { get; set; }
        public virtual DateTime CompletionDate { get; set; }
    }

}

namespace ASH.ResourceLibrary.Interfaces.ServiceModels
{
    public partial class ResourceItemCompletionRequest
    {
        public virtual int MemberId { get; set; }
        public virtual DateTime StartDate { get; set; }
        public virtual DateTime EndDate { get; set; }
        public virtual string ResourceType { get; set; }
        public virtual int? RetrievalAmount { get; set; }
    }

    public partial class ResourceItemCompletionResponse
    {
        public ResourceItemCompletionResponse()
        {
            ResourceCompletions = new List<ResourceItemCompletion>{};
        }

        public virtual int MemberId { get; set; }
        public virtual DateTime StartDate { get; set; }
        public virtual DateTime EndDate { get; set; }
        public virtual int TotalCompletions { get; set; }
        public virtual int RetrievalAmount { get; set; }
        public virtual List<ResourceItemCompletion> ResourceCompletions { get; set; }
    }

}

C# ResourceItemCompletionRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /memberResourceCompletions/{MemberId}/{StartDate}/{EndDate} HTTP/1.1 
Host: resourcelibrary.api.ashcompanies.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"memberId":0,"startDate":"0001-01-01T00:00:00.0000000","endDate":"0001-01-01T00:00:00.0000000","totalCompletions":0,"retrievalAmount":0,"resourceCompletions":[{"resourceCompletionId":0,"resourceProgressId":0,"progressOnCompletion":0,"resourceId":"String","resourceName":"String","resourceType":"String","completionDate":"0001-01-01T00:00:00.0000000"}]}