package edu.rpi.cs.yacs.retrofit;

import edu.rpi.cs.yacs.models.Course;
import edu.rpi.cs.yacs.models.School;
import edu.rpi.cs.yacs.models.Section;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * Created by Mark Robinson on 9/24/16.
 */

public interface YACSService {
    /**
     * This method fetches all schools and departments of the college.
     * @return Relevant School objects
     */
    @GET("schools.json?show_departments=true")
    Call<School> loadSchools();

    /**
     * This method fetches all courses given a query to search.
     * @param search query string to search
     * @return Relevant Course objects of query
     */
    @GET("courses.json")
    Call<Course> loadCoursesBySearch(@Query("search") String search);

    /**
     * This method fetches all courses of a given department.
     * @param department_code department code to fetch courses
     * @return Relevant Course objects of department_code
     */
    @GET("courses.json")
    Call<Course> loadCoursesByDepartment(@Query("department_code") String department_code);

    /**
     * This method fetches all sections and periods of a given course.
     * @param course_id course id to fetch sections and periods
     * @return Relevant Section objects of course_id
     */
    @GET("sections.json?show_periods=true")
    Call<Section> loadCourseSections(@Query("course_id") int course_id);
}
@@ -64,16 +64,17 @@
 s.Course
+s
 ;%0Aimport
@@ -103,16 +103,17 @@
 s.School
+s
 ;%0Aimport
@@ -143,16 +143,17 @@
 .Section
+s
 ;%0Aimport
@@ -471,21 +471,16 @@
 artments
-=true
 %22)%0A    C
@@ -489,16 +489,17 @@
 l%3CSchool
+s
 %3E loadSc
@@ -712,32 +712,33 @@
 %0A    Call%3CCourse
+s
 %3E loadCoursesByS
@@ -1016,16 +1016,17 @@
 l%3CCourse
+s
 %3E loadCo
@@ -1343,16 +1343,16 @@
 =true%22)%0A
-
     Call
@@ -1359,16 +1359,17 @@
 %3CSection
+s
 %3E loadCo

Use New Models In YACSService