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-07-07T21:01:13.0766645Z",
      "emailConfirmed": true
    }
  ],
  "groups": [
    {
      "imagePath": "an example string.",
      "name": "an example string.",
      "hasPassword": true,
      "ownerId": "an example string.",
      "id": 0,
      "hasTimer": true,
      "conversationCreateTime": "2020-07-07T21:01:13.0769114Z"
    }
  ],
  "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-07-07T21:01:13.0794574Z",
        "emailConfirmed": true
      },
      "targetId": "an example string.",
      "createTime": "2020-07-07T21:01:13.0796152Z",
      "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-07-07T21:01:13.0871329Z",
      "emailConfirmed": true
    }
  ],
  "groups": [
    {
      "imagePath": "an example string.",
      "name": "an example string.",
      "hasPassword": true,
      "ownerId": "an example string.",
      "id": 0,
      "hasTimer": true,
      "conversationCreateTime": "2020-07-07T21:01:13.0873256Z"
    }
  ],
  "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-07-07T21:01:13.0890782Z",
        "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-07-07T21:01:13.0967119Z",
    "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-07-07T21:01:13.098203Z",
      "emailConfirmed": true
    },
    "targetId": "an example string.",
    "createTime": "2020-07-07T21:01:13.0983445Z",
    "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!"
}