Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • Issue/1910-MigrationtoNET6.0
  • Issue/2259-updatePids
  • Issue/2309-docs
  • Issue/2463-newCoscinePIDTypes
  • Product/1287-dotnet5Sharepoint
  • Product/407-net5migration
  • Sprint/2021-01
  • Sprint/2021-03
  • Sprint/2022-01
  • Topic/1226-proxyApiLibraryMigration
  • Topic/1334-dotnet5migration
  • dev
  • gitkeep
  • master
  • v1.0.0
  • v1.1.0
  • v1.2.0
  • v1.2.1
  • v1.3.0
  • v1.4.0
  • v2.0.0
  • v2.1.0
  • v3.0.0
  • v3.0.1
  • v3.0.2
  • v3.0.3
26 results

Target

Select target project
  • coscine/backend/libraries/proxyapi
1 result
Select Git revision
  • Issue/1910-MigrationtoNET6.0
  • Issue/2259-updatePids
  • Issue/2309-docs
  • Issue/2463-newCoscinePIDTypes
  • Product/1287-dotnet5Sharepoint
  • Product/407-net5migration
  • Sprint/2021-01
  • Sprint/2021-03
  • Sprint/2022-01
  • Topic/1226-proxyApiLibraryMigration
  • Topic/1334-dotnet5migration
  • dev
  • gitkeep
  • master
  • v1.0.0
  • v1.1.0
  • v1.2.0
  • v1.2.1
  • v1.3.0
  • v1.4.0
  • v2.0.0
  • v2.1.0
  • v3.0.0
  • v3.0.1
  • v3.0.2
  • v3.0.3
26 results
Show changes
Commits on Source (3)
......@@ -5,7 +5,7 @@ include:
stages:
- build
- test
# - test
- publish
variables:
......@@ -17,8 +17,8 @@ build-branch:
build-nuget-release:
extends: .build-nuget-release
test:
extends: .test
#test:
# extends: .test
publish-branch-prerelease:
extends: .publish-branch-prerelease
......
......@@ -4,7 +4,7 @@
<RootNamespace>Coscine.ProxyApi.Tests</RootNamespace>
<AssemblyName>Coscine.ProxyApi.Tests</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<Version>3.0.1</Version></PropertyGroup>
<Version>3.0.2</Version></PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ProxyApi\ProxyApi.csproj" />
</ItemGroup>
......
......@@ -4,7 +4,7 @@
<RootNamespace>Coscine.ProxyApi</RootNamespace>
<AssemblyName>Coscine.ProxyApi</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<Version>3.0.1</Version>
<Version>3.0.2</Version>
</PropertyGroup>
<PropertyGroup>
<Authors>RWTH Aachen University</Authors>
......
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.AspNetCore.WebUtilities;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
......@@ -68,7 +68,7 @@ namespace Coscine.ProxyApi.Utils
return Update(suffix, payload);
}
public IEnumerable<EpicData> Search(string searchUrl, int limit = 0)
public IEnumerable<EpicData> Search(string searchUrl, int limit = 0, int page = 0)
{
var pidList = new List<EpicData>();
......@@ -82,6 +82,10 @@ namespace Coscine.ProxyApi.Utils
{
parameters.Add("limit", limit.ToString());
}
if (page > 0)
{
parameters.Add("page", page.ToString());
}
// Build the request URL
var url = new Uri(QueryHelpers.AddQueryString(ServiceEndpoint, parameters));
// Execute the request
......@@ -94,6 +98,21 @@ namespace Coscine.ProxyApi.Utils
return pidList;
}
public IEnumerable<EpicData> SearchAll(string searchUrl, int limit = 1000, int startPage = 1)
{
var pidList = new List<EpicData>();
var tempList = Search(searchUrl, limit, startPage);
while (tempList.Any())
{
pidList.AddRange(tempList);
startPage++;
tempList = Search(searchUrl, limit, startPage);
}
return pidList;
}
public IEnumerable<EpicData> List(int limit = 0, int page = 0)
{
var pidList = new List<EpicData>();
......