Skip to content

Latest commit

 

History

History
97 lines (81 loc) · 2.41 KB

classify.md

File metadata and controls

97 lines (81 loc) · 2.41 KB

Classify API Reference

Software requirements

  • git
  • make
  • curl
  • jq

Create you account in Classify

GITHUB_USER=<your_user> NAME="<your full name>" SCHOOL_ID=<your_school_id> make user

Example:

➜  ap-labs git:(master) ✗ GITHUB_USER=demo NAME="Demo User" SCHOOL_ID="A00123456" make user
curl -k -s -X POST -d "githubID=demo&name=Demo User&schoolID=A00123456" http://localhost:8080/users/ | jq
{
  "message": "Welcome demo to the Classify API.",
  "user": {
    "ID": "89007637-4441-441c-ad6c-3f576aebb36f",
    "Name": "Demo User",
    "GithubID": "demo",
    "SchoolID": "A00123456"
  }
}

Verify that your user exists in Classify

GITHUB_USER=<your_user> make test

Example:

➜  ap-labs git:(master) ✗ GITHUB_USER=demo  make test
User Information
curl -k -s http://localhost:8080/users/\?githubID\=demo  | jq
{
  "message": "List of Users",
  "users": [
    {
      "ID": "89007637-4441-441c-ad6c-3f576aebb36f",
      "Name": "Demo User",
      "GithubID": "demo",
      "SchoolID": "A00123456"
    }
  ]
}

Submit a Lab to Classify

You can submit your lab's solutions as many times you want before the lab's due date. After the due date, it will not be possible to submit any new attempt.

The make submit mechanism will submit the branch and the commit ID of your latest change. It's highly recommend to create a new branch for each lab.

Below an example of the complete flow from pulling to submitting your labs:

  1. Checkout into the master branch
git checkout master
  1. Pull latest original ap-labs content. This will synchronize with the original class repository.
git pull origin master
  1. Create a new branch for your current lab
git checkout -b my-lab-name
cd labs/my-lab-name
  1. Have fun with your lab and make sure it compiles and runs
# Do your best on solving the lab
  1. Once you are done with your code: add, commit and push your code to your remote personal copy (fork) of the original repository.
git add .
git commit -s -m "Solve my-lab-name"
git push myuser my-lab-name --force
  1. Submit your work to the Classify API. This will notify the professor that your work has been completed. Change the demo user to your github user account.
GITHUB_USER=demo make submit