diff --git a/app/controllers/template_message_settings_controller.rb b/app/controllers/template_message_settings_controller.rb
new file mode 100644
index 000000000..967481f2a
--- /dev/null
+++ b/app/controllers/template_message_settings_controller.rb
@@ -0,0 +1,8 @@
+class TemplateMessageSettingsController < ApplicationController
+ before_action :require_login
+
+ def index
+ @group_settings = TemplateMessageSetting.group(:type).count
+ end
+
+end
\ No newline at end of file
diff --git a/app/docs/slate/source/includes/_users.md b/app/docs/slate/source/includes/_users.md
index 9d6b80927..d02516024 100644
--- a/app/docs/slate/source/includes/_users.md
+++ b/app/docs/slate/source/includes/_users.md
@@ -372,6 +372,146 @@ await octokit.request('PATCH/PUT /api/users/:login.json')
"message": "success"
}
```
+
+## 获取平台消息设置配置信息
+获取平台消息设置配置信息
+
+> 示例:
+
+```shell
+curl -X GET http://localhost:3000/api/template_message_settings.json
+```
+
+```javascript
+await octokit.request('GET /api/template_message_settings.json')
+```
+
+### HTTP 请求
+`GET /api/template_message_settings.json`
+
+### 返回字段说明:
+参数 | 类型 | 字段说明
+--------- | ----------- | -----------
+|type |string |消息配置类型 |
+|type_name |string |消息配置类型含义|
+|total_settings_count |int |配置条数|
+|settings.name |string |配置名称|
+|settings.key |string |配置标识|
+|settings.notification_disabled |boolean |站内信设置是否禁用|
+|settings.email_disabled |boolean |邮件设置是否禁用|
+
+
+> 返回的JSON示例:
+
+```json
+{
+ "status": 0,
+ "message": "响应成功",
+ "setting_types": [
+ {
+ "type": "TemplateMessageSetting::CreateOrAssign",
+ "type_name": "我创建的或负责的",
+ "total_settings_count": 4,
+ "settings": [
+ {
+ "name": "易修状态变更",
+ "key": "IssueChanged",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "易修被指派",
+ "key": "IssueAssigned",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "合并请求被指派",
+ "key": "PullRequestAssigned",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "合并请求状态变更",
+ "key": "PullRequestAssigned",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ }
+ ]
+ },
+ {
+ "type": "TemplateMessageSetting::ManageProject",
+ "type_name": "我管理的仓库",
+ "total_settings_count": 4,
+ "settings": [
+ {
+ "name": "有新的易修",
+ "key": "ProjectIssue",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "有新的合并请求",
+ "key": "ProjectPullRequest",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "有成员变动",
+ "key": "ProjectMember",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "设置更改",
+ "key": "ProjectSettingChanged",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ }
+ ]
+ },
+ {
+ "type": "TemplateMessageSetting::Normal",
+ "type_name": "",
+ "total_settings_count": 3,
+ "settings": [
+ {
+ "name": "被拉入或移出组织",
+ "key": "Organization",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "被拉入或移出项目",
+ "key": "Project",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "有权限变更",
+ "key": "Permission",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ }
+ ]
+ }
+ ]
+}
+```
+
## 获取用户星标项目
获取用户星标项目
diff --git a/app/models/template_message_setting.rb b/app/models/template_message_setting.rb
index 349805bd3..a9c81500b 100644
--- a/app/models/template_message_setting.rb
+++ b/app/models/template_message_setting.rb
@@ -15,7 +15,16 @@
class TemplateMessageSetting < ApplicationRecord
+ scope :openning, ->() {where(openning: true)}
+
+ def self.type_name
+ ""
+ end
+
def self.build_init_data
-
+ TemplateMessageSetting::CreateOrAssign.build_init_data
+ TemplateMessageSetting::ManageProject.build_init_data
+ TemplateMessageSetting::Normal.build_init_data
+ TemplateMessageSetting::WatchProject.build_init_data
end
end
diff --git a/app/models/template_message_setting/create_or_assign.rb b/app/models/template_message_setting/create_or_assign.rb
index 385a3af8a..df98a5ca9 100644
--- a/app/models/template_message_setting/create_or_assign.rb
+++ b/app/models/template_message_setting/create_or_assign.rb
@@ -16,6 +16,10 @@
#我创建的或负责的
class TemplateMessageSetting::CreateOrAssign < TemplateMessageSetting
+ def self.type_name
+ "我创建的或负责的"
+ end
+
def self.build_init_data
self.find_or_create_by(name: "易修状态变更", key: "IssueChanged")
self.find_or_create_by(name: "易修被指派", key: "IssueAssigned")
diff --git a/app/models/template_message_setting/manage.rb b/app/models/template_message_setting/manage_project.rb
similarity index 86%
rename from app/models/template_message_setting/manage.rb
rename to app/models/template_message_setting/manage_project.rb
index 925d503f3..b0f535ea2 100644
--- a/app/models/template_message_setting/manage.rb
+++ b/app/models/template_message_setting/manage_project.rb
@@ -14,7 +14,11 @@
#
#我管理的
-class TemplateMessageSetting::Manage < TemplateMessageSetting
+class TemplateMessageSetting::ManageProject < TemplateMessageSetting
+
+ def self.type_name
+ "我管理的仓库"
+ end
def self.build_init_data
self.find_or_create_by(name: "有新的易修", key: "ProjectIssue")
diff --git a/app/models/template_message_setting/normal.rb b/app/models/template_message_setting/normal.rb
index 9801891a3..789e35b63 100644
--- a/app/models/template_message_setting/normal.rb
+++ b/app/models/template_message_setting/normal.rb
@@ -15,6 +15,10 @@
class TemplateMessageSetting::Normal < TemplateMessageSetting
+ def self.type_name
+ ""
+ end
+
def self.build_init_data
self.find_or_create_by(name: "被拉入或移出组织", key: "Organization")
self.find_or_create_by(name: "被拉入或移出项目", key: "Project")
diff --git a/app/models/template_message_setting/watch.rb b/app/models/template_message_setting/watch_project.rb
similarity index 80%
rename from app/models/template_message_setting/watch.rb
rename to app/models/template_message_setting/watch_project.rb
index d6d5820a3..169e68e80 100644
--- a/app/models/template_message_setting/watch.rb
+++ b/app/models/template_message_setting/watch_project.rb
@@ -14,7 +14,11 @@
#
#我关注的
-class TemplateMessageSetting::Watch < TemplateMessageSetting
+class TemplateMessageSetting::WatchProject < TemplateMessageSetting
+
+ def self.type_name
+ "我关注的仓库"
+ end
def self.build_init_data
end
diff --git a/app/views/template_message_settings/_detail.json.jbuilder b/app/views/template_message_settings/_detail.json.jbuilder
new file mode 100644
index 000000000..d85a4c4ea
--- /dev/null
+++ b/app/views/template_message_settings/_detail.json.jbuilder
@@ -0,0 +1,8 @@
+json.type type
+json.type_name type.constantize.type_name
+json.total_settings_count count
+json.settings do
+ json.array! type.constantize.openning.limit(100).each do |setting|
+ json.(setting, :name, :key, :notification_disabled, :email_disabled)
+ end
+end
\ No newline at end of file
diff --git a/app/views/template_message_settings/index.json.jbuilder b/app/views/template_message_settings/index.json.jbuilder
new file mode 100644
index 000000000..3ca136797
--- /dev/null
+++ b/app/views/template_message_settings/index.json.jbuilder
@@ -0,0 +1,11 @@
+json.partial! "commons/success"
+json.setting_types do
+
+ json.array! @group_settings.keys.each do |k|
+ json.partial! "detail", type: k, count: @group_settings[k]
+ end
+
+ # json.array! @group_settings, partial: 'detail', as: :type
+
+
+end
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 9e5ffa2fb..34fa0ed6b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -150,6 +150,8 @@ Rails.application.routes.draw do
resources :issue_depends, only: [:create, :destroy]
end
+ resources :template_message_settings, only: [:index]
+
resources :applied_projects, only: [:create]
resources :project_categories, only: [:index, :show] do
diff --git a/db/migrate/20211013081221_create_template_message_settings.rb b/db/migrate/20211013081221_create_template_message_settings.rb
index 618d43b60..a3140493e 100644
--- a/db/migrate/20211013081221_create_template_message_settings.rb
+++ b/db/migrate/20211013081221_create_template_message_settings.rb
@@ -11,5 +11,7 @@ class CreateTemplateMessageSettings < ActiveRecord::Migration[5.2]
t.timestamps
end
+
+ TemplateMessageSetting.build_init_data
end
end
diff --git a/public/docs/api.html b/public/docs/api.html
index 8368e8fae..ecfdb055d 100644
--- a/public/docs/api.html
+++ b/public/docs/api.html
@@ -360,6 +360,9 @@
更改用户信息
+
+ 获取平台消息设置配置信息
+
获取用户星标项目
@@ -1569,7 +1572,173 @@ Success — a happy kitten is an authenticated kitten!
"status": 0,
"message": "success"
}
-获取用户星标项目
+获取平台消息设置配置信息
+获取平台消息设置配置信息
+
+
+示例:
+
+curl -X GET http://localhost:3000/api/template_message_settings.json
+
await octokit.request('GET /api/template_message_settings.json')
+
HTTP 请求
+GET /api/template_message_settings.json
+返回字段说明:
+
+
+参数 |
+类型 |
+字段说明 |
+
+
+
+type |
+string |
+消息配置类型 |
+
+
+type_name |
+string |
+消息配置类型含义 |
+
+
+total_settings_count |
+int |
+配置条数 |
+
+
+settings.name |
+string |
+配置名称 |
+
+
+settings.key |
+string |
+配置标识 |
+
+
+settings.notification_disabled |
+boolean |
+站内信设置是否禁用 |
+
+
+settings.email_disabled |
+boolean |
+邮件设置是否禁用 |
+
+
+
+
+返回的JSON示例:
+
+{
+ "status": 0,
+ "message": "响应成功",
+ "setting_types": [
+ {
+ "type": "TemplateMessageSetting::CreateOrAssign",
+ "type_name": "我创建的或负责的",
+ "total_settings_count": 4,
+ "settings": [
+ {
+ "name": "易修状态变更",
+ "key": "IssueChanged",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "易修被指派",
+ "key": "IssueAssigned",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "合并请求被指派",
+ "key": "PullRequestAssigned",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "合并请求状态变更",
+ "key": "PullRequestAssigned",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ }
+ ]
+ },
+ {
+ "type": "TemplateMessageSetting::ManageProject",
+ "type_name": "我管理的仓库",
+ "total_settings_count": 4,
+ "settings": [
+ {
+ "name": "有新的易修",
+ "key": "ProjectIssue",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "有新的合并请求",
+ "key": "ProjectPullRequest",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "有成员变动",
+ "key": "ProjectMember",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "设置更改",
+ "key": "ProjectSettingChanged",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ }
+ ]
+ },
+ {
+ "type": "TemplateMessageSetting::Normal",
+ "type_name": "",
+ "total_settings_count": 3,
+ "settings": [
+ {
+ "name": "被拉入或移出组织",
+ "key": "Organization",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "被拉入或移出项目",
+ "key": "Project",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ },
+ {
+ "name": "有权限变更",
+ "key": "Permission",
+ "openning": true,
+ "notification_disabled": true,
+ "email_disabled": false
+ }
+ ]
+ }
+ ]
+}
+
+
+获取用户星标项目
获取用户星标项目
@@ -1577,9 +1746,9 @@ Success — a happy kitten is an authenticated kitten!
curl -X GET http://localhost:3000/api/users/yystopf/is_pinned_projects.json
await octokit.request('GET /api/users/:login/is_pinned_projects.json')
-
HTTP 请求
+HTTP 请求
GET api/users/:login/is_pinned_projects.json
-返回字段说明:
+返回字段说明:
参数 |
@@ -1764,7 +1933,7 @@ Success — a happy kitten is an authenticated kitten!
curl -X POST http://localhost:3000/api/users/yystopf/is_pinned_projects/pin.json
await octokit.request('GET /api/users/:login/is_pinned_projects/pin.json')
-
HTTP 请求
+HTTP 请求
POST /api/users/:login/is_pinned_projects/pin.json
请求字段说明:
同时设定多个星标项目
@@ -1810,7 +1979,7 @@ Success — a happy kitten is an authenticated kitten!
curl -X PATCH http://localhost:3000/api/users/yystopf/is_pinned_projects/11.json
await octokit.request('PATCH/PUT /api/users/:login/is_pinned_projects/:id.json')
-
HTTP 请求
+HTTP 请求
PATCH/PUT /api/users/:login/is_pinned_projects/:id.json
请求字段说明:
@@ -1851,9 +2020,9 @@ Success — a happy kitten is an authenticated kitten!
curl -X GET http://localhost:3000/api/users/yystopf/statistics/activity.json
await octokit.request('GET /api/users/:login/statistics/activity.json')
-
HTTP 请求
+HTTP 请求
GET /api/users/:login/statistics/activity.json
-返回字段说明:
+返回字段说明:
参数 |
@@ -1940,7 +2109,7 @@ Success — a happy kitten is an authenticated kitten!
curl -X GET http://localhost:3000/api/users/yystopf/headmaps.json
await octokit.request('GET /api/users/:login/headmaps.json')
-
HTTP 请求
+HTTP 请求
GET api/users/:login/headmaps.json
请求字段说明:
@@ -1956,7 +2125,7 @@ Success — a happy kitten is an authenticated kitten!
年份 |
-返回字段说明:
+返回字段说明:
参数 |
@@ -2085,7 +2254,7 @@ Success — a happy kitten is an authenticated kitten!
curl -X GET http://localhost:3000/api/users/yystopf/project_trends.json
await octokit.request('GET /api/users/:login/project_trends.json')
-
HTTP 请求
+HTTP 请求
GET api/users/:login/project_trends.json
请求字段说明:
@@ -2101,7 +2270,7 @@ Success — a happy kitten is an authenticated kitten!
日期,格式: 2021-05-28 |
-返回字段说明:
+返回字段说明:
参数 |
@@ -2402,7 +2571,7 @@ Success — a happy kitten is an authenticated kitten!
curl -X GET http://localhost:3000/api/users/yystopf/statistics/develop.json
await octokit.request('GET /api/users/:login/statistics/develop.json')
-
HTTP 请求
+HTTP 请求
GET /api/users/:login/statistics/develop.json
请求字段说明:
@@ -2423,7 +2592,7 @@ Success — a happy kitten is an authenticated kitten!
时间戳,结束时间,格式:1622131200 |
-返回字段说明:
+返回字段说明:
参数 |
@@ -2545,7 +2714,7 @@ Success — a happy kitten is an authenticated kitten!
curl -X GET http://localhost:3000/api/users/yystopf/statistics/role.json
await octokit.request('GET /api/users/:login/statistics/role.json')
-
HTTP 请求
+HTTP 请求
GET /api/users/:login/statistics/role.json
请求字段说明:
@@ -2566,7 +2735,7 @@ Success — a happy kitten is an authenticated kitten!
时间戳,结束时间,格式:1622131200 |
-返回字段说明:
+返回字段说明:
参数 |
@@ -2627,7 +2796,7 @@ Success — a happy kitten is an authenticated kitten!
curl -X GET http://localhost:3000/api/users/yystopf/statistics/major.json
await octokit.request('GET /api/users/:login/statistics/major.json')
-
HTTP 请求
+HTTP 请求
GET /api/users/:login/statistics/major.json
请求字段说明:
@@ -2648,7 +2817,7 @@ Success — a happy kitten is an authenticated kitten!
时间戳,结束时间,格式:1622131200 |
-返回字段说明:
+返回字段说明:
参数 |
@@ -2688,7 +2857,7 @@ Success — a happy kitten is an authenticated kitten!
curl -X GET http://localhost:3000/api/users/yystopf/applied_messages.json
await octokit.request('GET /api/users/:login/applied_messages.json')
-
HTTP 请求
+HTTP 请求
GET /api/users/:login/applied_messages.json
请求字段说明:
@@ -2704,7 +2873,7 @@ Success — a happy kitten is an authenticated kitten!
用户标识 |
-返回字段说明:
+返回字段说明:
参数 |
@@ -2967,7 +3136,7 @@ Success — a happy kitten is an authenticated kitten!
curl -X GET http://localhost:3000/api/users/yystopf/applied_transfer_projects.json
await octokit.request('GET /api/users/:login/applied_transfer_projects.json')
-
HTTP 请求
+HTTP 请求
GET /api/users/:login/applied_transfer_projects.json
请求字段说明:
@@ -2983,7 +3152,7 @@ Success — a happy kitten is an authenticated kitten!
用户标识 |
-返回字段说明:
+返回字段说明:
参数 |
@@ -3159,7 +3328,7 @@ Success — a happy kitten is an authenticated kitten!
curl -X POST http://localhost:3000/api/users/yystopf/applied_transfer_projects/2/accept.json
await octokit.request('GET /api/users/:login/applied_transfer_projects/:id/accept.json')
-
HTTP 请求
+HTTP 请求
GET /api/users/:login/applied_transfer_projects/:id/accept.json
请求字段说明:
@@ -3180,197 +3349,6 @@ Success — a happy kitten is an authenticated kitten!
迁移id |
-返回字段说明:
-
-
-参数 |
-类型 |
-字段说明 |
-
-
-
-id |
-int |
-迁移id |
-
-
-status |
-string |
-迁移状态,canceled:取消,common:正在迁移, accept:已接受,refuse:已拒绝 |
-
-
-time_ago |
-string |
-迁移创建的时间 |
-
-
-project.id |
-int |
-迁移项目的id |
-
-
-project.identifier |
-string |
-迁移项目的标识 |
-
-
-project.name |
-string |
-迁移项目的名称 |
-
-
-project.description |
-string |
-迁移项目的描述 |
-
-
-project.is_public |
-bool |
-迁移项目是否公开 |
-
-
-project.owner.id |
-bool |
-迁移项目拥有者id |
-
-
-project.owner.type |
-string |
-迁移项目拥有者类型 |
-
-
-project.owner.name |
-string |
-迁移项目拥有者昵称 |
-
-
-project.owner.login |
-string |
-迁移项目拥有者标识 |
-
-
-project.owner.image_url |
-string |
-迁移项目拥有者头像 |
-
-
-user.id |
-int |
-迁移创建者的id |
-
-
-user.type |
-string |
-迁移创建者的类型 |
-
-
-user.name |
-string |
-迁移创建者的名称 |
-
-
-user.login |
-string |
-迁移创建者的标识 |
-
-
-user.image_url |
-string |
-迁移创建者头像 |
-
-
-owner.id |
-int |
-迁移接受者的id |
-
-
-owner.type |
-string |
-迁移接受者的类型 |
-
-
-owner.name |
-string |
-迁移接受者的名称 |
-
-
-owner.login |
-string |
-迁移接受者的标识 |
-
-
-owner.image_url |
-string |
-迁移接受者头像 |
-
-
-
-
-返回的JSON示例:
-
-{
- "project": {
- "id": 86,
- "identifier": "ceshi_repo1",
- "name": "测试项目啊1",
- "description": "二十多",
- "is_public": true,
- "owner": {
- "id": 52,
- "type": "Organization",
- "name": "身份卡手动阀",
- "login": "ceshi1",
- "image_url": "images/avatars/Organization/52?t=1618805056"
- }
- },
- "user": {
- "id": 6,
- "type": "User",
- "name": "yystopf",
- "login": "yystopf",
- "image_url": "system/lets/letter_avatars/2/Y/241_125_89/120.png"
- },
- "owner": {
- "id": 52,
- "type": "Organization",
- "name": "身份卡手动阀",
- "login": "ceshi1",
- "image_url": "images/avatars/Organization/52?t=1618805056"
- },
- "id": 1,
- "status": "canceled",
- "created_at": "2021-04-25 18:06",
- "time_ago": "16小时前"
-}
-
用户拒绝迁移
-用户拒绝迁移
-
-
-示例:
-
-curl -X POST http://localhost:3000/api/users/yystopf/applied_transfer_projects/2/refuse.json
-
await octokit.request('GET /api/users/:login/applied_transfer_projects/:id/refuse.json')
-
HTTP 请求
-GET /api/users/:login/applied_transfer_projects/:id/refuse.json
-请求字段说明:
-
-
-参数 |
-类型 |
-字段说明 |
-
-
-
-login |
-string |
-用户标识 |
-
-
-id |
-int |
-迁移id |
-
-
返回字段说明:
@@ -3496,6 +3474,197 @@ Success — a happy kitten is an authenticated kitten!
+
+返回的JSON示例:
+
+{
+ "project": {
+ "id": 86,
+ "identifier": "ceshi_repo1",
+ "name": "测试项目啊1",
+ "description": "二十多",
+ "is_public": true,
+ "owner": {
+ "id": 52,
+ "type": "Organization",
+ "name": "身份卡手动阀",
+ "login": "ceshi1",
+ "image_url": "images/avatars/Organization/52?t=1618805056"
+ }
+ },
+ "user": {
+ "id": 6,
+ "type": "User",
+ "name": "yystopf",
+ "login": "yystopf",
+ "image_url": "system/lets/letter_avatars/2/Y/241_125_89/120.png"
+ },
+ "owner": {
+ "id": 52,
+ "type": "Organization",
+ "name": "身份卡手动阀",
+ "login": "ceshi1",
+ "image_url": "images/avatars/Organization/52?t=1618805056"
+ },
+ "id": 1,
+ "status": "canceled",
+ "created_at": "2021-04-25 18:06",
+ "time_ago": "16小时前"
+}
+
用户拒绝迁移
+用户拒绝迁移
+
+
+示例:
+
+curl -X POST http://localhost:3000/api/users/yystopf/applied_transfer_projects/2/refuse.json
+
await octokit.request('GET /api/users/:login/applied_transfer_projects/:id/refuse.json')
+
HTTP 请求
+GET /api/users/:login/applied_transfer_projects/:id/refuse.json
+请求字段说明:
+
+
+参数 |
+类型 |
+字段说明 |
+
+
+
+login |
+string |
+用户标识 |
+
+
+id |
+int |
+迁移id |
+
+
+返回字段说明:
+
+
+参数 |
+类型 |
+字段说明 |
+
+
+
+id |
+int |
+迁移id |
+
+
+status |
+string |
+迁移状态,canceled:取消,common:正在迁移, accept:已接受,refuse:已拒绝 |
+
+
+time_ago |
+string |
+迁移创建的时间 |
+
+
+project.id |
+int |
+迁移项目的id |
+
+
+project.identifier |
+string |
+迁移项目的标识 |
+
+
+project.name |
+string |
+迁移项目的名称 |
+
+
+project.description |
+string |
+迁移项目的描述 |
+
+
+project.is_public |
+bool |
+迁移项目是否公开 |
+
+
+project.owner.id |
+bool |
+迁移项目拥有者id |
+
+
+project.owner.type |
+string |
+迁移项目拥有者类型 |
+
+
+project.owner.name |
+string |
+迁移项目拥有者昵称 |
+
+
+project.owner.login |
+string |
+迁移项目拥有者标识 |
+
+
+project.owner.image_url |
+string |
+迁移项目拥有者头像 |
+
+
+user.id |
+int |
+迁移创建者的id |
+
+
+user.type |
+string |
+迁移创建者的类型 |
+
+
+user.name |
+string |
+迁移创建者的名称 |
+
+
+user.login |
+string |
+迁移创建者的标识 |
+
+
+user.image_url |
+string |
+迁移创建者头像 |
+
+
+owner.id |
+int |
+迁移接受者的id |
+
+
+owner.type |
+string |
+迁移接受者的类型 |
+
+
+owner.name |
+string |
+迁移接受者的名称 |
+
+
+owner.login |
+string |
+迁移接受者的标识 |
+
+
+owner.image_url |
+string |
+迁移接受者头像 |
+
+
+
返回的JSON示例:
@@ -3541,7 +3710,7 @@ Success — a happy kitten is an authenticated kitten!
curl -X GET http://localhost:3000/api/users/yystopf/applied_projects.json
await octokit.request('GET /api/users/:login/applied_projects.json')
-
HTTP 请求
+HTTP 请求
GET /api/users/:login/applied_projects.json
请求字段说明:
@@ -3557,7 +3726,7 @@ Success — a happy kitten is an authenticated kitten!
用户标识 |
-返回字段说明:
+返回字段说明:
参数 |
@@ -3701,7 +3870,7 @@ Success — a happy kitten is an authenticated kitten!
curl -X POST http://localhost:3000/api/users/yystopf/applied_projects/2/accept.json
await octokit.request('GET /api/users/:login/applied_projects/:id/accept.json')
-
HTTP 请求
+HTTP 请求
GET /api/users/:login/applied_projects/:id/accept.json
请求字段说明:
@@ -3722,7 +3891,7 @@ Success — a happy kitten is an authenticated kitten!
申请id |
-返回字段说明:
+返回字段说明:
参数 |
@@ -3860,7 +4029,7 @@ Success — a happy kitten is an authenticated kitten!
curl -X POST http://localhost:3000/api/users/yystopf/applied_projects/2/refuse.json
await octokit.request('GET /api/users/:login/applied_projects/:id/refuse.json')
-
HTTP 请求
+HTTP 请求
GET /api/users/:login/applied_projects/:id/refuse.json
请求字段说明:
@@ -3881,7 +4050,7 @@ Success — a happy kitten is an authenticated kitten!
申请id |
-返回字段说明:
+返回字段说明: