NeisClient

Struct NeisClient 

Source
pub struct NeisClient { /* private fields */ }

Implementations§

Source§

impl NeisClient

Source

pub fn new(api_key: &str) -> Self

Source

pub async fn school_info( &self, params: SchoolInfoParams, ) -> Result<Vec<SchoolInfoItem>, Error>

학교기본정보 https://open.neis.go.kr/portal/data/service/selectServicePage.do?page=1&rows=10&sortColumn=&sortDirection=&infId=OPEN17020190531110010104913&infSeq=2

§Example
use neis_client::{types::SchoolInfoParams, Error, NeisClient};

let api_key = std::env::var("NEIS_API_KEY").unwrap();
let client = NeisClient::new(&api_key);

let params = SchoolInfoParams {
    SD_SCHUL_CODE: Some(String::from("7010959")),
    ..Default::default()
};
let items = client.school_info(params).await?;
Source

pub async fn class_info( &self, params: ClassInfoParams, ) -> Result<Vec<ClassInfoItem>, Error>

학급정보 https://open.neis.go.kr/portal/data/service/selectServicePage.do?page=1&rows=10&sortColumn=&sortDirection=&infId=OPEN15320190408174919197546&infSeq=2

§Example
use neis_client::{types::ClassInfoParams, Error, NeisClient};

let api_key = std::env::var("NEIS_API_KEY").unwrap();
let client = NeisClient::new(&api_key);

let params = ClassInfoParams::new("B10", "7010959");
let items = client.class_info(params).await?;
Source

pub async fn school_major_info( &self, params: SchoolMajorInfoParams, ) -> Result<Vec<SchoolMajorInfoItem>, Error>

학교학과정보 https://open.neis.go.kr/portal/data/service/selectServicePage.do?page=1&rows=10&sortColumn=&sortDirection=&infId=OPEN14020190311111456561190&infSeq=2

§Example
use neis_client::{types::SchoolMajorInfoParams, Error, NeisClient};

let api_key = std::env::var("NEIS_API_KEY").unwrap();
let client = NeisClient::new(&api_key);

let params = SchoolMajorInfoParams::new("B10").school_code("7010959");
let items = client.school_major_info(params).await?;
Source

pub async fn school_aflco_info( &self, params: SchoolAflcoInfoParams, ) -> Result<Vec<SchoolAflcoInfoItem>, Error>

학교계열정보 https://open.neis.go.kr/portal/data/service/selectServicePage.do?page=1&rows=10&sortColumn=&sortDirection=&infId=OPEN13920190311110530306647&infSeq=2

§Example
use neis_client::{types::SchoolAflcoInfoParams, Error, NeisClient};

let api_key = std::env::var("NEIS_API_KEY").unwrap();
let client = NeisClient::new(&api_key);

let params = SchoolAflcoInfoParams::new("B10").school_code("7010959");
let items = client.school_aflco_info(params).await?;
Source

pub async fn school_schedule( &self, params: SchoolScheduleParams, ) -> Result<Vec<SchoolScheduleItem>, Error>

학사일정 https://open.neis.go.kr/portal/data/service/selectServicePage.do?page=1&rows=10&sortColumn=&sortDirection=&infId=OPEN17220190722175038389180&infSeq=2

§Example
use neis_client::{types::SchoolScheduleParams, Error, NeisClient};

let api_key = std::env::var("NEIS_API_KEY").unwrap();
let client = NeisClient::new(&api_key);

let params = SchoolScheduleParams::new("B10", "7010959");
let items = client.school_schedule(params).await?;
Source

pub async fn els_timetable( &self, params: ElsTimetableParams, ) -> Result<Vec<ElsTimetableItem>, Error>

초등학교시간표 https://open.neis.go.kr/portal/data/service/selectServicePage.do?page=1&rows=10&sortColumn=&sortDirection=&infId=OPEN15020190408160341416743&infSeq=2

§Example
use neis_client::{types::ElsTimetableParams, Error, NeisClient};

let api_key = std::env::var("NEIS_API_KEY").unwrap();
let client = NeisClient::new(&api_key);

let params = ElsTimetableParams::new("B10", "7130126").grade(6).sem(2);
let items = client.els_timetable(params).await?;
Source

pub async fn mis_timetable( &self, params: MisTimetableParams, ) -> Result<Vec<MisTimetableItem>, Error>

중학교시간표 https://open.neis.go.kr/portal/data/service/selectServicePage.do?page=1&rows=10&sortColumn=&sortDirection=&infId=OPEN15120190408165334348844&infSeq=2

§Example
use neis_client::{types::MisTimetableParams, Error, NeisClient};

let api_key = std::env::var("NEIS_API_KEY").unwrap();
let client = NeisClient::new(&api_key);

let params = MisTimetableParams::new("B10", "7130177").grade(3).sem(2);
let items = client.mis_timetable(params).await?;
Source

pub async fn his_timetable( &self, params: HisTimetableParams, ) -> Result<Vec<HisTimetableItem>, Error>

고등학교시간표 https://open.neis.go.kr/portal/data/service/selectServicePage.do?page=1&rows=10&sortColumn=&sortDirection=&infId=OPEN18620200826103326268120&infSeq=2

§Example
use neis_client::{types::HisTimetableParams, Error, NeisClient};

let api_key = std::env::var("NEIS_API_KEY").unwrap();
let client = NeisClient::new(&api_key);

let params = HisTimetableParams::new("B10", "7010959").grade(3).sem(2)
let items = client.his_timetable(params).await?;
Source

pub async fn sps_timetable( &self, params: SpsTimetableParams, ) -> Result<Vec<SpsTimetableItem>, Error>

특수학교시간표 https://open.neis.go.kr/portal/data/service/selectServicePage.do?page=1&rows=10&sortColumn=&sortDirection=&infId=OPEN18520200826093359591792&infSeq=2

§Example
use neis_client::{types::SpsTimetableParams, Error, NeisClient};

let api_key = std::env::var("NEIS_API_KEY").unwrap();
let client = NeisClient::new(&api_key);

let params = SpsTimetableParams::new("B10", "7010575");
let items = client.sps_timetable(params).await?;
Source

pub async fn class_room_info( &self, params: ClassRoomInfoParams, ) -> Result<Vec<ClassRoomInfoItem>, Error>

시간표강의실정보 https://open.neis.go.kr/portal/data/service/selectServicePage.do?page=2&rows=10&sortColumn=&sortDirection=&infId=OPEN14120190311112536362172&infSeq=2

§Example
use neis_client::{types::ClassRoomInfoParams, Error, NeisClient};

let api_key = std::env::var("NEIS_API_KEY").unwrap();
let client = NeisClient::new(&api_key);

let params = ClassRoomInfoParams::new("B10", "7010959");
let items = client.class_room_info(params).await?;
Source

pub async fn academy_info( &self, params: AcademyInfoParams, ) -> Result<Vec<AcademyInfoItem>, Error>

학원교습소정보 https://open.neis.go.kr/portal/data/service/selectServicePage.do?page=1&rows=10&sortColumn=&sortDirection=&infId=OPEN19220231012134453534385&infSeq=2

§Example
use neis_client::{types::AcademyInfoParams, Error, NeisClient};

let api_key = std::env::var("NEIS_API_KEY").unwrap();
let client = NeisClient::new(&api_key);

let params = AcademyInfoParams::new("B10");
let items = client.academy_info(params).await?;
Source

pub async fn meal_service( &self, params: MealServiceParams, ) -> Result<Vec<MealServiceItem>, Error>

급식식단정보 https://open.neis.go.kr/portal/data/service/selectServicePage.do?page=1&rows=10&sortColumn=&sortDirection=&infId=OPEN17320190722180924242823&infSeq=2

§Example
use neis_client::{types::MealServiceParams, Error, NeisClient};

let api_key = std::env::var("NEIS_API_KEY").unwrap();
let client = NeisClient::new(&api_key);

let params = MealServiceParams::new("B10", "7031115").from_ymd(2025, 1, 1);
let items = client.meal_service(params).await?;
Source

pub async fn request<P, T>( &self, resouce: &str, params: P, ) -> Result<Vec<T>, Error>
where P: ToQueryString, T: ExtractFromResponse,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more