hokudai Hupass
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # API仕様書 ## /api/token:POST ### summary よくわかってないです ### description ### parameters ### responses ## /api/login ### summary よくわかってないです ### description ### parameters ### responses ## /api/user/{uuid}:GET ### summary ユーザー情報を取得 ### description uuidからUserオブジェクトを取得し、情報を返す ### parameters #### uuid - in: path - description: 対象ユーザーのuuid - required: true ### responses #### 200 正常に取得が完了 ```json { "username": "山田 太郎", "email": "yamada@test.email.com", "picture_url": "https://api.hupass.hu-jagajaga.com/media/images/social_uuid.jpg" } ``` #### 403 Admin権限がないか、リクエストユーザーが対象ユーザーではない #### 404 対象のユーザーデータが存在しない ## /api/search-options:GET ### summary 授業検索時の絞り込み要素一覧を返す ### description 複数選択可能か、択一選択かで`type`ラベルが変わる 複数選択のときは`multiple_choice`、択一選択のときは`choice` ### parameters なし ### responses #### 200 ```json [ { "name": "year", "label": "年度", "type": "choice", "choices": [ [ "", "---------" ], [ 2024, 2024 ] ] }, { "name": "semester", "label": "学期", "type": "multiple_choice", "choices": [ [ "1学期", "1学期" ], [ "2学期", "2学期" ] ] }, { "name": "faculty", "label": "学部", "type": "multiple_choice", "choices": [ [ "全学教育", "全学教育" ], [ "医学部", "医学部" ] ] }, { "name": "period", "label": "時限", "type": "multiple_choice", "choices": [ [ "1-1", "月1" ], [ "2-1", "火1" ] ] } ] ``` ## /api/sort-options:GET ### summary 授業検索時の並び替え要素の一覧を返す ### description デフォルトの選択肢には`default: true`要素がつけられる ### parameters なし ### responses ```json [ { "name": "relevance", "label": "関連度順", "default": true }, { "name": "-relevance", "label": "関連度順(逆順)", "default": false }, { "name": "credit", "label": "単位数", "default": false }, { "name": "gpa", "label": "GPA", "default": false }, { "name": "pass_rate", "label": "合格率", "default": false }, { "name": "A_rate", "label": "A帯率", "default": false }, ] ``` ## /api/classes:GET ### summary 授業一覧を検索 ### description `/api/search-options/`や`/api/sort-options`の選択肢を使い、フィルター、並べかえを行う また、時間割id(cls_id)を持っていない授業は検索結果から除外している ### parameters #### year - in: query - description: 開講年度 - required: false #### semester - in: query - description: 開講学期 - required: false #### faculty - in: query - description: 開講学部 - required: false #### period - in: query - description: 開講時間割 - required: false - schema - type: array #### keyword - in: query - description: 検索キーワード - required: false #### order_by - in: query - description: 並べ替え順序 - required: false ### responses #### 200 正常に検索が完了 ```json { "links": { "next": "http://api.hupass.hu-jagajaga.com/api/classes/?keyword=&order_by=relevance&page=2&period=2-1&period=4-1&year=2022", "previous": null, "pageless": "http://api.hupass.hu-jagajaga.com/api/classes/?keyword=&order_by=relevance&period=2-1&period=4-1&year=2022" }, "count": 468, "total_pages": 16, "current_page": 1, "results": [ { "id": 463, "subject": "思索と言語", "theme": "ことばを科学する:人間の再発見", "is_enrolled": false, "teacher": "奥 聡 (大学院メディア・コミュニケーション研究院)", "year": 2022, "semester": "1学期", "place": "", "elig_min": 1, "elig_max": null, "elig_dep": "基礎1-53組", "credit": 2.0, "sort": "全学教育科目(主題別科目)", "big_code": "GEN_LIB", "code": 1200, "cls_id": 503, "keywords": [ { "id": 2308, "cls": 463, "keyword": "科学とは何か" }, { "id": 2309, "cls": 463, "keyword": "音韻" }, { "id": 2310, "cls": 463, "keyword": "子どもの母語獲得" }, { "id": 2311, "cls": 463, "keyword": "日英語比較" }, { "id": 2312, "cls": 463, "keyword": "文法" }, { "id": 2313, "cls": 463, "keyword": "言語" }, { "id": 2314, "cls": 463, "keyword": "意味" } ], "periods": [ { "period": 1, "day": 2 } ], "faculty": "全学教育", "moodle_id": null, "grade_info": { "id": 36742, "subject": "思索と言語", "lecture": "ことばを科学する:人間の再発見", "group": "基礎1-53組", "teacher": "奥聡", "year": "2021", "semester": "1学期", "faculty": "全学教育", "numOfStudents": 55, "gpa": 3.05, "ap": 6, "a": 5, "am": 8, "bp": 4, "b": 14, "bm": 9, "cp": 1, "c": 5, "d": 0, "dm": 1, "f": 2, "created_at": "2022-02-09T15:44:30+09:00" }, "urls": { "syllabus": "http://syllabus01.academic.hokudai.ac.jp/Syllabi/Public/Syllabus/SylDetail.aspx?lct_year=2022&lct_cd=000503&langMode=1", "moodle": null, "elms": "https://www.elms.hokudai.ac.jp/group/grouppage?idnumber=p22000503" } } ] } ``` ## /api/classes/{id}:GET ### summary 特定の授業情報を取得 ### description ### parameters なし ### responses #### 200 正常にデータを取得 ```json { "id": 1, "subject": "一般教育演習(フレッシュマンセミナー)", "theme": "日本における哲学と宗教", "is_enrolled": false, "teacher": "山畑 倫志 (高等教育推進機構)", "year": 2022, "semester": "1学期", "place": "", "elig_min": 1, "elig_max": null, "elig_dep": "基礎1-52組", "credit": 2.0, "sort": "全学教育科目(一般教育演習)", "big_code": "GEN_LIB", "code": 1000, "cls_id": 241, "keywords": [ { "id": 1, "cls": 1, "keyword": "日本の宗教" }, { "id": 2, "cls": 1, "keyword": "日本哲学" }, { "id": 3, "cls": 1, "keyword": "グループワーク" }, { "id": 4, "cls": 1, "keyword": "異文化コミュニケーション" } ], "periods": [ { "period": 3, "day": 1 } ], "faculty": "全学教育", "moodle_id": null, "grade_info": null, "urls": { "syllabus": "http://syllabus01.academic.hokudai.ac.jp/Syllabi/Public/Syllabus/SylDetail.aspx?lct_year=2022&lct_cd=000241&langMode=1", "moodle": null, "elms": "https://www.elms.hokudai.ac.jp/group/grouppage?idnumber=p22000241" } } ``` #### 404 指定した授業が存在しない ## /api/myclass:GET ### summary 履修授業の一覧を返す ### description ### parameters ### responses #### 200 #### 403 ## /api/myclass:POST ### summary 履修授業の新規登録 ### description リクエストしたユーザーと、指定された授業を履修授業としてDBに登録し、登録された授業を返す ### requestBody ```json { "cls_id": 10 # UnivClassのpk (required) } ``` ### responses ## /api/myclass/{classId}:GET ### summary ログインユーザーの登録時間割を取得 ### description リクエストしたユーザー情報を取得し、classIdとユーザーが一致するEnrolledClassを返す ### requestBody ```json { } ``` ### responses #### 200 正常に処理が完了 ```json { "id": "test" } ``` #### 400 pkが空 ```json { "detail": "pk must not be empty." } ``` #### 304 存在しないインスタンスを指定した ```json { "detail": "instance did not found." } ``` ## /api/myclass:PATCH ### summary ログインユーザーの登録時間割を一部更新 ### description リクエストしたユーザー情報を取得し、classIdとユーザーが一致するEnrolledClassの内容を変更する ### requestbody ```json { "cls_id": 10, # UnivClassのpk (required) "memo": "メモ", # メモ "color": "#000000", "c_subject": "数学", "c_theme": "テストテーマ", "c_moodle_id": 12345, "c_teacher": "テスト先生", "c_place": "テスト教室", "c_periods": [ { "day": 1, "period": 1, }, { "day": 2, "period": 2, }, ], } ``` ### responses #### 200 #### 400 #### 304 ## /api/general:POST ### summary 必修の授業を返却する ### description 基礎クラス等の情報をもとに必修科目をすべて返す ### requestbody ```json { "year": 2023, # 年度 (required) "department": 2, # 理系: 2, 文系: 1 (required) "base_class": 60, # 基礎クラス (required) "second_language": "de", # de, ch, kr, fr, ru, esから1つ指定 (required) "second_language_subclass": 1, # 理系ドイツ語用 1,2,3 -> A, B, C "second_language_class": 3, # 二外クラス (required) "eng1_class": 60, # 英語Ⅰクラス (required) "eng2_class": 60, # 英語Ⅱクラス (required) "student_id_last2": 15, # 学生番号下2桁 (required) "science_exp_class": ["ph", "ch"] # ph, ch, bi, geから2つ指定 } ``` ### responses #### 200 正常に処理が終了 ```json { "riberal_arts": { "freshman_seminar": [ 6378, 6379 ], "general_subjects": { "environment_and_people": [ 6757, 6758 ], "health_and_society": [ 6760, 6761 ], "people_and_culture": [ 6762, 6763 ], "special_lecture": [ 7517, 7518 ], }, "subject_specific": { "thoughts_and_languages": thoughts_and_languages, "historical_perspectives": historical_perspectives, "arts_and_literature": arts_and_literature, "perceptions_of_society": perceptions_of_society, "the_world_of_science_and_technology": the_world_of_science_and_technology, }, "foreign_languages": { "english_I": english_I, "english_II": english_II, "second_I": second_I, "second_II": second_II, }, "foreign_language_seminar": { "english_skill_focused_seminar": english_skill_focused_seminar, "english_seminar": english_seminar, "second_language_seminar": second_language_seminar, }, "common_subjects": { "physical_education_A": physical_education_A, "physical_education_B": physical_education_B, "introduction_to_informatics_I": introduction_to_informatics_I, "introduction_to_informatics_II": introduction_to_informatics_II, "statistics": statistics, }, }, "fundamental_courses": { "humanities": {"basics_of_humanities_and_social_sciences": basics_of_humanities_and_social_sciences}, "mathematics": { "linear_algebra_I": linear_algebra_I, "linear_algebra_II": linear_algebra_II, "calculus_I": calculus_I, "calculus_II": calculus_II, }, "science": { "physics_I": physics_I, "physics_II": physics_II, "chemistry_I": chemistry_I, "chemistry_II": chemistry_II, "biology_I": biology_I, "biology_II": biology_II, "basic_earth_and_planetary_science_I": basic_earth_and_planetary_science_I, "basic_earth_and_planetary_science_II": basic_earth_and_planetary_science_II, }, "experiment": { "experiments_of_psychology": experiments_of_psychology, "laboratory_exercise_in_natural_sciences": laboratory_exercise_in_natural_sciences, }, }, } ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully