Giter Club home page Giter Club logo

backend-challenge-lemon's Introduction


Description

This project is a backend API developed using Node.js with TypeScript and Express. It utilizes Axios for making HTTP requests and Dotenv for managing environment variables. The API interacts with the Lemon API to retrieve item information based on search parameters.

Getting started

  1. Clone the repository:
git clone https://github.com/martinbobbio/backend-challenge-lemon
  1. Install dependencies
npm install
  1. Start the server
npm start
  1. The API will be accessible at http://localhost:3000/api.

Coin List + Search

  • URL: /api/coins
  • Method: GET
  • Description: Getting currencies list information from the Coingecko API based on search parameters.
  • Query Parameters:
    • search (Optional) This parameter is for a filter and searching in the API.
    • ids (Optional) This parameter is similar to the previous but only filter.
  • Body:
[
  {
  "ath": 1234.56,
  "ath_change_percentage": 12.34,
  "ath_date": "2022-01-01",
  "atl": 10.0,
  "atl_change_percentage": 50.0,
  "atl_date": "2022-01-01",
  "circulating_supply": 1000000,
  "current_price": 123.45,
  "fully_diluted_valuation": 9876543210,
  "high_24h": 130.0,
  "id": "bitcoin",
  "image": "https://example.com/bitcoin.png",
  "last_updated": "2022-01-01T12:34:56Z",
  "low_24h": 120.0,
  "market_cap": 1234567890,
  "market_cap_change_24h": 1234567,
  "market_cap_change_percentage_24h": 1.23,
  "market_cap_rank": 1,
  "max_supply": 21000000,
  "name": "Bitcoin",
  "price_change_24h": -5.67,
  "price_change_percentage_24h": -4.56,
  "roi": null,
  "symbol": "BTC",
  "total_supply": 21000000,
  "total_volume": 98765432
  },
  // ...
]

Coin Detail

  • URL: /api/coins/:id

  • Method: GET

  • Description: Getting item detail information from the Coingecko API based on the item ID.

  • Body:

{"id": "bitcoin",
  "symbol": "BTC",
  "name": "Bitcoin",
  "image": {
    "thumb": "https://example.com/bitcoin-thumb.png",
    "small": "https://example.com/bitcoin-small.png",
    "large": "https://example.com/bitcoin-large.png"
  },
  "description": {
    "en": "Description in English",
    "es": "Descripción en Español"
  },
  "market_data": {
    "ath": {
      "usd": 1234.56,
      "eur": 987.65
    },
    "atl": {
      "usd": 10.0,
      "eur": 7.89
    },
    "market_cap": {
      "usd": 1234567890,
      "eur": 987654321
    },
    "total_volume": {
      "usd": 98765432,
      "eur": 7654321
    },
    "current_price": {
      "usd": 123.45,
      "eur": 98.76
    },
    "price_change_percentage_24h": -4.56,
    "price_change_percentage_7d": -2.34,
    "price_change_percentage_30d": 1.23,
    "price_change_percentage_1y": 10.0,
    "market_cap_rank": 1
  }}

Scripts

  • npm start: Builds the TypeScript files and starts the server using node
  • npm start: Starts the server in development mode using nodemon.
  • npm run build: Builds the TypeScript files to the dist directory.

backend-challenge-lemon's People

Contributors

martinbobbio 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.