mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
parent
6210af9749
commit
3f6ec50eb6
6 changed files with 553 additions and 7 deletions
539
FilterLists.postman_collection.json
Normal file
539
FilterLists.postman_collection.json
Normal file
|
|
@ -0,0 +1,539 @@
|
|||
{
|
||||
"info": {
|
||||
"_postman_id": "918a11ab-a25e-3c3c-dfb2-295e487ee4d6",
|
||||
"name": "FilterLists",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
||||
},
|
||||
"item": [
|
||||
{
|
||||
"name": "dependents",
|
||||
"item": [
|
||||
{
|
||||
"name": "dependents/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/dependents/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"dependents",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "forks",
|
||||
"item": [
|
||||
{
|
||||
"name": "forks/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/forks/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"forks",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "languages",
|
||||
"item": [
|
||||
{
|
||||
"name": "languages",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/languages",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"languages"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "languages/{id}",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/languages/122",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"languages",
|
||||
"122"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "languages/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/languages/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"languages",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "licenses",
|
||||
"item": [
|
||||
{
|
||||
"name": "licenses/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/licenses/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"licenses",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "lists",
|
||||
"item": [
|
||||
{
|
||||
"name": "lists",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/lists",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"lists"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "lists/{id}",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/lists/1",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"lists",
|
||||
"1"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "lists/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/lists/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"lists",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "listslanguages",
|
||||
"item": [
|
||||
{
|
||||
"name": "listslanguages/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/listslanguages/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"listslanguages",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "listsmaintainers",
|
||||
"item": [
|
||||
{
|
||||
"name": "listsmaintainers/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/listsmaintainers/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"listsmaintainers",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "liststags",
|
||||
"item": [
|
||||
{
|
||||
"name": "liststags/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/liststags/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"liststags",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "maintainers",
|
||||
"item": [
|
||||
{
|
||||
"name": "maintainers/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/maintainers/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"maintainers",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "merges",
|
||||
"item": [
|
||||
{
|
||||
"name": "merges/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/merges/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"merges",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rules",
|
||||
"item": [
|
||||
{
|
||||
"name": "rules",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/rules",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"rules"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "software",
|
||||
"item": [
|
||||
{
|
||||
"name": "software",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/software",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"software"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "software/{id}",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/software/1",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"software",
|
||||
"1"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "software/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/software/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"software",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "softwaresyntaxes",
|
||||
"item": [
|
||||
{
|
||||
"name": "softwaresyntaxes/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/softwaresyntaxes/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"softwaresyntaxes",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "syntaxes",
|
||||
"item": [
|
||||
{
|
||||
"name": "syntaxes/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/syntaxes/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"syntaxes",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "tags",
|
||||
"item": [
|
||||
{
|
||||
"name": "tags",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/tags",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"tags"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "tags/{id}",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/tags/1",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"tags",
|
||||
"1"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "tags/seed",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/{{version}}/tags/seed",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"{{version}}",
|
||||
"tags",
|
||||
"seed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -20,11 +20,10 @@ public SoftwareController(IMemoryCache memoryCache, SeedService seedService, Sof
|
|||
public async Task<IActionResult> GetAll() =>
|
||||
await Get(() => softwareService.GetAll());
|
||||
|
||||
// TODO
|
||||
[HttpGet]
|
||||
[Route("{id}")]
|
||||
public async Task<IActionResult> GetById(int id) =>
|
||||
await Task.FromResult((IActionResult)BadRequest());
|
||||
await Get(() => softwareService.GetById(id), id);
|
||||
|
||||
[HttpGet("seed")]
|
||||
public async Task<IActionResult> Seed() =>
|
||||
|
|
|
|||
|
|
@ -20,11 +20,10 @@ public TagsController(IMemoryCache memoryCache, SeedService seedService, TagServ
|
|||
public async Task<IActionResult> GetAll() =>
|
||||
await Get(() => tagService.GetAll());
|
||||
|
||||
// TODO
|
||||
[HttpGet]
|
||||
[Route("{id}")]
|
||||
public async Task<IActionResult> GetById(int id) =>
|
||||
await Task.FromResult((IActionResult)BadRequest());
|
||||
await Get(() => tagService.GetById(id), id);
|
||||
|
||||
[HttpGet("seed")]
|
||||
public async Task<IActionResult> Seed() =>
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@ await TargetedLanguages.OrderBy(s => s.Name)
|
|||
.ToListAsync();
|
||||
|
||||
public async Task<LanguageDto> GetTargetedByIdAsync(int id) =>
|
||||
await TargetedLanguages.Where(l => l.Id == (uint)id)
|
||||
.ProjectTo<LanguageDto>(MapConfig)
|
||||
.FirstOrDefaultAsync();
|
||||
await TargetedLanguages.ProjectTo<LanguageDto>(MapConfig)
|
||||
.FirstOrDefaultAsync(l => l.Id == id);
|
||||
}
|
||||
}
|
||||
|
|
@ -23,5 +23,10 @@ await DbContext.Software
|
|||
.OrderBy(s => s.Name)
|
||||
.ProjectTo<SoftwareDto>(MapConfig)
|
||||
.ToListAsync();
|
||||
|
||||
public async Task<SoftwareDto> GetById(int id) =>
|
||||
await DbContext.Software
|
||||
.ProjectTo<SoftwareDto>(MapConfig)
|
||||
.FirstOrDefaultAsync(s => s.Id == id);
|
||||
}
|
||||
}
|
||||
|
|
@ -23,5 +23,10 @@ await DbContext.Tags
|
|||
.OrderBy(s => s.Name)
|
||||
.ProjectTo<TagDto>(MapConfig)
|
||||
.ToListAsync();
|
||||
|
||||
public async Task<TagDto> GetById(int id) =>
|
||||
await DbContext.Tags
|
||||
.ProjectTo<TagDto>(MapConfig)
|
||||
.FirstOrDefaultAsync(t => t.Id == id);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue