Skip to content

faizaniqbalLC/sdk-library-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sdknow1

Installing sdknow1

With NPM:

$ npm install sdknow1

You can install Node.js easily with NVM or ASDF.

Sdk-now1 is a software-development-kit for getting a single post by id,getAllPosts,and createPost in jsonplaceholder api with a built-in load balancer.

Use case ( How you can use this package )

import Typicode from "sdknow1";
const client = new Typicode({
  apiKey: "123",
});

client.getPosts().then((res) => {
  // this code shall show you all jsonplaceholder posts
  console.log(res);
});
client.getPostById(1).then((res) => {
  // this function shall show you only post according to id that you passed.
  console.log(res);
});

client
  .createPost({
    title: "fizanTest",
    body: "This testing phase is going well.",
    userId: 1,
  })
  .then((p) => {
    console.log(`Created new post with id ${p.id}`);
    // this function shall createPost according to passed data
  });

About

Sdk by Typescript for fetching json placeholder posts and posts by id

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published