[−][src]Struct studentvue::client::Client
Struct which connects to the StudentVUE service
Fields
uri: Cow<'c, str>
user: &'c str
pwd: &'c str
Methods
impl<'c> Client<'c>
[src]
pub fn create(
district_url: &'c str,
username: &'c str,
password: &'c str
) -> Self
[src]
district_url: &'c str,
username: &'c str,
password: &'c str
) -> Self
Instantiates a new Client
with the username, password, and corresponding StudentVUE district url
pub async fn call_service<'_>(
&'_ self,
web_service_handle: WebServiceHandle,
method_name: Method,
param_str: ParamBuilder
) -> Result<String, VueError>
[src]
&'_ self,
web_service_handle: WebServiceHandle,
method_name: Method,
param_str: ParamBuilder
) -> Result<String, VueError>
Calls a method from a specified WebServiceHandle
with the specified parameters
Example
use studentvue::{ client::Client, enums::{Method, WebServiceHandle}, client::ParamBuilder }; use std::env; #[tokio::main] async fn main() { let (user, pwd) = (env::args().next().unwrap(), env::args().next().unwrap()); let client = Client::create("https://studentvue.phoenixunion.org", user.as_str(), pwd.as_str()); let xml = client.call_service(WebServiceHandle::PXPWebServices, Method::StudentSchoolInfo, ParamBuilder::create()) .await .expect("Could not call service!"); println!("{}", xml); }
pub async fn get_grades<'_>(
&'_ self,
report_period: Option<u64>
) -> Result<GbData, VueError>
[src]
&'_ self,
report_period: Option<u64>
) -> Result<GbData, VueError>
Retrieves grades from a student; can be current or from a specified reporting period
pub async fn get_attendance<'_>(&'_ self) -> Result<AttData, VueError>
[src]
Gets the absences from the student
pub async fn get_student_info<'_>(&'_ self) -> Result<Student, VueError>
[src]
Retrieves student information such as their name, address, and grade
pub async fn get_schedule<'_>(
&'_ self
) -> Result<StudentClassSchedule, VueError>
[src]
&'_ self
) -> Result<StudentClassSchedule, VueError>
Retrieves the student's current school schedule
pub async fn get_school_info<'_>(
&'_ self
) -> Result<StudentSchoolInfoListing, VueError>
[src]
&'_ self
) -> Result<StudentSchoolInfoListing, VueError>
Grabs information about the currently attended school
Trait Implementations
impl<'c> Clone for Client<'c>
[src]
impl<'c> Debug for Client<'c>
[src]
impl<'c> PartialEq<Client<'c>> for Client<'c>
[src]
impl<'c> StructuralPartialEq for Client<'c>
[src]
Auto Trait Implementations
impl<'c> RefUnwindSafe for Client<'c>
impl<'c> Send for Client<'c>
impl<'c> Sync for Client<'c>
impl<'c> Unpin for Client<'c>
impl<'c> UnwindSafe for Client<'c>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,