REST server API

Course

addCourse

Create a new course


/course

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Course body = ; // Course | Created course object
        try {
            apiInstance.addCourse(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#addCourse");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Course body = ; // Course | Created course object
        try {
            apiInstance.addCourse(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#addCourse");
            e.printStackTrace();
        }
    }
}
Course *body = ; // Created course object

CourseApi *apiInstance = [[CourseApi alloc] init];

// Create a new course
[apiInstance addCourseWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var body = ; // {{Course}} Created course object

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addCourse(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addCourseExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var body = new Course(); // Course | Created course object

            try
            {
                // Create a new course
                apiInstance.addCourse(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.addCourse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$body = ; // Course | Created course object

try {
    $api_instance->addCourse($body);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->addCourse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $body = WWW::SwaggerClient::Object::Course->new(); # Course | Created course object

eval { 
    $api_instance->addCourse(body => $body);
};
if ($@) {
    warn "Exception when calling CourseApi->addCourse: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
body =  # Course | Created course object

try: 
    # Create a new course
    api_instance.add_course(body)
except ApiException as e:
    print("Exception when calling CourseApi->addCourse: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 405 - Invalid input

Status: default - Successful operation


addGrade

Add a grade for a completed task


/course/{courseId}/task/{taskId}/grade

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}/task/{taskId}/grade"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Grade body = ; // Grade | Grade placed at course
        Long courseId = 789; // Long | Course id to find by
        Long taskId = 789; // Long | Task id to find by
        try {
            apiInstance.addGrade(body, courseId, taskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#addGrade");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Grade body = ; // Grade | Grade placed at course
        Long courseId = 789; // Long | Course id to find by
        Long taskId = 789; // Long | Task id to find by
        try {
            apiInstance.addGrade(body, courseId, taskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#addGrade");
            e.printStackTrace();
        }
    }
}
Grade *body = ; // Grade placed at course
Long *courseId = 789; // Course id to find by
Long *taskId = 789; // Task id to find by

CourseApi *apiInstance = [[CourseApi alloc] init];

// Add a grade for a completed task
[apiInstance addGradeWith:body
    courseId:courseId
    taskId:taskId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var body = ; // {{Grade}} Grade placed at course
var courseId = 789; // {{Long}} Course id to find by
var taskId = 789; // {{Long}} Task id to find by

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addGrade(bodycourseIdtaskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addGradeExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var body = new Grade(); // Grade | Grade placed at course
            var courseId = 789;  // Long | Course id to find by
            var taskId = 789;  // Long | Task id to find by

            try
            {
                // Add a grade for a completed task
                apiInstance.addGrade(body, courseId, taskId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.addGrade: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$body = ; // Grade | Grade placed at course
$courseId = 789; // Long | Course id to find by
$taskId = 789; // Long | Task id to find by

try {
    $api_instance->addGrade($body, $courseId, $taskId);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->addGrade: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $body = WWW::SwaggerClient::Object::Grade->new(); # Grade | Grade placed at course
my $courseId = 789; # Long | Course id to find by
my $taskId = 789; # Long | Task id to find by

eval { 
    $api_instance->addGrade(body => $body, courseId => $courseId, taskId => $taskId);
};
if ($@) {
    warn "Exception when calling CourseApi->addGrade: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
body =  # Grade | Grade placed at course
courseId = 789 # Long | Course id to find by
taskId = 789 # Long | Task id to find by

try: 
    # Add a grade for a completed task
    api_instance.add_grade(body, courseId, taskId)
except ApiException as e:
    print("Exception when calling CourseApi->addGrade: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course id to find by
Required
taskId*
Long (int64)
Task id to find by
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successful operation

Status: 400 - Invalid grade


addStudentToCourse

Add a student to this course


/course/{courseId}/student/{studentId}

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}/student/{studentId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Student body = ; // Student | Student placed at course
        Long courseId = 789; // Long | Course id to find by
        Long studentId = 789; // Long | Student id to find by
        try {
            apiInstance.addStudentToCourse(body, courseId, studentId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#addStudentToCourse");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Student body = ; // Student | Student placed at course
        Long courseId = 789; // Long | Course id to find by
        Long studentId = 789; // Long | Student id to find by
        try {
            apiInstance.addStudentToCourse(body, courseId, studentId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#addStudentToCourse");
            e.printStackTrace();
        }
    }
}
Student *body = ; // Student placed at course
Long *courseId = 789; // Course id to find by
Long *studentId = 789; // Student id to find by

CourseApi *apiInstance = [[CourseApi alloc] init];

// Add a student to this course
[apiInstance addStudentToCourseWith:body
    courseId:courseId
    studentId:studentId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var body = ; // {{Student}} Student placed at course
var courseId = 789; // {{Long}} Course id to find by
var studentId = 789; // {{Long}} Student id to find by

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addStudentToCourse(bodycourseIdstudentId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addStudentToCourseExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var body = new Student(); // Student | Student placed at course
            var courseId = 789;  // Long | Course id to find by
            var studentId = 789;  // Long | Student id to find by

            try
            {
                // Add a student to this course
                apiInstance.addStudentToCourse(body, courseId, studentId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.addStudentToCourse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$body = ; // Student | Student placed at course
$courseId = 789; // Long | Course id to find by
$studentId = 789; // Long | Student id to find by

try {
    $api_instance->addStudentToCourse($body, $courseId, $studentId);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->addStudentToCourse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $body = WWW::SwaggerClient::Object::Student->new(); # Student | Student placed at course
my $courseId = 789; # Long | Course id to find by
my $studentId = 789; # Long | Student id to find by

eval { 
    $api_instance->addStudentToCourse(body => $body, courseId => $courseId, studentId => $studentId);
};
if ($@) {
    warn "Exception when calling CourseApi->addStudentToCourse: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
body =  # Student | Student placed at course
courseId = 789 # Long | Course id to find by
studentId = 789 # Long | Student id to find by

try: 
    # Add a student to this course
    api_instance.add_student_to_course(body, courseId, studentId)
except ApiException as e:
    print("Exception when calling CourseApi->addStudentToCourse: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course id to find by
Required
studentId*
Long (int64)
Student id to find by
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successful operation

Status: 405 - Invalid input


addTask

Add a task to this course


/course/{courseId}/task

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}/task"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Task body = ; // Task | task placed at course
        Long courseId = 789; // Long | Course id to find by
        try {
            apiInstance.addTask(body, courseId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#addTask");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Task body = ; // Task | task placed at course
        Long courseId = 789; // Long | Course id to find by
        try {
            apiInstance.addTask(body, courseId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#addTask");
            e.printStackTrace();
        }
    }
}
Task *body = ; // task placed at course
Long *courseId = 789; // Course id to find by

CourseApi *apiInstance = [[CourseApi alloc] init];

// Add a task to this course
[apiInstance addTaskWith:body
    courseId:courseId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var body = ; // {{Task}} task placed at course
var courseId = 789; // {{Long}} Course id to find by

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addTask(bodycourseId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addTaskExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var body = new Task(); // Task | task placed at course
            var courseId = 789;  // Long | Course id to find by

            try
            {
                // Add a task to this course
                apiInstance.addTask(body, courseId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.addTask: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$body = ; // Task | task placed at course
$courseId = 789; // Long | Course id to find by

try {
    $api_instance->addTask($body, $courseId);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->addTask: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $body = WWW::SwaggerClient::Object::Task->new(); # Task | task placed at course
my $courseId = 789; # Long | Course id to find by

eval { 
    $api_instance->addTask(body => $body, courseId => $courseId);
};
if ($@) {
    warn "Exception when calling CourseApi->addTask: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
body =  # Task | task placed at course
courseId = 789 # Long | Course id to find by

try: 
    # Add a task to this course
    api_instance.add_task(body, courseId)
except ApiException as e:
    print("Exception when calling CourseApi->addTask: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course id to find by
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successful operation

Status: 400 - Invalid task


addTutorToCourse

Add a tutor to this course


/course/{courseId}/tutor/{tutorId}

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}/tutor/{tutorId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Tutor body = ; // Tutor | Tutor placed at course
        Long courseId = 789; // Long | Course id to find by
        Long tutorId = 789; // Long | Tutor id to find by
        try {
            apiInstance.addTutorToCourse(body, courseId, tutorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#addTutorToCourse");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Tutor body = ; // Tutor | Tutor placed at course
        Long courseId = 789; // Long | Course id to find by
        Long tutorId = 789; // Long | Tutor id to find by
        try {
            apiInstance.addTutorToCourse(body, courseId, tutorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#addTutorToCourse");
            e.printStackTrace();
        }
    }
}
Tutor *body = ; // Tutor placed at course
Long *courseId = 789; // Course id to find by
Long *tutorId = 789; // Tutor id to find by

CourseApi *apiInstance = [[CourseApi alloc] init];

// Add a tutor to this course
[apiInstance addTutorToCourseWith:body
    courseId:courseId
    tutorId:tutorId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var body = ; // {{Tutor}} Tutor placed at course
var courseId = 789; // {{Long}} Course id to find by
var tutorId = 789; // {{Long}} Tutor id to find by

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addTutorToCourse(bodycourseIdtutorId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addTutorToCourseExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var body = new Tutor(); // Tutor | Tutor placed at course
            var courseId = 789;  // Long | Course id to find by
            var tutorId = 789;  // Long | Tutor id to find by

            try
            {
                // Add a tutor to this course
                apiInstance.addTutorToCourse(body, courseId, tutorId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.addTutorToCourse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$body = ; // Tutor | Tutor placed at course
$courseId = 789; // Long | Course id to find by
$tutorId = 789; // Long | Tutor id to find by

try {
    $api_instance->addTutorToCourse($body, $courseId, $tutorId);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->addTutorToCourse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $body = WWW::SwaggerClient::Object::Tutor->new(); # Tutor | Tutor placed at course
my $courseId = 789; # Long | Course id to find by
my $tutorId = 789; # Long | Tutor id to find by

eval { 
    $api_instance->addTutorToCourse(body => $body, courseId => $courseId, tutorId => $tutorId);
};
if ($@) {
    warn "Exception when calling CourseApi->addTutorToCourse: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
body =  # Tutor | Tutor placed at course
courseId = 789 # Long | Course id to find by
tutorId = 789 # Long | Tutor id to find by

try: 
    # Add a tutor to this course
    api_instance.add_tutor_to_course(body, courseId, tutorId)
except ApiException as e:
    print("Exception when calling CourseApi->addTutorToCourse: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course id to find by
Required
tutorId*
Long (int64)
Tutor id to find by
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successful operation

Status: 405 - Invalid input


deleteCourse

Delete a course data


/course/{courseId}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course to delete by id
        try {
            apiInstance.deleteCourse(courseId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#deleteCourse");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course to delete by id
        try {
            apiInstance.deleteCourse(courseId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#deleteCourse");
            e.printStackTrace();
        }
    }
}
Long *courseId = 789; // Course to delete by id

CourseApi *apiInstance = [[CourseApi alloc] init];

// Delete a course data
[apiInstance deleteCourseWith:courseId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var courseId = 789; // {{Long}} Course to delete by id

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteCourse(courseId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteCourseExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var courseId = 789;  // Long | Course to delete by id

            try
            {
                // Delete a course data
                apiInstance.deleteCourse(courseId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.deleteCourse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$courseId = 789; // Long | Course to delete by id

try {
    $api_instance->deleteCourse($courseId);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->deleteCourse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $courseId = 789; # Long | Course to delete by id

eval { 
    $api_instance->deleteCourse(courseId => $courseId);
};
if ($@) {
    warn "Exception when calling CourseApi->deleteCourse: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
courseId = 789 # Long | Course to delete by id

try: 
    # Delete a course data
    api_instance.delete_course(courseId)
except ApiException as e:
    print("Exception when calling CourseApi->deleteCourse: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course to delete by id
Required

Responses

Status: 400 - Invalid ID supplied

Status: 404 - Course not found


getAllCourses

Show all courses

Returns list of all courses with short description


/course

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        try {
            array[Course] result = apiInstance.getAllCourses();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getAllCourses");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        try {
            array[Course] result = apiInstance.getAllCourses();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getAllCourses");
            e.printStackTrace();
        }
    }
}

CourseApi *apiInstance = [[CourseApi alloc] init];

// Show all courses
[apiInstance getAllCoursesWithCompletionHandler: 
              ^(array[Course] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAllCourses(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAllCoursesExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();

            try
            {
                // Show all courses
                array[Course] result = apiInstance.getAllCourses();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.getAllCourses: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();

try {
    $result = $api_instance->getAllCourses();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->getAllCourses: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();

eval { 
    my $result = $api_instance->getAllCourses();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseApi->getAllCourses: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()

try: 
    # Show all courses
    api_response = api_instance.get_all_courses()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseApi->getAllCourses: %s\n" % e)

Parameters

Responses

Status: 200 - Successful operation


getCourseById

Get course with full description by id


/course/{courseId}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | The id that needs to be fetched
        try {
            Course result = apiInstance.getCourseById(courseId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getCourseById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | The id that needs to be fetched
        try {
            Course result = apiInstance.getCourseById(courseId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getCourseById");
            e.printStackTrace();
        }
    }
}
Long *courseId = 789; // The id that needs to be fetched

CourseApi *apiInstance = [[CourseApi alloc] init];

// Get course with full description by id
[apiInstance getCourseByIdWith:courseId
              completionHandler: ^(Course output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var courseId = 789; // {{Long}} The id that needs to be fetched

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCourseById(courseId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCourseByIdExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var courseId = 789;  // Long | The id that needs to be fetched

            try
            {
                // Get course with full description by id
                Course result = apiInstance.getCourseById(courseId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.getCourseById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$courseId = 789; // Long | The id that needs to be fetched

try {
    $result = $api_instance->getCourseById($courseId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->getCourseById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $courseId = 789; # Long | The id that needs to be fetched

eval { 
    my $result = $api_instance->getCourseById(courseId => $courseId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseApi->getCourseById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
courseId = 789 # Long | The id that needs to be fetched

try: 
    # Get course with full description by id
    api_response = api_instance.get_course_by_id(courseId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseApi->getCourseById: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
The id that needs to be fetched
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Course not found


getGrades

Returns a list of all grades for this task


/course/{courseId}/task/{taskId}/grade

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}/task/{taskId}/grade"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        Long taskId = 789; // Long | Task id to find by
        try {
            array[Grade] result = apiInstance.getGrades(courseId, taskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getGrades");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        Long taskId = 789; // Long | Task id to find by
        try {
            array[Grade] result = apiInstance.getGrades(courseId, taskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getGrades");
            e.printStackTrace();
        }
    }
}
Long *courseId = 789; // Course id to find by
Long *taskId = 789; // Task id to find by

CourseApi *apiInstance = [[CourseApi alloc] init];

// Returns a list of all grades for this task
[apiInstance getGradesWith:courseId
    taskId:taskId
              completionHandler: ^(array[Grade] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var courseId = 789; // {{Long}} Course id to find by
var taskId = 789; // {{Long}} Task id to find by

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getGrades(courseId, taskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getGradesExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var courseId = 789;  // Long | Course id to find by
            var taskId = 789;  // Long | Task id to find by

            try
            {
                // Returns a list of all grades for this task
                array[Grade] result = apiInstance.getGrades(courseId, taskId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.getGrades: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$courseId = 789; // Long | Course id to find by
$taskId = 789; // Long | Task id to find by

try {
    $result = $api_instance->getGrades($courseId, $taskId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->getGrades: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $courseId = 789; # Long | Course id to find by
my $taskId = 789; # Long | Task id to find by

eval { 
    my $result = $api_instance->getGrades(courseId => $courseId, taskId => $taskId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseApi->getGrades: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
courseId = 789 # Long | Course id to find by
taskId = 789 # Long | Task id to find by

try: 
    # Returns a list of all grades for this task
    api_response = api_instance.get_grades(courseId, taskId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseApi->getGrades: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course id to find by
Required
taskId*
Long (int64)
Task id to find by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid id value


getStudents

Returns a list of students at this course


/course/{courseId}/student

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}/student"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        try {
            array[Student] result = apiInstance.getStudents(courseId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getStudents");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        try {
            array[Student] result = apiInstance.getStudents(courseId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getStudents");
            e.printStackTrace();
        }
    }
}
Long *courseId = 789; // Course id to find by

CourseApi *apiInstance = [[CourseApi alloc] init];

// Returns a list of students at this course
[apiInstance getStudentsWith:courseId
              completionHandler: ^(array[Student] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var courseId = 789; // {{Long}} Course id to find by

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getStudents(courseId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStudentsExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var courseId = 789;  // Long | Course id to find by

            try
            {
                // Returns a list of students at this course
                array[Student] result = apiInstance.getStudents(courseId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.getStudents: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$courseId = 789; // Long | Course id to find by

try {
    $result = $api_instance->getStudents($courseId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->getStudents: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $courseId = 789; # Long | Course id to find by

eval { 
    my $result = $api_instance->getStudents(courseId => $courseId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseApi->getStudents: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
courseId = 789 # Long | Course id to find by

try: 
    # Returns a list of students at this course
    api_response = api_instance.get_students(courseId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseApi->getStudents: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course id to find by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid id value


getTaskById

Get a particular task with full description by id


/course/{courseId}/task/{taskId}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}/task/{taskId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        Long taskId = 789; // Long | The task that needs to be displayed
        try {
            Task result = apiInstance.getTaskById(courseId, taskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getTaskById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        Long taskId = 789; // Long | The task that needs to be displayed
        try {
            Task result = apiInstance.getTaskById(courseId, taskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getTaskById");
            e.printStackTrace();
        }
    }
}
Long *courseId = 789; // Course id to find by
Long *taskId = 789; // The task that needs to be displayed

CourseApi *apiInstance = [[CourseApi alloc] init];

// Get a particular task with full description by id
[apiInstance getTaskByIdWith:courseId
    taskId:taskId
              completionHandler: ^(Task output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var courseId = 789; // {{Long}} Course id to find by
var taskId = 789; // {{Long}} The task that needs to be displayed

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTaskById(courseId, taskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTaskByIdExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var courseId = 789;  // Long | Course id to find by
            var taskId = 789;  // Long | The task that needs to be displayed

            try
            {
                // Get a particular task with full description by id
                Task result = apiInstance.getTaskById(courseId, taskId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.getTaskById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$courseId = 789; // Long | Course id to find by
$taskId = 789; // Long | The task that needs to be displayed

try {
    $result = $api_instance->getTaskById($courseId, $taskId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->getTaskById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $courseId = 789; # Long | Course id to find by
my $taskId = 789; # Long | The task that needs to be displayed

eval { 
    my $result = $api_instance->getTaskById(courseId => $courseId, taskId => $taskId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseApi->getTaskById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
courseId = 789 # Long | Course id to find by
taskId = 789 # Long | The task that needs to be displayed

try: 
    # Get a particular task with full description by id
    api_response = api_instance.get_task_by_id(courseId, taskId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseApi->getTaskById: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course id to find by
Required
taskId*
Long (int64)
The task that needs to be displayed
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid task or course ID supplied

Status: 404 - Task or course not found


getTasks

Returns a list of tasks at this course


/course/{courseId}/task

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}/task"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        try {
            array[Task] result = apiInstance.getTasks(courseId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getTasks");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        try {
            array[Task] result = apiInstance.getTasks(courseId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getTasks");
            e.printStackTrace();
        }
    }
}
Long *courseId = 789; // Course id to find by

CourseApi *apiInstance = [[CourseApi alloc] init];

// Returns a list of tasks at this course
[apiInstance getTasksWith:courseId
              completionHandler: ^(array[Task] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var courseId = 789; // {{Long}} Course id to find by

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTasks(courseId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTasksExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var courseId = 789;  // Long | Course id to find by

            try
            {
                // Returns a list of tasks at this course
                array[Task] result = apiInstance.getTasks(courseId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.getTasks: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$courseId = 789; // Long | Course id to find by

try {
    $result = $api_instance->getTasks($courseId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->getTasks: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $courseId = 789; # Long | Course id to find by

eval { 
    my $result = $api_instance->getTasks(courseId => $courseId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseApi->getTasks: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
courseId = 789 # Long | Course id to find by

try: 
    # Returns a list of tasks at this course
    api_response = api_instance.get_tasks(courseId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseApi->getTasks: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course id to find by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid id value


getToplist

Returns a toplist of all students at this course


/course/{courseId}/toplist

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}/toplist"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        try {
            array[Rank] result = apiInstance.getToplist(courseId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getToplist");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        try {
            array[Rank] result = apiInstance.getToplist(courseId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getToplist");
            e.printStackTrace();
        }
    }
}
Long *courseId = 789; // Course id to find by

CourseApi *apiInstance = [[CourseApi alloc] init];

// Returns a toplist of all students at this course
[apiInstance getToplistWith:courseId
              completionHandler: ^(array[Rank] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var courseId = 789; // {{Long}} Course id to find by

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getToplist(courseId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getToplistExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var courseId = 789;  // Long | Course id to find by

            try
            {
                // Returns a toplist of all students at this course
                array[Rank] result = apiInstance.getToplist(courseId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.getToplist: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$courseId = 789; // Long | Course id to find by

try {
    $result = $api_instance->getToplist($courseId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->getToplist: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $courseId = 789; # Long | Course id to find by

eval { 
    my $result = $api_instance->getToplist(courseId => $courseId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseApi->getToplist: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
courseId = 789 # Long | Course id to find by

try: 
    # Returns a toplist of all students at this course
    api_response = api_instance.get_toplist(courseId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseApi->getToplist: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course id to find by
Required

Responses

Status: 200 - successful operation

Status: 400 - Invalid id value


getTutors

Returns a list of tutors at this course


/course/{courseId}/tutors

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}/tutors"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        try {
            array[Tutor] result = apiInstance.getTutors(courseId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getTutors");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        try {
            array[Tutor] result = apiInstance.getTutors(courseId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#getTutors");
            e.printStackTrace();
        }
    }
}
Long *courseId = 789; // Course id to find by

CourseApi *apiInstance = [[CourseApi alloc] init];

// Returns a list of tutors at this course
[apiInstance getTutorsWith:courseId
              completionHandler: ^(array[Tutor] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var courseId = 789; // {{Long}} Course id to find by

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTutors(courseId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTutorsExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var courseId = 789;  // Long | Course id to find by

            try
            {
                // Returns a list of tutors at this course
                array[Tutor] result = apiInstance.getTutors(courseId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.getTutors: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$courseId = 789; // Long | Course id to find by

try {
    $result = $api_instance->getTutors($courseId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->getTutors: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $courseId = 789; # Long | Course id to find by

eval { 
    my $result = $api_instance->getTutors(courseId => $courseId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CourseApi->getTutors: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
courseId = 789 # Long | Course id to find by

try: 
    # Returns a list of tutors at this course
    api_response = api_instance.get_tutors(courseId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CourseApi->getTutors: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course id to find by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid id value


removeStudent

Remove student from course


/course/{courseId}/student/{studentId}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}/student/{studentId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        Long studentId = 789; // Long | The student that needs to be removed
        try {
            apiInstance.removeStudent(courseId, studentId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#removeStudent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        Long studentId = 789; // Long | The student that needs to be removed
        try {
            apiInstance.removeStudent(courseId, studentId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#removeStudent");
            e.printStackTrace();
        }
    }
}
Long *courseId = 789; // Course id to find by
Long *studentId = 789; // The student that needs to be removed

CourseApi *apiInstance = [[CourseApi alloc] init];

// Remove student from course
[apiInstance removeStudentWith:courseId
    studentId:studentId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var courseId = 789; // {{Long}} Course id to find by
var studentId = 789; // {{Long}} The student that needs to be removed

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeStudent(courseId, studentId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeStudentExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var courseId = 789;  // Long | Course id to find by
            var studentId = 789;  // Long | The student that needs to be removed

            try
            {
                // Remove student from course
                apiInstance.removeStudent(courseId, studentId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.removeStudent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$courseId = 789; // Long | Course id to find by
$studentId = 789; // Long | The student that needs to be removed

try {
    $api_instance->removeStudent($courseId, $studentId);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->removeStudent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $courseId = 789; # Long | Course id to find by
my $studentId = 789; # Long | The student that needs to be removed

eval { 
    $api_instance->removeStudent(courseId => $courseId, studentId => $studentId);
};
if ($@) {
    warn "Exception when calling CourseApi->removeStudent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
courseId = 789 # Long | Course id to find by
studentId = 789 # Long | The student that needs to be removed

try: 
    # Remove student from course
    api_instance.remove_student(courseId, studentId)
except ApiException as e:
    print("Exception when calling CourseApi->removeStudent: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course id to find by
Required
studentId*
Long (int64)
The student that needs to be removed
Required

Responses

Status: 400 - Invalid course or student id supplied

Status: 404 - Course or student not found


removeTask

Remove task from course


/course/{courseId}/task/{taskId}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}/task/{taskId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        Long taskId = 789; // Long | The task that needs to be removed
        try {
            apiInstance.removeTask(courseId, taskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#removeTask");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        Long taskId = 789; // Long | The task that needs to be removed
        try {
            apiInstance.removeTask(courseId, taskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#removeTask");
            e.printStackTrace();
        }
    }
}
Long *courseId = 789; // Course id to find by
Long *taskId = 789; // The task that needs to be removed

CourseApi *apiInstance = [[CourseApi alloc] init];

// Remove task from course
[apiInstance removeTaskWith:courseId
    taskId:taskId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var courseId = 789; // {{Long}} Course id to find by
var taskId = 789; // {{Long}} The task that needs to be removed

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeTask(courseId, taskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeTaskExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var courseId = 789;  // Long | Course id to find by
            var taskId = 789;  // Long | The task that needs to be removed

            try
            {
                // Remove task from course
                apiInstance.removeTask(courseId, taskId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.removeTask: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$courseId = 789; // Long | Course id to find by
$taskId = 789; // Long | The task that needs to be removed

try {
    $api_instance->removeTask($courseId, $taskId);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->removeTask: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $courseId = 789; # Long | Course id to find by
my $taskId = 789; # Long | The task that needs to be removed

eval { 
    $api_instance->removeTask(courseId => $courseId, taskId => $taskId);
};
if ($@) {
    warn "Exception when calling CourseApi->removeTask: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
courseId = 789 # Long | Course id to find by
taskId = 789 # Long | The task that needs to be removed

try: 
    # Remove task from course
    api_instance.remove_task(courseId, taskId)
except ApiException as e:
    print("Exception when calling CourseApi->removeTask: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course id to find by
Required
taskId*
Long (int64)
The task that needs to be removed
Required

Responses

Status: 400 - Invalid course or task ID supplied

Status: 404 - Task or course not found


removeTutor

Remove tutor from course


/course/{courseId}/tutor/{tutorId}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}/tutor/{tutorId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        Long tutorId = 789; // Long | The tutor that needs to be removed
        try {
            apiInstance.removeTutor(courseId, tutorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#removeTutor");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | Course id to find by
        Long tutorId = 789; // Long | The tutor that needs to be removed
        try {
            apiInstance.removeTutor(courseId, tutorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#removeTutor");
            e.printStackTrace();
        }
    }
}
Long *courseId = 789; // Course id to find by
Long *tutorId = 789; // The tutor that needs to be removed

CourseApi *apiInstance = [[CourseApi alloc] init];

// Remove tutor from course
[apiInstance removeTutorWith:courseId
    tutorId:tutorId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var courseId = 789; // {{Long}} Course id to find by
var tutorId = 789; // {{Long}} The tutor that needs to be removed

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeTutor(courseId, tutorId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeTutorExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var courseId = 789;  // Long | Course id to find by
            var tutorId = 789;  // Long | The tutor that needs to be removed

            try
            {
                // Remove tutor from course
                apiInstance.removeTutor(courseId, tutorId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.removeTutor: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$courseId = 789; // Long | Course id to find by
$tutorId = 789; // Long | The tutor that needs to be removed

try {
    $api_instance->removeTutor($courseId, $tutorId);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->removeTutor: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $courseId = 789; # Long | Course id to find by
my $tutorId = 789; # Long | The tutor that needs to be removed

eval { 
    $api_instance->removeTutor(courseId => $courseId, tutorId => $tutorId);
};
if ($@) {
    warn "Exception when calling CourseApi->removeTutor: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
courseId = 789 # Long | Course id to find by
tutorId = 789 # Long | The tutor that needs to be removed

try: 
    # Remove tutor from course
    api_instance.remove_tutor(courseId, tutorId)
except ApiException as e:
    print("Exception when calling CourseApi->removeTutor: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
Course id to find by
Required
tutorId*
Long (int64)
The tutor that needs to be removed
Required

Responses

Status: 400 - Invalid course or tutor id supplied

Status: 404 - Course or tutor not found


updateCourse

Update a course data


/course/{courseId}

Usage and SDK Samples

curl -X PUT\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/course/{courseId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CourseApi;

import java.io.File;
import java.util.*;

public class CourseApiExample {

    public static void main(String[] args) {
        
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | ID of course that needs to be updated
        try {
            apiInstance.updateCourse(courseId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#updateCourse");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CourseApi;

public class CourseApiExample {

    public static void main(String[] args) {
        CourseApi apiInstance = new CourseApi();
        Long courseId = 789; // Long | ID of course that needs to be updated
        try {
            apiInstance.updateCourse(courseId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CourseApi#updateCourse");
            e.printStackTrace();
        }
    }
}
Long *courseId = 789; // ID of course that needs to be updated

CourseApi *apiInstance = [[CourseApi alloc] init];

// Update a course data
[apiInstance updateCourseWith:courseId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.CourseApi()
var courseId = 789; // {{Long}} ID of course that needs to be updated

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateCourse(courseId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateCourseExample
    {
        public void main()
        {

            var apiInstance = new CourseApi();
            var courseId = 789;  // Long | ID of course that needs to be updated

            try
            {
                // Update a course data
                apiInstance.updateCourse(courseId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CourseApi.updateCourse: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCourseApi();
$courseId = 789; // Long | ID of course that needs to be updated

try {
    $api_instance->updateCourse($courseId);
} catch (Exception $e) {
    echo 'Exception when calling CourseApi->updateCourse: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CourseApi;

my $api_instance = WWW::SwaggerClient::CourseApi->new();
my $courseId = 789; # Long | ID of course that needs to be updated

eval { 
    $api_instance->updateCourse(courseId => $courseId);
};
if ($@) {
    warn "Exception when calling CourseApi->updateCourse: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CourseApi()
courseId = 789 # Long | ID of course that needs to be updated

try: 
    # Update a course data
    api_instance.update_course(courseId)
except ApiException as e:
    print("Exception when calling CourseApi->updateCourse: %s\n" % e)

Parameters

Path parameters
Name Description
courseId*
Long (int64)
ID of course that needs to be updated
Required

Responses

Status: 405 - Invalid input


Student

addStudent

Add a new student


/student

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/jsom,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/student"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StudentApi;

import java.io.File;
import java.util.*;

public class StudentApiExample {

    public static void main(String[] args) {
        
        StudentApi apiInstance = new StudentApi();
        Student body = ; // Student | Student object that needs to be added
        try {
            apiInstance.addStudent(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling StudentApi#addStudent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StudentApi;

public class StudentApiExample {

    public static void main(String[] args) {
        StudentApi apiInstance = new StudentApi();
        Student body = ; // Student | Student object that needs to be added
        try {
            apiInstance.addStudent(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling StudentApi#addStudent");
            e.printStackTrace();
        }
    }
}
Student *body = ; // Student object that needs to be added

StudentApi *apiInstance = [[StudentApi alloc] init];

// Add a new student
[apiInstance addStudentWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.StudentApi()
var body = ; // {{Student}} Student object that needs to be added

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addStudent(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addStudentExample
    {
        public void main()
        {

            var apiInstance = new StudentApi();
            var body = new Student(); // Student | Student object that needs to be added

            try
            {
                // Add a new student
                apiInstance.addStudent(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StudentApi.addStudent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiStudentApi();
$body = ; // Student | Student object that needs to be added

try {
    $api_instance->addStudent($body);
} catch (Exception $e) {
    echo 'Exception when calling StudentApi->addStudent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StudentApi;

my $api_instance = WWW::SwaggerClient::StudentApi->new();
my $body = WWW::SwaggerClient::Object::Student->new(); # Student | Student object that needs to be added

eval { 
    $api_instance->addStudent(body => $body);
};
if ($@) {
    warn "Exception when calling StudentApi->addStudent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StudentApi()
body =  # Student | Student object that needs to be added

try: 
    # Add a new student
    api_instance.add_student(body)
except ApiException as e:
    print("Exception when calling StudentApi->addStudent: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 405 - Invalid input

Status: default - Successful operation


deleteStudent

Delete a student data


/student/{studentId}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/student/{studentId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StudentApi;

import java.io.File;
import java.util.*;

public class StudentApiExample {

    public static void main(String[] args) {
        
        StudentApi apiInstance = new StudentApi();
        Long studentId = 789; // Long | Student to delete by id
        try {
            apiInstance.deleteStudent(studentId);
        } catch (ApiException e) {
            System.err.println("Exception when calling StudentApi#deleteStudent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StudentApi;

public class StudentApiExample {

    public static void main(String[] args) {
        StudentApi apiInstance = new StudentApi();
        Long studentId = 789; // Long | Student to delete by id
        try {
            apiInstance.deleteStudent(studentId);
        } catch (ApiException e) {
            System.err.println("Exception when calling StudentApi#deleteStudent");
            e.printStackTrace();
        }
    }
}
Long *studentId = 789; // Student to delete by id

StudentApi *apiInstance = [[StudentApi alloc] init];

// Delete a student data
[apiInstance deleteStudentWith:studentId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.StudentApi()
var studentId = 789; // {{Long}} Student to delete by id

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteStudent(studentId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteStudentExample
    {
        public void main()
        {

            var apiInstance = new StudentApi();
            var studentId = 789;  // Long | Student to delete by id

            try
            {
                // Delete a student data
                apiInstance.deleteStudent(studentId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StudentApi.deleteStudent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiStudentApi();
$studentId = 789; // Long | Student to delete by id

try {
    $api_instance->deleteStudent($studentId);
} catch (Exception $e) {
    echo 'Exception when calling StudentApi->deleteStudent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StudentApi;

my $api_instance = WWW::SwaggerClient::StudentApi->new();
my $studentId = 789; # Long | Student to delete by id

eval { 
    $api_instance->deleteStudent(studentId => $studentId);
};
if ($@) {
    warn "Exception when calling StudentApi->deleteStudent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StudentApi()
studentId = 789 # Long | Student to delete by id

try: 
    # Delete a student data
    api_instance.delete_student(studentId)
except ApiException as e:
    print("Exception when calling StudentApi->deleteStudent: %s\n" % e)

Parameters

Path parameters
Name Description
studentId*
Long (int64)
Student to delete by id
Required

Responses

Status: 400 - Invalid ID supplied

Status: 404 - Student not found


getStudentById

Get student by id


/student/{studentId}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/student/{studentId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StudentApi;

import java.io.File;
import java.util.*;

public class StudentApiExample {

    public static void main(String[] args) {
        
        StudentApi apiInstance = new StudentApi();
        String studentId = studentId_example; // String | The id that needs to be fetched
        try {
            Student result = apiInstance.getStudentById(studentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StudentApi#getStudentById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StudentApi;

public class StudentApiExample {

    public static void main(String[] args) {
        StudentApi apiInstance = new StudentApi();
        String studentId = studentId_example; // String | The id that needs to be fetched
        try {
            Student result = apiInstance.getStudentById(studentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StudentApi#getStudentById");
            e.printStackTrace();
        }
    }
}
String *studentId = studentId_example; // The id that needs to be fetched

StudentApi *apiInstance = [[StudentApi alloc] init];

// Get student by id
[apiInstance getStudentByIdWith:studentId
              completionHandler: ^(Student output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.StudentApi()
var studentId = studentId_example; // {{String}} The id that needs to be fetched

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getStudentById(studentId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStudentByIdExample
    {
        public void main()
        {

            var apiInstance = new StudentApi();
            var studentId = studentId_example;  // String | The id that needs to be fetched

            try
            {
                // Get student by id
                Student result = apiInstance.getStudentById(studentId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StudentApi.getStudentById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiStudentApi();
$studentId = studentId_example; // String | The id that needs to be fetched

try {
    $result = $api_instance->getStudentById($studentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StudentApi->getStudentById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StudentApi;

my $api_instance = WWW::SwaggerClient::StudentApi->new();
my $studentId = studentId_example; # String | The id that needs to be fetched

eval { 
    my $result = $api_instance->getStudentById(studentId => $studentId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StudentApi->getStudentById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StudentApi()
studentId = studentId_example # String | The id that needs to be fetched

try: 
    # Get student by id
    api_response = api_instance.get_student_by_id(studentId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StudentApi->getStudentById: %s\n" % e)

Parameters

Path parameters
Name Description
studentId*
String
The id that needs to be fetched
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Student not found


getStudentsByGroup

Finds students by their group


/student/group/{group}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/student/group/{group}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StudentApi;

import java.io.File;
import java.util.*;

public class StudentApiExample {

    public static void main(String[] args) {
        
        StudentApi apiInstance = new StudentApi();
        array[Student] group = ; // array[Student] | Group name to filter by
        try {
            array[Student] result = apiInstance.getStudentsByGroup(group);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StudentApi#getStudentsByGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StudentApi;

public class StudentApiExample {

    public static void main(String[] args) {
        StudentApi apiInstance = new StudentApi();
        array[Student] group = ; // array[Student] | Group name to filter by
        try {
            array[Student] result = apiInstance.getStudentsByGroup(group);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StudentApi#getStudentsByGroup");
            e.printStackTrace();
        }
    }
}
array[Student] *group = ; // Group name to filter by

StudentApi *apiInstance = [[StudentApi alloc] init];

// Finds students by their group
[apiInstance getStudentsByGroupWith:group
              completionHandler: ^(array[Student] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.StudentApi()
var group = ; // {{array[Student]}} Group name to filter by

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getStudentsByGroup(group, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStudentsByGroupExample
    {
        public void main()
        {

            var apiInstance = new StudentApi();
            var group = new array[Student](); // array[Student] | Group name to filter by

            try
            {
                // Finds students by their group
                array[Student] result = apiInstance.getStudentsByGroup(group);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StudentApi.getStudentsByGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiStudentApi();
$group = ; // array[Student] | Group name to filter by

try {
    $result = $api_instance->getStudentsByGroup($group);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StudentApi->getStudentsByGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StudentApi;

my $api_instance = WWW::SwaggerClient::StudentApi->new();
my $group = []; # array[Student] | Group name to filter by

eval { 
    my $result = $api_instance->getStudentsByGroup(group => $group);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StudentApi->getStudentsByGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StudentApi()
group =  # array[Student] | Group name to filter by

try: 
    # Finds students by their group
    api_response = api_instance.get_students_by_group(group)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StudentApi->getStudentsByGroup: %s\n" % e)

Parameters

Path parameters
Name Description
group*
array[Student]
Group name to filter by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid group value


updateStudent

Update a student data


/student/{studentId}

Usage and SDK Samples

curl -X PUT\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/student/{studentId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StudentApi;

import java.io.File;
import java.util.*;

public class StudentApiExample {

    public static void main(String[] args) {
        
        StudentApi apiInstance = new StudentApi();
        Long studentId = 789; // Long | ID of student that needs to be updated
        try {
            apiInstance.updateStudent(studentId);
        } catch (ApiException e) {
            System.err.println("Exception when calling StudentApi#updateStudent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StudentApi;

public class StudentApiExample {

    public static void main(String[] args) {
        StudentApi apiInstance = new StudentApi();
        Long studentId = 789; // Long | ID of student that needs to be updated
        try {
            apiInstance.updateStudent(studentId);
        } catch (ApiException e) {
            System.err.println("Exception when calling StudentApi#updateStudent");
            e.printStackTrace();
        }
    }
}
Long *studentId = 789; // ID of student that needs to be updated

StudentApi *apiInstance = [[StudentApi alloc] init];

// Update a student data
[apiInstance updateStudentWith:studentId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.StudentApi()
var studentId = 789; // {{Long}} ID of student that needs to be updated

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateStudent(studentId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateStudentExample
    {
        public void main()
        {

            var apiInstance = new StudentApi();
            var studentId = 789;  // Long | ID of student that needs to be updated

            try
            {
                // Update a student data
                apiInstance.updateStudent(studentId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StudentApi.updateStudent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiStudentApi();
$studentId = 789; // Long | ID of student that needs to be updated

try {
    $api_instance->updateStudent($studentId);
} catch (Exception $e) {
    echo 'Exception when calling StudentApi->updateStudent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StudentApi;

my $api_instance = WWW::SwaggerClient::StudentApi->new();
my $studentId = 789; # Long | ID of student that needs to be updated

eval { 
    $api_instance->updateStudent(studentId => $studentId);
};
if ($@) {
    warn "Exception when calling StudentApi->updateStudent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StudentApi()
studentId = 789 # Long | ID of student that needs to be updated

try: 
    # Update a student data
    api_instance.update_student(studentId)
except ApiException as e:
    print("Exception when calling StudentApi->updateStudent: %s\n" % e)

Parameters

Path parameters
Name Description
studentId*
Long (int64)
ID of student that needs to be updated
Required

Responses

Status: 405 - Invalid input


Tutor

addTutor

Add a new stutor


/tutor

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/jsom,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/tutor"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TutorApi;

import java.io.File;
import java.util.*;

public class TutorApiExample {

    public static void main(String[] args) {
        
        TutorApi apiInstance = new TutorApi();
        Tutor body = ; // Tutor | Tutor object that needs to be added
        try {
            apiInstance.addTutor(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling TutorApi#addTutor");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TutorApi;

public class TutorApiExample {

    public static void main(String[] args) {
        TutorApi apiInstance = new TutorApi();
        Tutor body = ; // Tutor | Tutor object that needs to be added
        try {
            apiInstance.addTutor(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling TutorApi#addTutor");
            e.printStackTrace();
        }
    }
}
Tutor *body = ; // Tutor object that needs to be added

TutorApi *apiInstance = [[TutorApi alloc] init];

// Add a new stutor
[apiInstance addTutorWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.TutorApi()
var body = ; // {{Tutor}} Tutor object that needs to be added

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addTutor(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addTutorExample
    {
        public void main()
        {

            var apiInstance = new TutorApi();
            var body = new Tutor(); // Tutor | Tutor object that needs to be added

            try
            {
                // Add a new stutor
                apiInstance.addTutor(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TutorApi.addTutor: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTutorApi();
$body = ; // Tutor | Tutor object that needs to be added

try {
    $api_instance->addTutor($body);
} catch (Exception $e) {
    echo 'Exception when calling TutorApi->addTutor: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TutorApi;

my $api_instance = WWW::SwaggerClient::TutorApi->new();
my $body = WWW::SwaggerClient::Object::Tutor->new(); # Tutor | Tutor object that needs to be added

eval { 
    $api_instance->addTutor(body => $body);
};
if ($@) {
    warn "Exception when calling TutorApi->addTutor: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TutorApi()
body =  # Tutor | Tutor object that needs to be added

try: 
    # Add a new stutor
    api_instance.add_tutor(body)
except ApiException as e:
    print("Exception when calling TutorApi->addTutor: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 405 - Invalid input

Status: default - Successful operation


deleteTutor

Delete a tutor data


/tutor/{tutorId}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/tutor/{tutorId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TutorApi;

import java.io.File;
import java.util.*;

public class TutorApiExample {

    public static void main(String[] args) {
        
        TutorApi apiInstance = new TutorApi();
        Long tutorId = 789; // Long | Tutor to delete by id
        try {
            apiInstance.deleteTutor(tutorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling TutorApi#deleteTutor");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TutorApi;

public class TutorApiExample {

    public static void main(String[] args) {
        TutorApi apiInstance = new TutorApi();
        Long tutorId = 789; // Long | Tutor to delete by id
        try {
            apiInstance.deleteTutor(tutorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling TutorApi#deleteTutor");
            e.printStackTrace();
        }
    }
}
Long *tutorId = 789; // Tutor to delete by id

TutorApi *apiInstance = [[TutorApi alloc] init];

// Delete a tutor data
[apiInstance deleteTutorWith:tutorId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.TutorApi()
var tutorId = 789; // {{Long}} Tutor to delete by id

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteTutor(tutorId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteTutorExample
    {
        public void main()
        {

            var apiInstance = new TutorApi();
            var tutorId = 789;  // Long | Tutor to delete by id

            try
            {
                // Delete a tutor data
                apiInstance.deleteTutor(tutorId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TutorApi.deleteTutor: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTutorApi();
$tutorId = 789; // Long | Tutor to delete by id

try {
    $api_instance->deleteTutor($tutorId);
} catch (Exception $e) {
    echo 'Exception when calling TutorApi->deleteTutor: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TutorApi;

my $api_instance = WWW::SwaggerClient::TutorApi->new();
my $tutorId = 789; # Long | Tutor to delete by id

eval { 
    $api_instance->deleteTutor(tutorId => $tutorId);
};
if ($@) {
    warn "Exception when calling TutorApi->deleteTutor: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TutorApi()
tutorId = 789 # Long | Tutor to delete by id

try: 
    # Delete a tutor data
    api_instance.delete_tutor(tutorId)
except ApiException as e:
    print("Exception when calling TutorApi->deleteTutor: %s\n" % e)

Parameters

Path parameters
Name Description
tutorId*
Long (int64)
Tutor to delete by id
Required

Responses

Status: 400 - Invalid ID supplied

Status: 404 - Tutor not found


getTutorById

Get tutor by id


/tutor/{tutorId}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/tutor/{tutorId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TutorApi;

import java.io.File;
import java.util.*;

public class TutorApiExample {

    public static void main(String[] args) {
        
        TutorApi apiInstance = new TutorApi();
        String tutorId = tutorId_example; // String | The id that needs to be fetched
        try {
            Tutor result = apiInstance.getTutorById(tutorId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TutorApi#getTutorById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TutorApi;

public class TutorApiExample {

    public static void main(String[] args) {
        TutorApi apiInstance = new TutorApi();
        String tutorId = tutorId_example; // String | The id that needs to be fetched
        try {
            Tutor result = apiInstance.getTutorById(tutorId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TutorApi#getTutorById");
            e.printStackTrace();
        }
    }
}
String *tutorId = tutorId_example; // The id that needs to be fetched

TutorApi *apiInstance = [[TutorApi alloc] init];

// Get tutor by id
[apiInstance getTutorByIdWith:tutorId
              completionHandler: ^(Tutor output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.TutorApi()
var tutorId = tutorId_example; // {{String}} The id that needs to be fetched

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTutorById(tutorId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTutorByIdExample
    {
        public void main()
        {

            var apiInstance = new TutorApi();
            var tutorId = tutorId_example;  // String | The id that needs to be fetched

            try
            {
                // Get tutor by id
                Tutor result = apiInstance.getTutorById(tutorId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TutorApi.getTutorById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTutorApi();
$tutorId = tutorId_example; // String | The id that needs to be fetched

try {
    $result = $api_instance->getTutorById($tutorId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TutorApi->getTutorById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TutorApi;

my $api_instance = WWW::SwaggerClient::TutorApi->new();
my $tutorId = tutorId_example; # String | The id that needs to be fetched

eval { 
    my $result = $api_instance->getTutorById(tutorId => $tutorId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TutorApi->getTutorById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TutorApi()
tutorId = tutorId_example # String | The id that needs to be fetched

try: 
    # Get tutor by id
    api_response = api_instance.get_tutor_by_id(tutorId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TutorApi->getTutorById: %s\n" % e)

Parameters

Path parameters
Name Description
tutorId*
String
The id that needs to be fetched
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Tutor not found


getTutorsByPost

Finds tutors by their post


/tutor/post/{post}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/tutor/post/{post}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TutorApi;

import java.io.File;
import java.util.*;

public class TutorApiExample {

    public static void main(String[] args) {
        
        TutorApi apiInstance = new TutorApi();
        array[Tutor] post = ; // array[Tutor] | Post name to filter by
        try {
            array[Tutor] result = apiInstance.getTutorsByPost(post);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TutorApi#getTutorsByPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TutorApi;

public class TutorApiExample {

    public static void main(String[] args) {
        TutorApi apiInstance = new TutorApi();
        array[Tutor] post = ; // array[Tutor] | Post name to filter by
        try {
            array[Tutor] result = apiInstance.getTutorsByPost(post);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TutorApi#getTutorsByPost");
            e.printStackTrace();
        }
    }
}
array[Tutor] *post = ; // Post name to filter by

TutorApi *apiInstance = [[TutorApi alloc] init];

// Finds tutors by their post
[apiInstance getTutorsByPostWith:post
              completionHandler: ^(array[Tutor] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.TutorApi()
var post = ; // {{array[Tutor]}} Post name to filter by

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTutorsByPost(post, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTutorsByPostExample
    {
        public void main()
        {

            var apiInstance = new TutorApi();
            var post = new array[Tutor](); // array[Tutor] | Post name to filter by

            try
            {
                // Finds tutors by their post
                array[Tutor] result = apiInstance.getTutorsByPost(post);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TutorApi.getTutorsByPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTutorApi();
$post = ; // array[Tutor] | Post name to filter by

try {
    $result = $api_instance->getTutorsByPost($post);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TutorApi->getTutorsByPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TutorApi;

my $api_instance = WWW::SwaggerClient::TutorApi->new();
my $post = []; # array[Tutor] | Post name to filter by

eval { 
    my $result = $api_instance->getTutorsByPost(post => $post);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TutorApi->getTutorsByPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TutorApi()
post =  # array[Tutor] | Post name to filter by

try: 
    # Finds tutors by their post
    api_response = api_instance.get_tutors_by_post(post)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TutorApi->getTutorsByPost: %s\n" % e)

Parameters

Path parameters
Name Description
post*
array[Tutor]
Post name to filter by
Required

Responses

Status: 200 - successful operation

Status: 400 - Invalid post value


updateTutor

Update a tutor data


/tutor/{tutorId}

Usage and SDK Samples

curl -X PUT\
"https://virtserver.swaggerhub.com/mementomorri/REST_API_for_toplist_of_students/1.0.0/tutor/{tutorId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TutorApi;

import java.io.File;
import java.util.*;

public class TutorApiExample {

    public static void main(String[] args) {
        
        TutorApi apiInstance = new TutorApi();
        Long tutorId = 789; // Long | ID of tutor that needs to be updated
        try {
            apiInstance.updateTutor(tutorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling TutorApi#updateTutor");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TutorApi;

public class TutorApiExample {

    public static void main(String[] args) {
        TutorApi apiInstance = new TutorApi();
        Long tutorId = 789; // Long | ID of tutor that needs to be updated
        try {
            apiInstance.updateTutor(tutorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling TutorApi#updateTutor");
            e.printStackTrace();
        }
    }
}
Long *tutorId = 789; // ID of tutor that needs to be updated

TutorApi *apiInstance = [[TutorApi alloc] init];

// Update a tutor data
[apiInstance updateTutorWith:tutorId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestServerApi = require('rest_server_api');

var api = new RestServerApi.TutorApi()
var tutorId = 789; // {{Long}} ID of tutor that needs to be updated

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateTutor(tutorId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateTutorExample
    {
        public void main()
        {

            var apiInstance = new TutorApi();
            var tutorId = 789;  // Long | ID of tutor that needs to be updated

            try
            {
                // Update a tutor data
                apiInstance.updateTutor(tutorId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TutorApi.updateTutor: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTutorApi();
$tutorId = 789; // Long | ID of tutor that needs to be updated

try {
    $api_instance->updateTutor($tutorId);
} catch (Exception $e) {
    echo 'Exception when calling TutorApi->updateTutor: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TutorApi;

my $api_instance = WWW::SwaggerClient::TutorApi->new();
my $tutorId = 789; # Long | ID of tutor that needs to be updated

eval { 
    $api_instance->updateTutor(tutorId => $tutorId);
};
if ($@) {
    warn "Exception when calling TutorApi->updateTutor: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TutorApi()
tutorId = 789 # Long | ID of tutor that needs to be updated

try: 
    # Update a tutor data
    api_instance.update_tutor(tutorId)
except ApiException as e:
    print("Exception when calling TutorApi->updateTutor: %s\n" % e)

Parameters

Path parameters
Name Description
tutorId*
Long (int64)
ID of tutor that needs to be updated
Required

Responses

Status: 405 - Invalid input