{"size": 386, "ext": "js", "max_stars_repo_path": "src/services/device.js", "max_stars_repo_name": "kieyooo/ni-fronted", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/services/device.js", "max_issues_repo_name": "kieyooo/ni-fronted", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/services/device.js", "max_forks_repo_name": "kieyooo/ni-fronted", "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": 25.7333333333, "max_line_length": 60, "alphanum_fraction": 0.707253886}
import request from '@/utils/requestWithCookie';

export async function getDevices() {
  return request('GET /api/api/devices', {});
}

export async function getDevicesById(payload) {
  const { id, size = 1 } = payload;
  return request(`GET /api/api/devices/${id}?size=${size}`);
}

export async function getDevicesCollection() {
  return request('GET /api/api/devices/collection');
}
