app-outlet/app-outlet

View on GitHub
core/repository/flathub/FlathubRepository.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
const axios = require('axios');

const FLATHUB_API = 'https://flathub.org/api/v1/apps';

function getApps() {
    return axios.get(FLATHUB_API).then((response) => response.data);
}

function getAppDetails(app) {
    return axios
        .get(`${FLATHUB_API}/${app.flatpakAppId}`)
        .then((response) => response.data);
}

module.exports = {
    FLATHUB_API,
    getApps,
    getAppDetails,
};