Skip to content

Instantly share code, notes, and snippets.

@BastinRobin
Last active July 17, 2018 08:04
Show Gist options
  • Select an option

  • Save BastinRobin/b009a2e8e635a673cbd76a5c7be48694 to your computer and use it in GitHub Desktop.

Select an option

Save BastinRobin/b009a2e8e635a673cbd76a5c7be48694 to your computer and use it in GitHub Desktop.
Authentication API

API Requirement:

Login and Return Subjects

URL: /api/faculty/login

METHOD: POST

Request Payload:

email: 'zyx@gmail.com',
password: '********'

Response:

{
	id: 1,
	name: 'James Doe',
	email: 'zyx@gmail.com'
	created_at: 2018-01-01-1989'
	subjects: [
		{id: 1, name: 'Java'}
		{id: 3, name: 'C'}, 
		{id:10, name: 'C++'}
	]
}

Store Attendance

URL: /api/faculty/attendance

METHOD: POST

Request Payload:

student_id: 10,
subject_id: 3

Response:

True // if stored
False // if failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment