Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 551 Bytes

README.md

File metadata and controls

34 lines (23 loc) · 551 Bytes

@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