Test

<back to all web services

GetChatHistory

The following routes are available for this service:
All Verbs/chathistory
namespace Test.ServiceInterface

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type ChatMessage() = 
        member val Id:Int64 = new Int64() with get,set
        member val Channel:String = null with get,set
        member val FromUserId:String = null with get,set
        member val FromName:String = null with get,set
        member val DisplayName:String = null with get,set
        member val Message:String = null with get,set
        member val UserAuthId:String = null with get,set
        member val Private:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type GetChatHistoryResponse() = 
        member val Results:ResizeArray<ChatMessage> = new ResizeArray<ChatMessage>() with get,set
        member val ResponseStatus:ResponseStatus = null with get,set

    [<AllowNullLiteral>]
    type GetChatHistory() = 
        member val Channels:String[] = [||] with get,set
        member val AfterId:Nullable<Int64> = new Nullable<Int64>() with get,set
        member val Take:Nullable<Int32> = new Nullable<Int32>() with get,set

F# GetChatHistory DTOs

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

HTTP + OTHER

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

POST /chathistory HTTP/1.1 
Host: test.servicestack.net 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"channels":["String"],"afterId":0,"take":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"results":[{"id":0,"channel":"String","fromUserId":"String","fromName":"String","displayName":"String","message":"String","userAuthId":"String","private":false}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}