1.6.0 โ€ข Published 2 months ago

@odg/axios v1.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

codecov Stargazers Made by ODGodinho Forks Repository size GitHub last commit License StyleCI

Table of Contents


๐ŸŽ‡ Benefits

  • ๐Ÿš€ Speed performance Inversion of control
  • ๐Ÿšจ Code Quality
  • ๐ŸŽ‡ Use Interface
  • ๐Ÿงช Teste with 100% coverage

๐Ÿ“— Libraries

๐Ÿ“ Dependencies

โฉ Get Started


๐Ÿ”˜ Installation

yarn add @odg/message @odg/axios axios

๐Ÿ’ป Usage

For simple example usage, you can use Inversify for Dependency Injection

import { type MessageInterface, type ResponseInterface } from "@odg/message";

class Test {

    public constructor(
        private readonly requester: MessageInterface
    ) {
    }

    public async example(): Promise<ResponseInterface<
      unknown, // Reques Body
      Record<string, unknown>, // Response Body
    >> {
        return this.requester.request({
            url: "https://api.github.com/users/ODGodinho",
        });
    }

}
const test = new Test(new AxiosMessage({
  // default options axios
}));

console.log(await test.example());

๐Ÿ“ Start Project

First install dependencies with the following command

yarn install
# or
npm install

๐Ÿ“จ Build and Run

To build the project, you can use the following command

if you change files, you need to run yarn build and yarn start again

yarn build && yarn start
# or
yarn dev

๐Ÿงช Teste Code

To Test execute this command

yarn test
# or
yarn test:watch
1.6.0

2 months ago

1.2.0

10 months ago

1.5.1

7 months ago

1.5.0

8 months ago

1.4.0

8 months ago

1.3.0

9 months ago

1.2.1

10 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago