Skip to content

Commit eb7b5a3

Browse files
committed
recordbook api improvements
1 parent 4e48a11 commit eb7b5a3

4 files changed

Lines changed: 36 additions & 15 deletions

File tree

src/main/java/api/myitmo/MyItmoApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public interface MyItmoApi {
3838
Call<ResultResponse<List<Specialization>>> getSpecializations();
3939

4040
@GET("/api/record_book/{specialization_id}/{semester}")
41-
Call<ResultResponse<List<RecordBookEntry>>> getRecordBook(@Path("specialization_id") int specializationId, @Path("semester") int semester);
41+
Call<ResultResponse<List<RecordBookEntry>>> getRecordBook(@Path("specialization_id") long specializationId, @Path("semester") int semester);
4242

4343
@GET("/api/record_book/{record_book_entry_id}")
44-
Call<ResultResponse<List<ControlEntry>>> getControlEntries(@Path("record_book_entry_id") int recordBookEntryId);
44+
Call<ResultResponse<List<ControlEntry>>> getControlEntries(@Path("record_book_entry_id") long recordBookEntryId);
4545

4646
// endregion record boot
4747

src/main/java/api/myitmo/model/recordbook/ControlEntry.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import com.google.gson.annotations.SerializedName;
44
import lombok.Data;
55

6+
import java.time.OffsetDateTime;
7+
68
@Data
79
public class ControlEntry {
810

@@ -11,22 +13,23 @@ public class ControlEntry {
1113
@SerializedName("control_name")
1214
private String controlName;
1315

14-
// private ? parentId
16+
@SerializedName("parent_id")
17+
private Long parentId;
1518

1619
@SerializedName("lower_value")
17-
private int lowerValue;
20+
private Double lowerValue;
1821

1922
@SerializedName("max_value")
20-
private int maxValue;
23+
private Double maxValue;
2124

2225
@SerializedName("min_value")
23-
private int minValue;
26+
private Double minValue;
2427

2528
private boolean required;
2629

27-
// private ? rate
30+
private Double rate;
2831

29-
// private ? date
32+
private OffsetDateTime date;
3033

31-
// private ? teacher
34+
private RecordBookTeacher teacher;
3235
}

src/main/java/api/myitmo/model/recordbook/RecordBookEntry.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import com.google.gson.annotations.SerializedName;
44
import lombok.Data;
55

6+
import java.time.OffsetDateTime;
7+
68
@Data
79
public class RecordBookEntry {
810

@@ -14,24 +16,27 @@ public class RecordBookEntry {
1416
@SerializedName("est_id")
1517
private long estId;
1618

17-
// private ? currentScore
19+
@SerializedName("current_score")
20+
private Double currentScore;
1821

19-
// private ? rate
22+
private String rate;
2023

21-
// private ? attempt
24+
private int attempt;
2225

2326
@SerializedName("control_type")
2427
private String controlType;
2528

2629
@SerializedName("control_type_id")
2730
private long controlTypeId;
2831

29-
// private ? examDate
32+
@SerializedName("exam_date")
33+
private OffsetDateTime examDate;
3034

3135
@SerializedName("have_tree")
3236
private boolean haveTree;
3337

34-
// private ? lmsLink
38+
@SerializedName("lms_link")
39+
private String lmsLink;
3540

36-
// private ? teacher
41+
private RecordBookTeacher teacher;
3742
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package api.myitmo.model.recordbook;
2+
3+
import lombok.Data;
4+
5+
@Data
6+
public class RecordBookTeacher {
7+
8+
private String surname;
9+
10+
private String name;
11+
12+
private String patronymic;
13+
}

0 commit comments

Comments
 (0)