Conversation

Catalog


GET Authorize All

Request path:

https://staging.server.kahla.app/Conversation/AllTry

Request example:

https://staging.server.kahla.app/Conversation/All

Possible Response:

{
  "items": [
    {
      "displayName": "an example string.",
      "displayImagePath": "an example string.",
      "latestMessage": "an example string.",
      "latestMessageTime": "2019-11-18T21:00:45.9607706Z",
      "unReadAmount": 0,
      "conversationId": 0,
      "discriminator": "an example string.",
      "userId": "an example string.",
      "aesKey": "an example string.",
      "muted": true,
      "someoneAtMe": true
    }
  ],
  "code": 0,
  "message": "an example string."
}

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

GET Authorize Get message

Request path:

https://staging.server.kahla.app/Conversation/GetMessageTry

Request example:

https://staging.server.kahla.app/Conversation/GetMessage?id=0&take=0&skipFrom=yourskipFrom

Request arguments:

Name Required Type
id Required Number
take Not required Number
skipFrom Not required Text

Possible Response:

{
  "items": [
    {
      "id": "f1ce110b-1848-4628-91b5-dfb79ab9be5a",
      "conversationId": 0,
      "ats": [
        {
          "targetUserId": "an example string."
        }
      ],
      "senderId": "an example string.",
      "sender": {
        "makeEmailPublic": true,
        "themeId": 0,
        "email": "an example string.",
        "enableEmailNotification": true,
        "enableEnterToSendMessage": true,
        "id": "an example string.",
        "bio": "an example string.",
        "nickName": "an example string.",
        "sex": "an example string.",
        "iconFilePath": "an example string.",
        "preferedLanguage": "an example string.",
        "accountCreateTime": "2019-11-18T21:00:45.9630464Z",
        "emailConfirmed": true
      },
      "sendTime": "2019-11-18T21:00:45.9631525Z",
      "content": "an example string.",
      "read": true
    }
  ],
  "code": 0,
  "message": "an example string."
}

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

POST Authorize Send message

Request path:

https://staging.server.kahla.app/Conversation/SendMessage

Request content type:

application/x-www-form-urlencoded

Form content example:

Id=0&Content=yourContent&At[0]=yourAt&At[1]=yourAt&At[2]=yourAt&MessageId=yourMessageId&RecordTime=01/01/2018 

Request form:

Name Required Type
Id Required Number
Content Required Text
At Not required Text Collection
MessageId Required Text
RecordTime Required DateTime

Possible Response:

{
  "value": {
    "id": "12c7fb9b-5e3e-4a9e-992a-a392889afeab",
    "conversationId": 0,
    "ats": [
      {
        "targetUserId": "an example string."
      }
    ],
    "senderId": "an example string.",
    "sender": {
      "makeEmailPublic": true,
      "themeId": 0,
      "email": "an example string.",
      "enableEmailNotification": true,
      "enableEnterToSendMessage": true,
      "id": "an example string.",
      "bio": "an example string.",
      "nickName": "an example string.",
      "sex": "an example string.",
      "iconFilePath": "an example string.",
      "preferedLanguage": "an example string.",
      "accountCreateTime": "2019-11-18T21:00:45.9654003Z",
      "emailConfirmed": true
    },
    "sendTime": "2019-11-18T21:00:45.9654938Z",
    "content": "an example string.",
    "read": true
  },
  "code": 0,
  "message": "an example string."
}

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

GET Authorize Conversation detail

Request path:

https://staging.server.kahla.app/Conversation/ConversationDetailTry

Request example:

https://staging.server.kahla.app/Conversation/ConversationDetail?id=0

Request arguments:

Name Required Type
id Required Number

Possible Response:

{
  "value": {
    "requesterId": "an example string.",
    "requestUser": {
      "makeEmailPublic": true,
      "themeId": 0,
      "email": "an example string.",
      "enableEmailNotification": true,
      "enableEnterToSendMessage": true,
      "id": "an example string.",
      "bio": "an example string.",
      "nickName": "an example string.",
      "sex": "an example string.",
      "iconFilePath": "an example string.",
      "preferedLanguage": "an example string.",
      "accountCreateTime": "2019-11-18T21:00:45.9688015Z",
      "emailConfirmed": true
    },
    "targetId": "an example string.",
    "targetUser": {
      "makeEmailPublic": true,
      "themeId": 0,
      "email": "an example string.",
      "enableEmailNotification": true,
      "enableEnterToSendMessage": true,
      "id": "an example string.",
      "bio": "an example string.",
      "nickName": "an example string.",
      "sex": "an example string.",
      "iconFilePath": "an example string.",
      "preferedLanguage": "an example string.",
      "accountCreateTime": "2019-11-18T21:00:45.9697046Z",
      "emailConfirmed": true
    },
    "anotherUserId": "an example string.",
    "id": 0,
    "discriminator": "an example string.",
    "aesKey": "an example string.",
    "maxLiveSeconds": 0,
    "conversationCreateTime": "2019-11-18T21:00:45.9698312Z",
    "displayName": "an example string.",
    "displayImagePath": "an example string."
  },
  "code": 0,
  "message": "an example string."
}

Possible Response:

{
  "value": {
    "users": [
      {
        "id": 0,
        "joinTime": "2019-11-18T21:00:45.9767078Z",
        "muted": true,
        "userId": "an example string.",
        "user": {
          "makeEmailPublic": true,
          "themeId": 0,
          "email": "an example string.",
          "enableEmailNotification": true,
          "enableEnterToSendMessage": true,
          "id": "an example string.",
          "bio": "an example string.",
          "nickName": "an example string.",
          "sex": "an example string.",
          "iconFilePath": "an example string.",
          "preferedLanguage": "an example string.",
          "accountCreateTime": "2019-11-18T21:00:45.9775354Z",
          "emailConfirmed": true
        },
        "groupId": 0,
        "readTimeStamp": "2019-11-18T21:00:45.9776893Z"
      }
    ],
    "groupImagePath": "an example string.",
    "groupName": "an example string.",
    "hasPassword": false,
    "ownerId": "an example string.",
    "id": 0,
    "discriminator": "an example string.",
    "aesKey": "an example string.",
    "maxLiveSeconds": 0,
    "conversationCreateTime": "2019-11-18T21:00:45.9778878Z",
    "displayName": "an example string.",
    "displayImagePath": "an example string."
  },
  "code": 0,
  "message": "an example string."
}

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

POST Authorize Update message life time

Request path:

https://staging.server.kahla.app/Conversation/UpdateMessageLifeTime

Request content type:

application/x-www-form-urlencoded

Form content example:

Id=0&NewLifeTime=0 

Request form:

Name Required Type
Id Required Number
NewLifeTime Required Number

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}