Friends
Friend will include friend list, check friend with the user, or mute friend in the same chat room
Common Parameters
Key
Type
Description
friendId
String
id of the user
List Friends
Request
GET /v1/friends/5/0 HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 6552e9dd1f835ac7ca4ba3ec
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "6552e9dd1f835ac7ca4ba3ec");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://friend-dev.api.mimiland.io/v1/friends/5/0", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
My Total Friend
Request
GET /v1/friends/me/total HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 653263627f60e4b804d97d04
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");
const requestOptions = {
method: "DELETE",
headers: myHeaders,
redirect: "follow"
};
fetch("https://friend-dev.api.mimiland.io/v1/friends/650ad43dd995b4f348455ce5", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
Total Friend
Request
GET /v1/friends/total/d90c77f7 HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI8
mm-user-id: 653263627f60e4b804d97d04
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://friend-dev.api.mimiland.io/v1/friends/total/d90c77f7", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
Friend Is
Request// Some code
POST /v1/friends/is HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 653263627f60e4b804d97d04
Content-Length: 51
{
"friendId": "6552e9dd1f835ac7ca4ba3ec",
//"friendIdInWorld":"da8d4eb7"
}
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://friend-dev.api.mimiland.io/v1/friends/total/d90c77f7", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
Mute Friend
Request
POST /v1/friends/mute HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 653263627f60e4b804d97d04
Content-Length: 51
{
"friendId": "650ad48a7f60e4b804d96bcf"
}
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");
const raw = JSON.stringify({
"friendId": "650ad48a7f60e4b804d96bcf"
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://friend-dev.api.mimiland.io/v1/friends/mute", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
Unmute Friend
Request
POST /v1/friends/unmute HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 653263627f60e4b804d97d04
Content-Length: 51
{
"friendId": "656ff4c6e7d43c7ad3e1a1aa"
}
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");
const raw = JSON.stringify({
"friendId": "656ff4c6e7d43c7ad3e1a1aa"
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://friend-dev.api.mimiland.io/v1/friends/unmute", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
Unfriend
Request
DELETE /v1/friends/650ad43dd995b4f348455ce5 HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 653263627f60e4b804d97d04
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");
const requestOptions = {
method: "DELETE",
headers: myHeaders,
redirect: "follow"
};
fetch("https://friend-dev.api.mimiland.io/v1/friends/650ad43dd995b4f348455ce5", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
Last updated