1.0.1 ā¢ Published 7 months ago
@tutur17449/json-placeholder-sdk v1.0.1
@tutur17449/json-server-sdk
š Work around https://jsonplaceholder.typicode.com/ š
Installation
yarn add @tutur17449/json-server-sdk
Usage
import { jsonPlaceholderApi } from '@tutur17449/json-placeholder-sdk';
await jsonPlaceholderApi.posts.getbyId(1);
await jsonPlaceholderApi.posts.getAll(new URLSearchParams({ userId: '1' }));
await jsonPlaceholderApi.posts.update(1, {
title: 'foo',
});
await jsonPlaceholderApi.posts.create({
title: 'foo',
body: 'bar',
userId: 1,
id: 1,
});
License
MIT