{"size": 605, "ext": "js", "max_stars_repo_path": "client/src/services/friends.js", "max_stars_repo_name": "dtgritman/Fitness-App", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/services/friends.js", "max_issues_repo_name": "dtgritman/Fitness-App", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/services/friends.js", "max_forks_repo_name": "dtgritman/Fitness-App", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.8095238095, "max_line_length": 92, "alphanum_fraction": 0.6429752066}
import { api } from "./serverApi";

export function get(handle) {
    return api("users/friends/" + handle, {}, 'POST');
}

export function search(handle, q) {
    return api("users/friends/" + handle + "/" + q, {}, 'POST');
}

export function find(q) {
    return api("users/friends/find/" + q, null, 'GET');
}

export function add(userHandle, followUserHandle) {
    return api("users/friends/add/" + userHandle + "/" + followUserHandle, {}, 'POST');
}

export function remove(userHandle, followUserHandle) {
    return api("users/friends/remove/" + userHandle + "/" + followUserHandle, {}, 'DELETE');
}