ExamTools 0.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package ExamTools --version 0.0.5                
NuGet\Install-Package ExamTools -Version 0.0.5                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ExamTools" Version="0.0.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ExamTools --version 0.0.5                
#r "nuget: ExamTools, 0.0.5"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ExamTools as a Cake Addin
#addin nuget:?package=ExamTools&version=0.0.5

// Install ExamTools as a Cake Tool
#tool nuget:?package=ExamTools&version=0.0.5                

ExamTools API Helper

Note - the ExamTools internal API is undocumented and unsupported. It is not intended for external uses. Use this helper class at your own risk.

Getting Started

This helper class consists of 3 action groups

  • Sessions: For taking actions on session objects
  • Users: For taking user-related actions (such as logging into ExamTools)
  • VEs: For taking VE-related actions

Each helper group also contains the base object and static API class for each type.

Setup

Requires a handful of environment variables. If set correctly, all login and session tracking should happen automatically.

  • EXAMTOOLS_ENVIRONMENT - If set to "Production", it will use https://alpha.exam.tools/ as the base URL for ExamTools. Any other value (including null/empty) will use http://examtools.dev as the base ExamTools URL.
  • EXAMTOOLS_USERNAME - your ExamTools user name
  • EXAMTOOLS_PASSWORD - your ExamTools password

Rough usage

Session Class

The Session class is a C# class that implements the IAsyncDisposable interface. It represents a session and contains various properties related to the session.

Properties

  • Id: (string, nullable) Represents the session ID.
  • SessionDef: (string) Represents the session definition.
  • SequenceNumber: (int) Represents the sequence number of the session.
  • Owner: (string) Represents the owner of the session.
  • SessionCallsign: (string) Represents the callsign associated with the session.
  • SessionSummary: (string) Represents the summary of the session.
  • Date: (DateTime) Represents the date of the session.
  • Vec: (VEC.VECs) Represents the VEC (Volunteer Examiner Coordinator) associated with the session.
  • SessionState: (State) Represents the state of the session.
  • ApplicantCount: (int) Represents the count of applicants for the session.
  • ApplicantLimit: (int) Represents the limit of applicants for the session.
  • TeamHash: (string) Represents the hash associated with the team of the session.
  • TeamLeadCallsign: (string) Represents the callsign of the team lead.
  • TeamId: (string) Represents the ID of the team.
  • SessionIdentifier: (string) Represents the identifier of the session.
  • TeamDescription: (string) Represents the description of the team.
  • SessionVes: (List<Ve>) Represents a list of VEs (Volunteer Examiners) associated with the session.
  • SessionType: (Type) Represents the type of the session.
  • ScheduleOnly: (bool) Indicates if the session is scheduled only.
  • StreetAddress: (string) Represents the street address of the session.
  • City: (string) Represents the city of the session.
  • State: (string) Represents the state of the session.
  • ZipCode: (string) Represents the zip code of the session.
  • CanEdit: (bool) Indicates if the session can be edited.
  • CanVisit: (bool) Indicates if the session can be visited.
  • AmAssigned: (bool) Indicates if the session is assigned.

Constructors

  • Session(): Default constructor.
  • Session(string sessionId): Constructor with a parameter to set the session ID.
  • Session(SessionRaw sessionRaw): Constructor that initializes the object from a SessionRaw object.

Methods

  • DisposeAsync(): Implements the DisposeAsync method of the IAsyncDisposable interface. Returns a completed ValueTask.

Note: The class uses enums and other custom types such as VEC.VECs, State, and Type. The constructor also handles the conversion from a SessionRaw object to initialize the Session object.

Api Class Documentation

The Api class provides methods to interact with the ExamTools API for managing exam sessions.

Properties

ExamToolsUrl

  • Type: string?
  • Description: The base URL for ExamTools API, determined based on the environment (Production or Development).

Fields

Client

  • Type: RestClient
  • Description: An instance of the RestClient class configured to communicate with the ExamTools API. It includes a base URL and a CookieContainer obtained from the GetLoginCookie method.

Methods

GetSessionList

public static async Task<List<Session>> GetSessionList(VECs vec, DateTime startDate = default(DateTime),
    DateTime endDate = default(DateTime), string teamName = "")
  • Description: Retrieves a list of exam sessions based on specified criteria.
  • Parameters:
    • vec: The VECs enumeration representing the VEC (Volunteer Examiner Coordinator).
    • startDate (optional): The start date for filtering sessions (default is default(DateTime)).
    • endDate (optional): The end date for filtering sessions (default is default(DateTime)).
    • teamName (optional): The team name for additional filtering (default is an empty string).
  • Returns: A list of Session objects.

GetSessionDetailsFromExamTools

public static async Task<Session> GetSessionDetailsFromExamTools(this string Id)
  • Description: Retrieves details of a specific exam session using its identifier.
  • Parameters:
    • Id: The identifier of the exam session.
  • Returns: A Session object representing the details of the specified session.

Example Usage

// Get a list of sessions
List<Session> sessions = await Api.GetSessionList(VECs.ARRL, new DateTime(2023, 01, 01), new DateTime(2023, 12, 31), "TeamA");

// Get details of a specific session
Session sessionDetails = await "session_id_123".GetSessionDetailsFromExamTools();

Note: Replace VECs.ARRL and "session_id_123" with appropriate values in your application.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.0.6 181 1/3/2024
0.0.5 102 1/3/2024
0.0.4 110 1/3/2024
0.0.3 153 12/7/2023
0.0.2 105 12/6/2023