add way more friend shit (#815)

This commit is contained in:
Gus Caplan
2016-10-22 15:25:55 -05:00
committed by Schuyler Cebulskie
parent 9f7c630796
commit 422b90c711
9 changed files with 106 additions and 3 deletions

View File

@@ -658,6 +658,24 @@ class RESTMethods {
}).catch(reject);
});
}
blockUser(user) {
return new Promise((resolve, reject) => {
this.rest.makeRequest('put', `${Constants.Endpoints.relationships('@me')}/${user.id}`, true, { type: 2 })
.then(() => {
resolve(user);
}).catch(reject);
});
}
unblockUser(user) {
return new Promise((resolve, reject) => {
this.rest.makeRequest('delete', `${Constants.Endpoints.relationships('@me')}/${user.id}`, true)
.then(() => {
resolve(user);
}).catch(reject);
});
}
}
module.exports = RESTMethods;