ez-api-wrapper
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -14,2 +14,1 @@ const apiClient = require('../apiClient'); | ||
}; | ||
@@ -1,5 +0,13 @@ | ||
import { fetchData } from '../apiClient.js'; | ||
const apiClient = require('../apiClient'); | ||
export async function fetchUsers() { | ||
return fetchData('/users'); | ||
async function fetchUsers() { | ||
try { | ||
return await apiClient.fetchData('/users'); | ||
} catch (error) { | ||
throw new Error(`Error fetching users: ${error.message}`); | ||
} | ||
} | ||
module.exports = { | ||
fetchUsers | ||
}; |
{ | ||
"name": "ez-api-wrapper", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Wrapper for an API: If there's an API you frequently use, you could create a wrapper for it that simplifies the process of making requests and handling responses. This could be for anything from weather data to social media APIs.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50048
210