From 3d2bded276c78603d11fcb5daf02b408f0af7fbb Mon Sep 17 00:00:00 2001 From: syamasaw <17191sawa@gmail.com> Date: Thu, 25 Jul 2024 16:27:25 +0900 Subject: [PATCH 1/4] fix readme --- README.md | 69 +++++++++++++++---------------------------------------- 1 file changed, 19 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index bd4db84..d178f90 100644 --- a/README.md +++ b/README.md @@ -1,63 +1,32 @@ -# Go Web Application +# 42ActivityAPI -このプロジェクトは、Gin Webフレームワークを使用したGo言語によるWebアプリケーションです。認証フローを実装しており、ユーザーが42 APIを通じて自身のデータを取得できるようにします。 +This repository contains APIs written in Go language that are provided to a system aimed at streamlining 42Tokyo's operations and visualizing student contributions. -## 始め方 +## Overview +- Endpoints involved in school cleaning shift management. +- Endpoints involved in managing users. +- Endpoints involved in recording student contributions. +- Endpoints involved in managing NFC readers. -このプロジェクトを使用するには、以下の手順に従ってください。 +## Getting started +This API requires Go, docker, and the 42API UID and secret. -### 必要条件 - -- Go言語がインストールされていること -- `git` がインストールされていること -- 42 APIへのアクセスと、クライアントID (`UID`) とクライアントシークレット (`SECRET`) を取得していること - -### インストール方法 - -1. リポジトリをクローンします。 - - ```bash - git clone https://github.com/your-username/your-project-name.git - cd your-project-name +1. Clone the repository. ``` - -2. `.env` ファイルをプロジェクトのルートに作成し、以下の環境変数を設定します。 - + git clone https://github.com/42association/42ActivityAPI.git + cd 42ActivityAPI ``` - UID=your_42_api_client_id - SECRET=your_42_api_client_secret - CALLBACK_URL=your_callback_url - ``` - -3. 依存関係をインストールします。 - ```bash - go mod tidy +2. Write environment variables to `.env`. +3. Execute the API. ``` - -4. アプリケーションを実行します。 - - ```bash - go run . + make up ``` - これにより、デフォルトで `localhost:8080` にWebサーバーが立ち上がります。 - -## 使用方法 - -アプリケーションが実行されているときに、ブラウザを開き `http://localhost:8080` にアクセスしてください。ユーザー認証を行い、認証が成功すると、ユーザーの42 Intra名が表示されます。 - -## 機能 - -- `.env` ファイルからの環境変数の読み込み -- 42 APIを使用したOAuth認証 -- ユーザーデータの取得と表示 -- エラーハンドリング - -## 貢献 +## Usage -プルリクエストはいつでも歓迎です。大きな変更を考えている場合は、まずissueを開いて話し合ってください。 +After executing the API, access the /apidoc endpoint. -## ライセンス +## Contribution -[MIT](https://choosealicense.com/licenses/mit/) \ No newline at end of file +Pull requests are always welcome, but if you're thinking of making major changes, please open an issue first to discuss it. \ No newline at end of file From d8b866406499d886bd3a24b61c2ff8ceddc69239 Mon Sep 17 00:00:00 2001 From: syamasaw <138424335+Sawawa42@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:30:16 +0900 Subject: [PATCH 2/4] Create LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1204282 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 42association + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 7d24cca5ba57f2666592ec163a0a91a8851162c7 Mon Sep 17 00:00:00 2001 From: syamasaw <17191sawa@gmail.com> Date: Thu, 25 Jul 2024 16:32:59 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=82=BB=E3=83=B3?= =?UTF-8?q?=E3=82=B9=E3=81=B8=E3=81=AE=E3=83=AA=E3=83=B3=E3=82=AF=E3=81=AE?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d178f90..87de7fc 100644 --- a/README.md +++ b/README.md @@ -29,4 +29,8 @@ After executing the API, access the /apidoc endpoint. ## Contribution -Pull requests are always welcome, but if you're thinking of making major changes, please open an issue first to discuss it. \ No newline at end of file +Pull requests are always welcome, but if you're thinking of making major changes, please open an issue first to discuss it. + +## LICENSE + +[MIT](./LICENSE) \ No newline at end of file From 29711f648a62d15b2a5a524155a24791e017313d Mon Sep 17 00:00:00 2001 From: syamasaw <17191sawa@gmail.com> Date: Thu, 25 Jul 2024 16:40:15 +0900 Subject: [PATCH 4/4] =?UTF-8?q?openapi.yml=E3=81=B8=E3=81=AE=E3=83=AA?= =?UTF-8?q?=E3=83=B3=E3=82=AF=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 87de7fc..de49c91 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ This API requires Go, docker, and the 42API UID and secret. ## Usage -After executing the API, access the /apidoc endpoint. +[openapi.yml](./api/openapi/openapi.yml) ## Contribution