Tiny API for sugang.inha.ac.kr
The use of this source code to create a course registration macro is prohibited. The developer assumes no responsibility for any violations of the university rules and the laws. In addition, the developer is not responsible for any problems resulting from the modification and use of this program.
If you want to create a timetable, see https://github.com/rollrat/InhaTT.
Login method is very simple. Using the DPI bypass program when using this method can cause critical errors.
var session = SugangSession.Create("id", "password");
// Check failing to login.
if (session == SugangSession.ErrorSession)
throw new Exception("Fail to login!");
public class Subject
{
public string Hacksu;
public string Group;
public string Name;
public string Class;
public string Score;
public string Type;
public string Time;
public string Professor;
public string Department;
public string Estimation;
public string Remain;
public string Bigo;
}
List<Subject> subjects = SugangUtils.LoadCurrentSeasonSubjects();
List<Subject> subjects = session.GetSubscribedCourses();
List<Subject> subjects = SugangUtils.LoadCurrentSeasonSubjects();
session.SubscribeCourseBySubject(subjects.Where(x => x.Name.Contains("μ»΄νμΌλ¬"))[0]);
Course registration API is not provided.
var target_lists = @"BNF3104|CHM1021|CHM1023|GEB1143|...";
var results = new List<Subject>();
// do not parallel
foreach (var target in target_lists.Split('|'))
{
var statuss = session.QureyStatusByHaksu(target);
results.AddRange(statuss);
}
var builder = new StringBuilder();
foreach (var result in results)
{
builder.AppendLine($"{result.Hacksu}|{result.Department}|{result.Name}|{result.Score}|{result.Professor}|{result.Remain}");
}
public class SearchResult
{
public string Id;
public string Name;
public string Email;
public string Position;
public string[] DutyName;
public string NodeType;
public string[] Departments;
public string[] DepartmentsIds;
}
var session = MailSession.Create("id", "password");
List<SearchResult> results = session.QueryAddress("rollrat");
You can get time table informations from everytime.kr
.
var es = EverytimeSession.Create("id", "password");
var sems = es.ListingSemesters();
var tables = es.GetTableListFromSemester(sems[3]);
List<string> hacksu = es.GetHacksuFromTableInfo(tables[0]);