Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/5d-jh/school-menu-api
π« νκ΅ API - μ΄Β·μ€Β·κ³ λ±νκ΅ μλ¨ λ° νκ΅μ 보 μ½κ² λΆλ¬μ€κΈ°
https://github.com/5d-jh/school-menu-api
firebase-functions monorepo nodejs rest-api school-api
Last synced: 7 days ago
JSON representation
π« νκ΅ API - μ΄Β·μ€Β·κ³ λ±νκ΅ μλ¨ λ° νκ΅μ 보 μ½κ² λΆλ¬μ€κΈ°
- Host: GitHub
- URL: https://github.com/5d-jh/school-menu-api
- Owner: 5d-jh
- Created: 2018-07-30T11:37:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-04T15:54:26.000Z (over 1 year ago)
- Last Synced: 2023-07-04T16:36:10.586Z (over 1 year ago)
- Topics: firebase-functions, monorepo, nodejs, rest-api, school-api
- Language: HTML
- Homepage: https://school-api.xyz/api
- Size: 3.07 MB
- Stars: 46
- Watchers: 4
- Forks: 6
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# νκ΅μλ¨ API
**[νκ΅μλ¨ API, νκ΅μ 보 APIλ 2023λ 8μ 1μΌλΆλ‘ μ’ λ£λ©λλ€.
](https://github.com/5d-jh/school-menu-api/issues/216)**
## κ°μ λ° νΉμ§
**λμ± μ νν μ 보λ₯Ό 보μ₯νλ [λμ΄μ€ κ΅μ‘μ 보 κ°λ°©ν¬νΈ](https://open.neis.go.kr/portal/mainPage.do) μ¬μ©μ κΆμ₯ν©λλ€.**[HTTP GET μμ²](https://opentutorials.org/course/3385/21674)μ ν΅ν΄ νκ΅ μλ¨μ [JSON](https://opentutorials.org/course/1375/6844)μΌλ‘ λ°μ μ΄λ€ νλ«νΌμμλ μ½κ² λΆλ¬μ¬ μ μμ΅λλ€.
[school-api](https://github.com/agemor/school-api) νλ‘μ νΈκ° μ μμ ν° λμμ΄ λμμ΅λλ€.μλ¨μ ν λ² μ΄μ μμ² μ μμ²ν νκ΅, λ , μλ³λ‘ μλ¨μ΄ μλ²μ μ μ₯λμ΄ μλ΅ μλκ° λν κ°μ λ©λλ€.
μ΄λ±νκ΅, μ€νκ΅, κ³ λ±νκ΅λ₯Ό μ§μν©λλ€.
## νκ΅ μ ν
* μ΄λ±νκ΅: `elementary`
* μ€νκ΅: `middle`
* κ³ λ±νκ΅: `high`## νκ΅ μ½λ
[μ¬κΈ°](https://school-api.xyz/code/app)μμ νκ΅ μ½λλ₯Ό νμΈν μ μμ΅λλ€.## μλ¨ λΆλ¬μ€κΈ°
`https://school-api.xyz/api/[νκ΅μ ν]/[νκ΅μ½λ]`λ‘ νμ¬ λ¬μ μλ¨μ λΆλ¬μ¬ μ μμ΅λλ€. μλ΅ λ°μ΄ν°λ JSON μ λλ€.### 맀κ°λ³μ(μ νμ¬ν)
λ€μκ³Ό κ°μ΄ μ£Όμ λμ λ³μλͺ κ³Ό κ°μ μ μ΄ μ¬μ©ν©λλ€.
https://school-api.xyz/api/[νκ΅μ ν]/[νκ΅μ½λ]?[λ³μλͺ 1]=[κ°1]&[λ³μλͺ 2]=[κ°2]
| λ³μλͺ | μ€λͺ | κΈ°λ³Έκ° |
| :------: | ------ | ------ |
| year | νΉμ ν λ λλ₯Ό μ§μ νμ¬ ν΄λΉ λ λμ ν΄λΉνλ μλ¨μ λΆλ¬μ΅λλ€. | νμ¬ λ μ§μ μ°λ |
| month | νΉμ ν λ¬μ μ§μ νμ¬ ν΄λΉ λ¬μ ν΄λΉνλ μλ¨μ λΆλ¬μ΅λλ€. | νμ¬ λ μ§μ μ |
| date | νΉμ ν μΌμ μ§μ νμ¬ ν΄λΉ λ μ§μ ν΄λΉνλ μλ¨μ λΆλ¬μ΅λλ€. | νμ¬ λ μ§μ μΌ |
| allergy | `hidden`μΌλ‘ μ€μ νλ©΄ μλ λ₯΄κΈ° μ λ³΄κ° νμλμ§ μμΌλ©°, `formed`λ‘ μ€μ νλ©΄ μ λ³΄κ° κ΅¬μ‘°νλμ΄ νμλ©λλ€. | μμ |## μμ
> Node.js
```javascript
const request = require('request');const url = 'https://school-api.xyz/api/high/X123456789?date=23';
request(url, (err, res, body) => {
var json = JSON.parse(body);
console.log(json);
});
```
> Python
```python
import requests
import jsonurl = 'https://school-api.xyz/api/middle/X123456789?year=2018&month=5'
response = requests.get(url)
school_menu = json.loads(response.text)
print(school_menu)
```### μλ΅
```
{
menu: [
...,
{
date:"5",
breakfast:["μ°Ήμλ°₯","νν©λ―Έμκ΅5.6.","λκ°λΉ5.6.13.","κΉκ΅¬μ΄13.","λ°°μΆκΉμΉ9.13.","λ°©μΈν λ§ν 12."],
lunch:["νλ―Έλ°₯","콩λλ¬Όκ΅5.13.","λΌμ§λ±λΌκΉμΉμ°9.10.13.","λν 리묡무침5.6.13.","μ΄κ°κΉμΉ9.13.","μ²ν¬λ"],
dinner:["μ°Ήμλ°₯","μ€μ§μ΄μ§¬λ½κ΅5.6.","λ°°μΆκ²μ μ΄13.","ν¬λμ₯¬μ€5.13.","λ§λμ€κΌ¬λ Έλ―ΈμΌλΌ1.5.6.10.12.13."]
},
...
],
server_message: ["foo", "bar", ...]
}
```## κΈ°ν μ¬ν
### μ§μ λΉλ λ° λ°°ν¬νκΈ°
μ€λΉμ¬ν
* Node.js 16
* Firebase CLI
* Firebase Consoleμμ μμ±ν νλ‘μ νΈνλ‘μ νΈ λ£¨νΈμ μμΉν `.firebaserc` νμΌμμ firebase project idλ₯Ό μμ ν ν, λ€μκ³Ό κ°μ΄ λͺ λ Ήμ΄λ₯Ό μ€ννλ©΄ λ°°ν¬ν μ μμ΅λλ€.
```sh
firebase deploy
```### μ μκΆ
ν΄λΉ νλ‘μ νΈλ MIT λΌμ΄μ μ€ νμ λ°°ν¬λλ©°, μμ , 볡μ , 2μ°¨ μ°½μ, μ리μ μ¬μ©, λ€λ₯Έ λΌμ΄μ μ€ νμ μ¬λ°°ν¬ λ±μ΄ κ°λ₯ν©λλ€. λ€λ§ ν΄λΉ νλ‘μ νΈμ κ΄λ ¨λ νΌν΄μ λν΄ μ± μμ§μ§ μμ΅λλ€.