| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- using Microsoft.AspNetCore.Mvc;
- using System.ComponentModel.DataAnnotations;
- namespace economy.Models.FIFA
- {
- /*
- * FIFA 순위
- * 예시 ) https://api.fifa.com/api/v3/rankings?gender=1&count=5&language=ko
- */
- // 검색요청 변수
- public class Request
- {
- public enum Types
- {
- ALL,
- AFC,
- CAF,
- CONCACAF,
- CONMEBOL,
- OFC,
- UEFA
- }
- [BindProperty(Name = "page", SupportsGet = true)]
- [Range(1, int.MaxValue, ErrorMessage = "페이지 허용량을 초과하였습니다.")]
- public int PageNo { get; set; } = 1;
- [BindProperty(Name = "perPage", SupportsGet = true)]
- [Range(1, int.MaxValue, ErrorMessage = "출력 허용량을 초과하였습니다.")]
- public int NumOfRows { get; set; } = 10;
- [BindProperty(Name = "gender", SupportsGet = true)]
- [Range(1, 2, ErrorMessage = "순위 구분이 잘못되었습니다.")]
- public int Gender { get; set; } = 1;
- [FromQuery(Name = "type")]
- public Types? Type { get; set; } = null;
- }
- }
|