(token, path)
| 55 | const API_URL = 'https://api.bitbucket.org/2.0/'; |
| 56 | |
| 57 | function get(token, path) { |
| 58 | return fetch(`${API_URL}${path}`, { |
| 59 | headers: { |
| 60 | Authorization: `Bearer ${token}`, |
| 61 | }, |
| 62 | }).then(r => r.json()); |
| 63 | } |
| 64 | |
| 65 | function post(token, path, body) { |
| 66 | return fetch(`${API_URL}${path}`, { |
no outgoing calls
no test coverage detected