| GET | /api/object/{ObjectId}/reads |
|---|
namespace Eros.Saguna.Common.WebAPIModel.Models
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type ObjectAccessModel() =
///<summary>
///Object Access Read Id.
///</summary>
[<ApiMember(Description="Object Access Read Id.", Name="ObjectReadId")>]
member val ObjectReadId:Guid = new Guid() with get,set
///<summary>
///Object Id viewing the specified Object.
///</summary>
[<ApiMember(Description="Object Id viewing the specified Object.", IsRequired=true, Name="ViewingObjectId")>]
member val ViewingObjectId:Guid = new Guid() with get,set
///<summary>
///Name of the object viewing the specified Object.
///</summary>
[<ApiMember(Description="Name of the object viewing the specified Object.", Name="ViewingObjectName")>]
member val ViewingObjectName:String = null with get,set
///<summary>
///Name of the object viewing the specified Object.
///</summary>
[<ApiMember(Description="Name of the object viewing the specified Object.", Name="ViewingObjectPrimaryImageUrl")>]
member val ViewingObjectPrimaryImageUrl:String = null with get,set
///<summary>
///Id of the object being viewed.
///</summary>
[<ApiMember(Description="Id of the object being viewed.", IsRequired=true, Name="ViewedObjectId")>]
member val ViewedObjectId:Guid = new Guid() with get,set
///<summary>
///Name of the object being viewed.
///</summary>
[<ApiMember(Description="Name of the object being viewed.", Name="ViewedObjectName")>]
member val ViewedObjectName:String = null with get,set
///<summary>
///Date and Time of object read
///</summary>
[<ApiMember(Description="Date and Time of object read", Name="TimeRead")>]
member val TimeRead:Nullable<DateTime> = new Nullable<DateTime>() with get,set
///<summary>
///Date and Time object started watching the specified object.
///</summary>
[<ApiMember(Description="Date and Time object started watching the specified object.", Name="TimeStartWatching")>]
member val TimeStartWatching:Nullable<DateTime> = new Nullable<DateTime>() with get,set
///<summary>
///Date and Time of object being flagged.
///</summary>
[<ApiMember(Description="Date and Time of object being flagged.", Name="Flagged")>]
member val Flagged:DateTime = new DateTime() with get,set
[<ApiResponse(Description="Returns the reads (object access) to the specified object.")>]
[<AllowNullLiteral>]
type GetObjectReadsResponse() =
member val ObjectReads:ResizeArray<ObjectAccessModel> = null with get,set
member val ResponseStatus:ResponseStatus = null with get,set
///<summary>
///Get reads (object access) for the specified object.
///</summary>
[<Api(Description="Get reads (object access) for the specified object.")>]
[<AllowNullLiteral>]
type GetObjectReads() =
///<summary>
///Object Id to get object access reads for
///</summary>
[<ApiMember(DataType="Guid", Description="Object Id to get object access reads for", IsRequired=true, Name="ObjectId")>]
member val ObjectId:Guid = new Guid() with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/object/{ObjectId}/reads HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"ObjectReads":[{"ObjectReadId":"00000000-0000-0000-0000-000000000000","ViewingObjectId":"00000000-0000-0000-0000-000000000000","ViewingObjectName":"String","ViewingObjectPrimaryImageUrl":"String","ViewedObjectId":"00000000-0000-0000-0000-000000000000","ViewedObjectName":"String","TimeRead":"0001-01-01T00:00:00.0000000","TimeStartWatching":"0001-01-01T00:00:00.0000000","Flagged":"0001-01-01T00:00:00.0000000"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}