Supernova client in Rust

Related tags

Utilities IronPlanet
Overview

What is this?

A client library for the Supernova REST API.

Usage

use iron_planet::{Supernova, RequestConfig};

fn main() {
    // Instantiate an unprivileged client
    let sn = Supernova::new();
    let conf = RequestConfig::default();
    // One can use it to query endpoints that require no auth
    let result = sn.get_buildings(&conf); // Will succeed, hopefully
    // But not to query endpoints that require user auth
    let result = sn.get_class_inst(123, &conf); // Will fail, hopefully
    // It is possible to enable authentication in two different ways
    // One can provide authentication credentials in the form of a user-pass
    // A successful login will return a result with the session token
    let token = sn.login("user", "pass").unwrap();
    sn.logout();
    // The second one is to provide an existing token
    sn.set_auth_token(token);
}

Important notes

  • Every response is cached and currently there is no way to bypass cache other than instantiating a new client.
  • One can call warmup() upon instantiation to eagerly load the buildings, courses, classes, departments and places. This might be desirable to speed up subsequent access in exchange for a startup penalty (between 5 and 15 seconds).
  • If one doesn't desire all of these, it is possible to simply call the get_[collection] functions independently.
  • Most relations are lazily loaded through a special type of pointer that is bound to the client. These can be loaded concurrently.
  • Yes, the library is thread-safe. An async port might happen, but for now this is it.
You might also like...
Flexcord! A custom Discord client to allow you to do what you want!

Disclaimer Flexcord is NO WHERE near done. Flexcord What is it? Flexcord is a Discord client that flexes for your needs, it allows you to do exactly w

OpenAI chat client desktop app (Windows, MacOS, Linux)
OpenAI chat client desktop app (Windows, MacOS, Linux)

ChatWizard OpenAI chat client Desktop Application (Windows, MacOS, Linux) Declaration This project is currently undergoing active development and has

An open-source Windows client for Twitch.tv
An open-source Windows client for Twitch.tv

TwitchBox is a lightweight Windows client created to enhance the Twitch.tv experience. The app uses the Tauri framework, which includes a combination

A swc plugin that automatically converts React component libraries into "React Client Component"

A swc plugin that automatically converts React component libraries into "React Client Component". For example, you can automatically convert components from @mui into "React Client Component" without having to wrap a component that uses "use client".

Unofficial cross-platform Microsoft To Do client

WIP Dev Setup dev env Compile for dev Compile for production Todos (how ironicall to keep them in README xd) Implement task search Implement ability t

Command palette-style Git client for blazing-fast commits.
Command palette-style Git client for blazing-fast commits.

🔎 About Commit Commit is the world's simplest Git client. Open it with a keyboard shortcut, write your commit, and you're done! Commit will automatic

🚧 WIP: API client crate for Bambu Lab printers

Bambulab API 🚧 WORK IN PROGRESS 🚧 This crate is still in development and not ready for production use. Breaking changes may occur at any time. bambu

k-mer counter in Rust using the rust-bio and rayon crates

krust is a k-mer counter written in Rust and run from the command line that will output canonical k-mers and their frequency across the records in a f

Experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code

Diplomat is an experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code. With Diplomat, you can simply define Rust APIs to be exposed over FFI and get high-level C, C++, and JavaScript bindings automatically!

Owner
Nova Universidade Nova de Lisboa
Um grupo sem afiliações à UNL que visa melhorar os serviços prestados pela mesma.
Nova Universidade Nova de Lisboa
RCON client for Rust

rcon-rs Simple implementation of a crate that allows you to work with the RCON protocol To work with TCP, the TcpStream structure built into the std::

Donkey Engine 4 Aug 10, 2022
A Diablo II library for core and simple client functionality, written in Rust for performance, safety and re-usability

A Diablo II library for core and simple client functionality, written in Rust for performance, safety and re-usability

null 4 Nov 30, 2022
A random.org client library for Rust

random.org A https://random.org client library. The randomness comes from atmospheric noise, which for many purposes is better than the pseudo-random

Victor Polevoy 7 Mar 10, 2022
TaurApp is a WhatsApp desktop client powered by Tauri and Rust.

TaurApp TaurApp is a WhatsApp desktop client powered by Tauri and Rust. TaurApp is an experimental client and is initially created to test out Tauri i

Eray Erdin (&mut self) 22 Mar 19, 2023
Simple git/hg tui client focused on keyboard shortcuts

verco A simple Git/Hg tui client focused on keyboard shortcuts Screenshots Platforms This project uses Cargo and pure Rust stable and works on latest

Matheus Lessa Rodrigues 214 Dec 26, 2022
client-server notification center for dbus desktop notifications

tsuchita A client-server notification center for dbus desktop notifications. Specifically org.freedesktop.Notifications dbus messages. Motivation I ju

Jeff Zhao 7 Oct 9, 2022
This is an implementation defining standard for client-side-validation

Client-side-validation Foundation Libraries This is an implementation defining standard of client-side-validation representing a set of its Foundation

LNP/BP Association 8 Dec 3, 2022
Rusty NuGet client

turron It's a NuGet client built in Rust. It's not really meant to replace existing nuget clients. It's more of a playground for experimenting with re

Kat Marchán 18 Feb 2, 2022
FerrisChat's Client

egui template This is a template repo for egui. The goal is for this to be the simplest way to get started writing a GUI app in Rust. You can compile

FerrisChat 5 Nov 23, 2022
A gitmoji interactive client for using gitmojis on commit messages.

gitmoji in Rust This is just an opinionated version of gitmoji-cli written in Rust . A gitmoji interactive client for using gitmojis on commit message

igor 2 Aug 16, 2022