GithubHelp home page GithubHelp logo

ekamusapi-doc's Introduction

eKamus API Documentation

The eKamus API is a web scraping API designed to provide translation and definition services from Bahasa Malaysia (BM) to Chinese (CN) languages. This API scrapes data from the Ekamus website to retrieve word definitions and translations. Developers can utilize this API to integrate Bahasa Malaysia dictionary functionality into their applications.

API LIVE URL: https://ekamusapi.manho.xyz

Table of Contents

Getting Started

Prerequisites

To use the BM-CN Dictionary API, you'll need the following:

  • Node.js (version x.x.x or higher)
  • npm or yarn package manager

Installation

  1. Clone this repository to your local machine.
  2. Navigate to the project directory using your terminal.
  3. Install the required dependencies using either npm or yarn:
    npm install
    # or
    yarn install

Local Development

During development, you can run the API server locally:

  1. Ensure you're in the project directory.
  2. Start the API server: npm run dev

The API will be accessible at http://localhost:YOUR_PORT.

Usage

Endpoints

The API exposes the following endpoint:

  • GET /search

Parameters

The /search endpoint supports the following query parameter:

  • q: The word or phrase to search for in the dictionary.

Deployment to Vercel

You can easily deploy the BM-CN Dictionary API to Vercel:

  1. Sign up for an account on Vercel if you haven't already.
  2. Install the Vercel CLI
    npm install -g vercel
  3. Navigate to your project directory.
  4. Deploy your API using Vercel:
    vercel
  5. Follow the prompts and configure your deployment settings.

After successful deployment, your API will be accessible via the provided Vercel URL.

Examples

Here's an example of how to use the API:

GET /search?q=example

Response:

{
  "ok": true,
  "status": 200,
  "data": {
    "word": [
      {
        "bm": "kerja amali",
        "cn": "实践工作"
      },
      {
        "bm": "kerja amal",
        "cn": "慈善或义务工作"
      },
      ...
    ],
    "meanings": [
      "工作﹐操作﹐劳动"
    ]
  }
}

Contributing

We welcome contributions to the BM-CN Dictionary API. If you have suggestions for improvements, bug reports, or would like to add new features, feel free to submit a pull request.

Please read our Contribution Guidelines for more information.

License

This project is licensed under the MIT License.

Disclaimer: This documentation is provided as a template. You should tailor it to your project's specific details and requirements.

ekamusapi-doc's People

Contributors

manho30 avatar

Watchers

 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.