Nure.NET
1.0.3
dotnet add package Nure.NET --version 1.0.3
NuGet\Install-Package Nure.NET -Version 1.0.3
<PackageReference Include="Nure.NET" Version="1.0.3" />
<PackageVersion Include="Nure.NET" Version="1.0.3" />
<PackageReference Include="Nure.NET" />
paket add Nure.NET --version 1.0.3
#r "nuget: Nure.NET, 1.0.3"
#:package Nure.NET@1.0.3
#addin nuget:?package=Nure.NET&version=1.0.3
#tool nuget:?package=Nure.NET&version=1.0.3
Nure.NET
This library is unofficial and not supported by cist.nure.ua administration. It is developed and maintained by students and the Mindenit Team.
A .NET library for interacting with NURE's schedule (cist.nure.ua). The library provides a convenient API for accessing information about schedules, teachers, groups, and university auditoriums.
📋 Table of Contents
📥 Installation
The library is available via NuGet. You can install it using one of the following methods:
Using .NET CLI:
dotnet add package Nure.NET
Using Package Manager Console:
Install-Package Nure.NET
🚀 Key Features
- Retrieve list of all university groups
- Retrieve list of teachers
- Retrieve list of auditoriums
- Get schedules for groups, teachers, and auditoriums
- Support for schedule filtering by time period
- Automatic CIST server availability detection
- Handling of incorrect JSON responses from API
💻 Usage
Getting Groups List
using Nure.NET;
using Nure.NET.Types;
// Get all groups
List<Group>? groups = Cist.GetGroups();
foreach (var group in groups)
{
Console.WriteLine($"ID: {group.Id}, Name: {group.Name}");
}
// Get data in CIST format
string cistJson = Cist.GetGroups(true);
Getting Teachers List
using Nure.NET;
using Nure.NET.Types;
// Get all teachers
List<Teacher>? teachers = Cist.GetTeachers();
foreach (var teacher in teachers)
{
Console.WriteLine($"ID: {teacher.Id}");
Console.WriteLine($"Full Name: {teacher.FullName}");
Console.WriteLine($"Short Name: {teacher.ShortName}");
}
Getting Auditoriums List
using Nure.NET;
using Nure.NET.Types;
// Get all auditoriums
List<Auditory>? auditories = Cist.GetAuditories();
foreach (var auditory in auditories)
{
Console.WriteLine($"ID: {auditory.Id}, Name: {auditory.Name}");
}
Working with Schedule
using Nure.NET;
using Nure.NET.Types;
// Get group schedule
List<Event>? groupSchedule = Cist.GetEvents(
type: EventType.Group,
id: 10304333 // Group ID
);
// Get schedule for specific period
List<Event>? periodSchedule = Cist.GetEvents(
type: EventType.Group,
id: 10304333,
startTime: 1693170000, // Unix timestamp start period
endTime: 1694811599 // Unix timestamp end period
);
// Get teacher schedule
List<Event>? teacherSchedule = Cist.GetEvents(
type: EventType.Teacher,
id: teacherId
);
// Get auditory schedule
List<Event>? auditorySchedule = Cist.GetEvents(
type: EventType.Auditory,
id: auditoryId
);
// Processing the retrieved schedule
foreach (var event in groupSchedule)
{
Console.WriteLine($"Class #{event.NumberPair}");
Console.WriteLine($"Subject: {event.Subject?.Title}");
Console.WriteLine($"Type: {event.Type}");
Console.WriteLine($"Auditory: {event.Auditory}");
Console.WriteLine($"Start: {DateTimeOffset.FromUnixTimeSeconds((long)event.StartTime)}");
Console.WriteLine($"End: {DateTimeOffset.FromUnixTimeSeconds((long)event.EndTime)}");
// Teachers
foreach (var teacher in event.Teachers)
{
Console.WriteLine($"Teacher: {teacher.FullName}");
}
// Groups
foreach (var group in event.Groups)
{
Console.WriteLine($"Group: {group.Name}");
}
}
📊 Data Types
Event
Represents one class in the schedule:
public class Event
{
public int? NumberPair { get; set; } // Class number
public Subject? Subject { get; set; } // Subject
public long? StartTime { get; set; } // Start time (Unix timestamp)
public long? EndTime { get; set; } // End time (Unix timestamp)
public string? Auditory { get; set; } // Auditory
public string? Type { get; set; } // Class type (Lc, Pr, Lb, etc.)
public List<Teacher>? Teachers { get; set; } // List of teachers
public List<Group>? Groups { get; set; } // List of groups
}
Subject
Subject information:
public class Subject
{
public int? Id { get; set; } // Subject ID
public string? Title { get; set; } // Full name
public string? Brief { get; set; } // Short name
}
EventType
Entity types for schedule retrieval:
public enum EventType
{
Group = 1, // Group schedule
Teacher = 2, // Teacher schedule
Auditory = 3 // Auditory schedule
}
⚠️ Error Handling
The library uses exception mechanism for error handling. All methods can throw an Exception with detailed problem description. It's recommended to wrap method calls in try-catch blocks:
try
{
var groups = Cist.GetGroups();
// Process data
}
catch (Exception e)
{
Console.WriteLine($"Error while getting groups: {e.Message}");
}
🔧 Additional Features
Getting Raw Data
All main methods have overloads that return data in CIST format:
// Get groups in CIST format
string cistGroupsJson = Cist.GetGroups(true);
// Get teachers in CIST format
string cistTeachersJson = Cist.GetTeachers(true);
// Get auditoriums in CIST format
string cistAuditoriesJson = Cist.GetAuditories(true);
Automatic Server Detection
The library automatically checks the availability of CIST servers (cist.nure.ua and cist2.nure.ua) and uses the one that responds faster.
🤝 Contributing
We welcome contributions to the library! If you found a bug or have ideas for improvements, please:
- Fork the repository
- Create a branch for your changes
- Make the necessary changes
- Create a pull request with description of changes
📝 License
This project is distributed under the GNU GPL v3 license. See the LICENSE file for more details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 1.0.3 | 191 | 1/20/2025 | |
| 1.0.2 | 133 | 1/11/2025 | |
| 1.0.1 | 176 | 11/5/2024 | |
| 0.9.8 | 162 | 9/19/2024 | |
| 0.9.7 | 188 | 8/20/2024 | |
| 0.9.6 | 149 | 8/6/2024 | |
| 0.9.5 | 156 | 8/6/2024 | |
| 0.9.0 | 155 | 7/14/2024 | |
| 0.8.7 | 212 | 3/22/2024 | |
| 0.8.6 | 175 | 3/21/2024 | |
| 0.8.5 | 175 | 3/20/2024 | |
| 0.8.4 | 187 | 3/20/2024 | |
| 0.8.3 | 178 | 3/20/2024 | |
| 0.8.2 | 172 | 3/20/2024 | |
| 0.8.1 | 166 | 3/20/2024 | |
| 0.1.3-unstable | 137 | 3/19/2024 | |
| 0.1.2 | 175 | 3/18/2024 | |
| 0.1.1 | 211 | 3/18/2024 | |
| 0.0.5 | 192 | 3/18/2024 | |
| 0.0.4 | 175 | 3/18/2024 |