Giter VIP home page Giter VIP logo

gemo's Introduction

Backend Coding Challenge

My submission to the backend coding challenge proposed by Gemography

Requirements

  • locally:

    • php >= 7.2.5
    • composer
  • on container:

    • make
    • docker
    • docker-compose

Install the app

  • locally: composer install

  • on container: make install

Run the app

  • locally: php artisan serve

  • on container: make run

Stop the app

  • locally: Ctrl+c

  • on container: make stop

ENDPOINTS

List of the languages used by the 100 trending public repos on GitHub

This endpoint lists the languages used by the 100 trending public repos on GitHub on the last 30 days by default. For every language, we have the number of repos using this language and the list of repos using the language

  • URL

    /api/top

  • Method:

    GET

  • URL Params

    Optional:

    date : date from where the repositories are created after

    date=[datetime:{format:'Y-m-dTH:i:sZ'}]

  • Success Response:

    • Code: 200
      Content:
      {
          "total": 19,
          "items": {
              "JavaScript": {
                  "total": 23,
                  "items": [
                      {
                          "id": 245438989,
                          "node_id": "MDEwOlJlcG9zaXRvcnkyNDU0Mzg5ODk=",
                          "name": "core",
                          "full_name": "JAVClub/core",
                          "private": false,
                          "owner": {
                              "login": "JAVClub",
                              ...
                          },
                          "html_url": "https://github.com/JAVClub/core",
                          ...
                      },
                      ...
                  ]
              },
              ...
          }
      }
  • Error Response:

    • Code: 422 UNPROCESSABLE ENTRY
      Content:
      {
      "date": [
              "The date does not match the format Y-m-d\\TH:i:s\\Z.",
              "The date must be a date before or equal to {current datetime}."
          ]
      }

    OR

    • Code: 4xx CLIENT ERROR or 5xx SERVER ERROR
      Content:
      { "error" : "Client or Server Error encountered" }
  • Sample Call:

    curl --location --request GET 'http://localhost:8000/api/top'
    
    curl --location --request GET 'http://localhost:8000/api/top?date=2020-01-01T00:00:00Z'

gemo's People

Contributors

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