Friendship

Catalog


GET Mine

Request path:

https://staging.server.kahla.app/Friendship/Mine

Request example:

https://staging.server.kahla.app/Friendship/Mine

Try

Possible Response:

{
  "users": [
    {
      "markEmailPublic": true,
      "themeId": 0,
      "email": "an example string.",
      "enableEmailNotification": true,
      "enableEnterToSendMessage": true,
      "enableInvisiable": true,
      "listInSearchResult": true,
      "isOnline": 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": "2020-09-26T00:31:27.7738203Z",
      "emailConfirmed": true
    }
  ],
  "groups": [
    {
      "imagePath": "an example string.",
      "name": "an example string.",
      "hasPassword": true,
      "ownerId": "an example string.",
      "id": 0,
      "hasTimer": true,
      "conversationCreateTime": "2020-09-26T00:31:27.7742177Z"
    }
  ],
  "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 Delete friend

Request path:

https://staging.server.kahla.app/Friendship/DeleteFriend

Request example:

https://staging.server.kahla.app/Friendship/DeleteFriend?id=yourid

Request content type:

application/x-www-form-urlencoded

Form content example:

id=yourid 

Request form:

Name Required Type
id Required Text

Possible Response:

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

Possible Response:

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

POST Create request

Request path:

https://staging.server.kahla.app/Friendship/CreateRequest

Request example:

https://staging.server.kahla.app/Friendship/CreateRequest?id=yourid

Request content type:

application/x-www-form-urlencoded

Form content example:

id=yourid 

Request form:

Name Required Type
id Required Text

Possible Response:

{
  "value": 0,
  "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 Complete request

Request path:

https://staging.server.kahla.app/Friendship/CompleteRequest

Request example:

https://staging.server.kahla.app/Friendship/CompleteRequest?Id=0&Accept=false

Request content type:

application/x-www-form-urlencoded

Form content example:

Id=0&Accept=false 

Request form:

Name Required Type
Id Required Number
Accept Required Boolean

Possible Response:

{
  "value": 0,
  "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 My requests

Request path:

https://staging.server.kahla.app/Friendship/MyRequests

Request example:

https://staging.server.kahla.app/Friendship/MyRequests

Try

Possible Response:

{
  "items": [
    {
      "id": 0,
      "creatorId": "an example string.",
      "creator": {
        "markEmailPublic": true,
        "themeId": 0,
        "email": "an example string.",
        "enableEmailNotification": true,
        "enableEnterToSendMessage": true,
        "enableInvisiable": true,
        "listInSearchResult": true,
        "isOnline": 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": "2020-09-26T00:31:27.7773588Z",
        "emailConfirmed": true
      },
      "targetId": "an example string.",
      "createTime": "2020-09-26T00:31:27.7833212Z",
      "completed": 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 Search everything

Request path:

https://staging.server.kahla.app/Friendship/SearchEverything

Request example:

https://staging.server.kahla.app/Friendship/SearchEverything?SearchInput=yourSearchInput&Take=0

Try

Request arguments:

Name Required Type
SearchInput Required Text
Take Required Number

Possible Response:

{
  "usersCount": 0,
  "groupsCount": 0,
  "users": [
    {
      "markEmailPublic": true,
      "themeId": 0,
      "email": "an example string.",
      "enableEmailNotification": true,
      "enableEnterToSendMessage": true,
      "enableInvisiable": true,
      "listInSearchResult": true,
      "isOnline": 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": "2020-09-26T00:31:27.7852832Z",
      "emailConfirmed": true
    }
  ],
  "groups": [
    {
      "imagePath": "an example string.",
      "name": "an example string.",
      "hasPassword": true,
      "ownerId": "an example string.",
      "id": 0,
      "hasTimer": true,
      "conversationCreateTime": "2020-09-26T00:31:27.7855375Z"
    }
  ],
  "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 Discover friends

Request path:

https://staging.server.kahla.app/Friendship/DiscoverFriends

Request example:

https://staging.server.kahla.app/Friendship/DiscoverFriends?take=0

Try

Request arguments:

Name Required Type
take Not required Number

Possible Response:

{
  "items": [
    {
      "commonFriends": 0,
      "commonGroups": 0,
      "sentRequest": true,
      "targetUser": {
        "markEmailPublic": true,
        "themeId": 0,
        "email": "an example string.",
        "enableEmailNotification": true,
        "enableEnterToSendMessage": true,
        "enableInvisiable": true,
        "listInSearchResult": true,
        "isOnline": 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": "2020-09-26T00:31:27.7940286Z",
        "emailConfirmed": 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 User detail

Request path:

https://staging.server.kahla.app/Friendship/UserDetail

Request example:

https://staging.server.kahla.app/Friendship/UserDetail?id=yourid

Try

Request arguments:

Name Required Type
id Required Text

Possible Response:

{
  "user": {
    "markEmailPublic": true,
    "themeId": 0,
    "email": "an example string.",
    "enableEmailNotification": true,
    "enableEnterToSendMessage": true,
    "enableInvisiable": true,
    "listInSearchResult": true,
    "isOnline": 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": "2020-09-26T00:31:27.7961203Z",
    "emailConfirmed": true
  },
  "areFriends": true,
  "sentRequest": true,
  "pendingRequest": {
    "id": 0,
    "creatorId": "an example string.",
    "creator": {
      "markEmailPublic": true,
      "themeId": 0,
      "email": "an example string.",
      "enableEmailNotification": true,
      "enableEnterToSendMessage": true,
      "enableInvisiable": true,
      "listInSearchResult": true,
      "isOnline": 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": "2020-09-26T00:31:27.8035729Z",
      "emailConfirmed": true
    },
    "targetId": "an example string.",
    "createTime": "2020-09-26T00:31:27.8037486Z",
    "completed": true
  },
  "conversationId": 0,
  "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 Report him

Request path:

https://staging.server.kahla.app/Friendship/ReportHim

Request example:

https://staging.server.kahla.app/Friendship/ReportHim?TargetUserId=yourTargetUserId&Reason=yourReason

Request content type:

application/x-www-form-urlencoded

Form content example:

TargetUserId=yourTargetUserId&Reason=yourReason 

Request form:

Name Required Type
TargetUserId Required Text
Reason Required Text

Possible Response:

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

Possible Response:

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