Improve doc
This commit is contained in:
		
							parent
							
								
									481f1a7c36
								
							
						
					
					
						commit
						f9d5d9e30b
					
				|  | @ -1101,6 +1101,7 @@ docs: | |||
|       no-params: "パラメータはありません" | ||||
|       res: "レスポンス" | ||||
|       require-credential: "このエンドポイントは認証情報が必須です。" | ||||
|       require-permission: "このエンドポイントは{permission}の権限を必要とします。" | ||||
|       has-limit: "レートリミットがあります。" | ||||
|       duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。" | ||||
|       min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。" | ||||
|  |  | |||
|  | @ -6,12 +6,14 @@ | |||
| 	color #fff | ||||
| 	background #222e40 | ||||
| 	border-radius 4px | ||||
| 	overflow auto | ||||
| 	white-space nowrap | ||||
| 
 | ||||
| 	> .method | ||||
| 		display inline-block | ||||
| 		margin 0 8px 0 0 | ||||
| 		padding 0 6px | ||||
| 		color #f4fcff | ||||
| 		color #fff | ||||
| 		background #17afc7 | ||||
| 		border-radius 4px | ||||
| 		user-select none | ||||
|  |  | |||
|  | @ -18,16 +18,23 @@ block main | |||
| 		p#desc= endpoint.desc[lang] || endpoint.desc['ja'] | ||||
| 
 | ||||
| 	if endpoint.requireCredential | ||||
| 		div.ui.info: p= i18n('docs.api.endpoints.require-credential') | ||||
| 		div.ui.info: p | ||||
| 			i.fas.fa-id-card-alt(style="margin-right: 4px") | ||||
| 			= i18n('docs.api.endpoints.require-credential') | ||||
| 
 | ||||
| 		if endpoint.kind | ||||
| 			div.ui.info: p | ||||
| 				i.fas.fa-unlock-alt(style="margin-right: 4px") | ||||
| 				!= i18n('docs.api.endpoints.require-permission').replace('{permission}', `<code>${endpoint.kind}</code>`) | ||||
| 
 | ||||
| 	if endpoint.limit | ||||
| 		div.ui.info.warn | ||||
| 			p | ||||
| 				b!= i18n('docs.api.endpoints.has-limit') | ||||
| 				if endpoint.limit.duration | ||||
| 					!= i18n('docs.api.endpoints.duration-limit').replace('{duration}', endpoint.limit.duration).replace('{max}', endpoint.limit.max) | ||||
| 				if endpoint.limit.minInterval | ||||
| 					!= i18n('docs.api.endpoints.min-interval-limit').replace('{interval}', endpoint.limit.minInterval) | ||||
| 		div.ui.info.warn: p | ||||
| 			i.far.fa-clock(style="margin-right: 4px") | ||||
| 			b!= i18n('docs.api.endpoints.has-limit') | ||||
| 			if endpoint.limit.duration | ||||
| 				!= i18n('docs.api.endpoints.duration-limit').replace('{duration}', endpoint.limit.duration).replace('{max}', endpoint.limit.max) | ||||
| 			if endpoint.limit.minInterval | ||||
| 				!= i18n('docs.api.endpoints.min-interval-limit').replace('{interval}', endpoint.limit.minInterval) | ||||
| 
 | ||||
| 	if params && Object.keys(params).length > 0 | ||||
| 		section | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue