GithubHelp home page GithubHelp logo

secu-api's Introduction

SECU - API

SECU-API is api for course management system that include course, question, complier, testcase, user group and user.

Requirement

Getting Started

###[ Wiki การเริ่มต้นการใช้งาน และแนวทางพัฒนาอย่างละเอียด] (https://github.com/Neungzad/SECU-API/wiki)

หมายเหตุ:

  • ต้องการ PHP 5.5.9 ขึ้นไป
  • ในกรณีที่ไม่ได้ติดตั้งเว็บเซิร์ฟเวอร์ภายในเครื่องสามารถใช้คำสั่ง php -S 0.0.0.0:8000 เพื่อทดสอบการใช้งาน หลังจากนั้นให้เปิดเบราว์เซอร์ด้วย URL http://localhost:8000

Example API

Some example for how to call this api

Course:
Url Type Controller Description
/course GET CourseController@all All Courses
/course/{id} GET CourseController@get Fetch Courses By id
/course POST CourseController@add Create a course record
/course/{id} PUT CourseController@put Update Course by id
/course/{id} DELETE CourseController@remove Delete Courses by id
/course/{courseId}/meta/{metaKey} GET CourseController@getMetaByKey [example] Get only meta value
Complier:
Url Type Controller Description
/complie POST ExampleController@complie จะ return ค่าผมลัพธ์จากการ compile กลับไป
public function complie(Request $request)
{   
    /**
     *  Params
     *
     *  $lang String (require)
     *  $sourceCode String (require)
     *  $input String (optional) 
     */
    $output = Checker::complie($request->input('lang'), 
                               $request->input('sourceCode'), 
                               $request->input('input'));

    return $this->respond(Response::HTTP_OK, $output);
}

META DATA

Check Test Case:
Url Type Controller Description
/checkTestCase POST ExampleController@checkTestCase จะ return ค่า true หรือ false โดยเช็คความเท่ากันของ input กับ output
public function checkTestCase(Request $request)
{   
    /**
     *  Params
     *
     *  $lang String (require)
     *  $sourceCode String (require)
     *  $input String (require) 
     *  $output String (require) 
     */

    $output = Checker::checkTestCase($request->input('lang'), 
                                     $request->input('sourceCode'), 
                                     $request->input('input'), 
                                     $request->input('output'));

    return $this->respond(Response::HTTP_OK, $output);
}

META DATA

Example Input

ตัวอย่าง input สำหรับสำหรับบาง API

Add/Update Meta Data:

META DATA

secu-api's People

Contributors

neungzad avatar codetotti avatar katathipearth avatar pabkub avatar sitdh avatar

Watchers

 avatar James Cloos avatar  avatar  avatar  avatar

secu-api's Issues

คำแนะนำในการ อ่านข้อมูลจาก input ของภาษาที่สนับสนุน

อยากให้มีการเพิ่ม Guideline ในการตั้งต้นหรือ แนะนำว่า แต่ละภาษาที่ ระบบสามารถ compiler ได้เนี่ย มีคำสั่งในการรับ input อย่างไรบ้าง เพิ่มความเข้าใจในการใช้งาน

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.