Coder Social home page Coder Social logo

oms-api's Introduction

oms-api

The OMS API package comes with prebuilt methods that helps communicate with HotWax Commerce OMS using Rest API

Build Notes (Users)

  1. Download the package from release page and extract it.
  2. Go to the package directory.
  3. Run following command to download dependencies
    npm i
  4. Build the package using npm run build

Build Notes (Contributors)

  1. Open a Terminal window.
  2. Clone package using the command: git clone https://github.com/hotwax/oms-api.git <repository-name>
  3. Go to the directory using command: cd <repository-name>
  4. Run following command to download dependencies npm i
  5. Build the package using npm run build

Usage

  1. Install OMS API package in the application using npm
npm i @hotwax/oms-api
  1. Define init method on app load that will be used to set the initial configuration for the package.

    Note: In case of vue project, you can define it inside mounted hook in App.vue file

import { init } from '@hotwax/oms-api'
...
...
init(token, instanceURL, cacheAge)
  1. Add following method calls to clear the token and instance url when app unmounts. Also, you can use the same method whenever user logout from the app.

    Note: In case of vue project, you can define it inside unmounted hook in App.vue file

import { resetConfig } from '@hotwax/oms-api'
...
...
resetConfig()
  1. Update the token or instance URL whenever needed by using the following methods:
  • updateToken: For updating the token value
  • updateInstanceUrl: For updating the instanceURL / backendURL.
  1. Now you can use any method from the package by directly importing it from @hotwax/oms-api

Contribution Guideline

  1. Fork the repository and clone it locally from the main branch. Before starting your work make sure it's up to date with current main branch.
  2. Pick an issue from here. Write in the issue comment that you want to pick it, if you can't assign yourself. Please stay assigned to one issue at a time to not block others.
  3. Create a branch for your edits. Use the following branch naming conventions: oms-api/issue-number.
  4. Please add issue number to your commit message.
  5. Propose a Pull Request to main branch containing issue number and issue title.
  6. Use Pull Request template (it's automatically added to each PR) and fill as much fields as possible to describe your solution.
  7. Reference any relevant issues or other information in your PR.
  8. Wait for review and adjust your PR according to it.
  9. Congrats! Your PR should now be merged in!

If you can't handle some parts of the issue then please ask for help in the comment. If you have any problems during the implementation of some complex issue, feel free to implement just a part of it.

Report a bug or request a feature

Always define the type of issue:

  • Bug report
  • Feature request

While writing issues, please be as specific as possible. All requests regarding support with implementation or application setup should be sent to.

Join the community on Discord

If you have any questions or ideas feel free to join our Discord channel

The license

Oms-api is completely free and released under the Apache v2.0 License. Check LICENSE for more details.

oms-api's People

Contributors

ymaheshwari1 avatar adityasharma7 avatar k2maan avatar ravilodhi avatar azkyakhan avatar dixitdeepak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.