upcoming_mobiles_api

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 10 Imported by: 0

README

upcoming_mobiles_api (UpMob API)

UpMob API scraps 91mobiles.com to get devices information which are yet to be released in the Indian market and stores it in a postgres db

API

Fetch all upcoming devices

  • URL

    /devices

  • Method

    GET

  • URL Params

    None

  • Success Response:

    • Code: 200
      Content: [ { "device_name": "Xiaomi Redmi Note 9 Pro 5G", "expected": "Expected Launch:May 2021", "price": 17990, "img_url": "https://www.91-img.com/pictures/141053-v2-xiaomi-redmi-note-9-pro-5g-mobile-phone-medium-1.jpg?tr=q-60", "source_url": "https://www.91mobiles.com/xiaomi-redmi-note-9-pro-5g-price-in-india", "spec_score": 85 }, ... ]

Get Started with the Installation

  1. Required Installations
    1. Install GoLang in your system
    2. Install Docker in your system
    3. Install Golang Migrate Tool
    4. Make sure you have make tool installed.
  2. Navigate into the project directory
  3. Run
       go mod download
       make postgres
       make createdb
       make migrateup 
    
    This sets up and runs your postgres container, creates db in it and migrates database.
  4. Run
        make server
    
    This runs main.go and you are good to Go 😉

Development and Contributing

Yes, please! Feel free to contribute, raise issues and recommend best practices. Makefile is your friend.

A few resources:

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL