Skip to content

Dormitory

The weekly menu and the notice list that the dormitory site (happydorm.sejong.ac.kr) serves publicly. No login is needed. For an example that turns the menu into a message, see Dormitory and cafeteria bot. Common rules are on Common rules.

Parameter Type Required Default Meaning
location (dormitory_menu, dormitory_notices) string optional SJ Dormitory location value
page (dormitory_notices) integer optional 1 Notice page number
rows (dormitory_notices) integer optional 10 Notices per page
keyword (dormitory_notices) string optional "" Title search text. Empty returns all
  • Naming: Python uses snake_case, Node.js and Java use camelCase. Node.js takes dormitoryMenu(location = 'SJ') and dormitoryNotices({ page, rows, keyword, location }). Java has dormitoryMenu() and dormitoryNotices() without the optional arguments, and the full dormitoryMenu(String location) and dormitoryNotices(int page, int rows, String keyword, String location); pass "" for no search text.
  • School request (menu): POST https://happydorm.sejong.ac.kr/food/indexFoodList.do, form locgbn=<location>.
  • School request (notices): POST https://happydorm.sejong.ac.kr/bbs/getBbsList.do, form cPage, rows, bbs_locgbn, bbs_id=notice, sType=subject, sWord.
  • The answer is JSON with a text/html content type, so the library always reads the body as JSON.

dormitory_menu returns a list of DormitoryMenuDay (7 days) (field names in Python style; Node.js and Java use camelCase). School data changes, so the values are examples.

[
{
"date": "2026-03-02",
"breakfast": "rice soup side dishes",
"lunch": "rice soup main dish kimchi",
"dinner": "rice soup main dish kimchi",
"alternative": "light meal exchange"
}
]

dormitory_notices returns one DormitoryNotices object.

{
"total": 120,
"pinned": [
{ "id": "1001", "title": "Pinned notice title", "date": "2026-03-01", "views": 300, "file_name": "guide.png" }
],
"items": [
{ "id": "1000", "title": "Regular notice title", "date": "2026-02-28", "views": 80, "file_name": "" }
]
}

The dormitory models have no extra. A missing value is an empty string, and views and total are 0.

Field School key Meaning
date fo_date1 to 7 Date
breakfast fo_menu_mor1 to 7 Breakfast
lunch fo_menu_lun1 to 7 Lunch
dinner fo_menu_eve1 to 7 Dinner
alternative fo_sub_menu1 to 7 Alternative menu

Menu strings are the school’s own text, and one cell can hold several dishes strung together. The library does not split them.

Notices (DormitoryNotices and DormitoryNotice)

Section titled “Notices (DormitoryNotices and DormitoryNotice)”
Field School key Meaning
total totalCount[0].cnt Total count (integer)
pinned topList Pinned notices
items list Regular notices

One notice:

Field School key Meaning
id seq Notice number
title subject Title
date regdate Posted date
views visitcnt View count (integer)
file_name file_name1 Attached file name (empty if none)

The author fields (regname, regid) are not read and are not in the result.

  • Cached for one day (86400 seconds by default) per method and arguments (location, page, rows, keyword). One call sends one request.
  • A school failure returns the last cached value; with none, the menu is an empty list and the notices are an object with total 0 and empty lists. Invalid input does not raise.
  • If the root array is missing or empty in the answer, both the menu and the notices fail.
  • Notices only: if topList, list or totalCount is missing, it is treated as “no results”, not an outage, and returns empty lists with total 0. This keeps a search with no matching notice from counting as an outage.
  • The default location SJ is the supported value. For another value, try a real call first.
  • On weekends, before the school posts the menu, today’s date may be missing from the list. Handle it in the caller (Dormitory and cafeteria bot shows the first day instead).
  • An empty list cannot tell “no notices or menu” from “a problem on the school side”.
  • Notice bodies are not provided. You get only title, date, view count and attached file name.
  • Contract source: spec/PUBLIC_DATA.md
List<DormitoryMenuDay> menuDays = publicData.dormitoryMenu(); // 7 days
DormitoryNotices notices = publicData.dormitoryNotices(1, 3, "", "SJ"); // page 1, 3 rows