GithubHelp home page GithubHelp logo

narainsagar / coingecko_api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.22 MB

Laravel REST API and Artisan command that fetches data from Coingecko API and stores it in a database.

PHP 98.67% JavaScript 0.64% Blade 0.69%
artisan-command coingecko-api laravel laravel-framework

coingecko_api's Introduction

CoinGecko-API

This project is built with Laravel v10.10.0 and PHP v8.2.5.

About the project:

Simple artisan command that fetches data from the provided Coingecko API endpoint and stores it in a database.

Coingecko API Documentation: https://www.coingecko.com/en/api/documentation

Requirements

Make sure you have PHP and composer installed and configured on your system.

Setup and Running

# download/setup the project on your machine.
$ git clone https://github.com/narainsagar/coingecko_api.git

$ cd /projects/coingecko-api

# install required packages
$ composer install

# create databases and run migrations.
$ php artisan migrate


# Run the artisan command to fetch data from coingecko api and store into db.
$ php artisan fetch:coingecko


# Run the app - Check the Live API and all coins data via below mentioned API endpoints.
$ php artisan serve 

$ php artisan serve command will run the app and expose to http://127.0.0.1:8000/ address by default

You may also try below API endpoinds to see the data right in favourite web browser or API client.

GET http://127.0.0.1:8000/api/coins

GET http://127.0.0.1:8000/api/coins/{coin_id}

What's more

Sample database schema script could be found in db_schema.sql

Demo screenshots

Data Fetch and stored in DB using command

$ php artisan fetch:coingecko

img

Running app in browser

$ php artisan serve -- GET http://127.0.0.1:8000/

img

/api/coins

$ php artisan serve -- GET http://127.0.0.1:8000/api/coins

img

/api/coins/0chain

$ php artisan serve -- GET http://127.0.0.1:8000/api/coins/0chain

img

About me...

Narain M.

coingecko_api's People

Contributors

narainsagar avatar

Stargazers

Vlad K 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.