From 9fd0b22e01d71ce005a9b4adba33e430de8a7726 Mon Sep 17 00:00:00 2001 From: bhartnett <51288821+bhartnett@users.noreply.github.com> Date: Mon, 14 Oct 2024 13:30:16 +0800 Subject: [PATCH] Rename portal_*RecursiveFindContent to portal_*GetContent (#344) --- jsonrpc/src/content/results.json | 14 ++++++++------ jsonrpc/src/methods/beacon.json | 12 ++++++------ jsonrpc/src/methods/history.json | 12 ++++++------ jsonrpc/src/methods/state.json | 12 ++++++------ 4 files changed, 26 insertions(+), 24 deletions(-) diff --git a/jsonrpc/src/content/results.json b/jsonrpc/src/content/results.json index b25f613..8e511a3 100644 --- a/jsonrpc/src/content/results.json +++ b/jsonrpc/src/content/results.json @@ -34,7 +34,7 @@ "schema": { "title": "FindContentResult", "type": "object", - "oneOf" :[ + "oneOf": [ { "title": "ContentInfo", "type": "object", @@ -58,7 +58,9 @@ "title": "ENRs", "description": "List of ENR records of nodes that are closer than the recipient is to the requested content", "type": "object", - "required": ["enrs"], + "required": [ + "enrs" + ], "properties": { "enrs": { "type": "array", @@ -164,8 +166,8 @@ } } }, - "RecursiveFindContentResult": { - "name": "RecursiveFindContentResult", + "GetContentResult": { + "name": "GetContentResult", "description": "Returns the hex encoded content value and utp transfer flag. If the content is not available, returns \"0x\"", "schema": { "type": "object", @@ -185,8 +187,8 @@ } } }, - "TraceRecursiveFindContentResult": { - "name": "TraceRecursiveFindContentResult", + "TraceGetContentResult": { + "name": "TraceGetContentResult", "description": "Returns the hex encoded content value and trace data object. If the content is not available, returns \"0x\"", "schema": { "type": "object", diff --git a/jsonrpc/src/methods/beacon.json b/jsonrpc/src/methods/beacon.json index db6c5f9..f423f2d 100644 --- a/jsonrpc/src/methods/beacon.json +++ b/jsonrpc/src/methods/beacon.json @@ -133,30 +133,30 @@ } }, { - "name": "portal_beaconRecursiveFindContent", - "summary": "Look up a target content key in the network", + "name": "portal_beaconGetContent", + "summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is validated and stored in the local database if storage criteria is met before being returned.", "params": [ { "$ref": "#/components/contentDescriptors/ContentKey" } ], "result": { - "$ref": "#/components/contentDescriptors/RecursiveFindContentResult" + "$ref": "#/components/contentDescriptors/GetContentResult" }, "errors":[{ "$ref": "#/components/errors/ContentNotFoundError" }] }, { - "name": "portal_beaconTraceRecursiveFindContent", - "summary": "Look up a target content key in the network and get tracing data", + "name": "portal_beaconTraceGetContent", + "summary": "Get content as defined in portal_beaconGetContent and get additional tracing data", "params": [ { "$ref": "#/components/contentDescriptors/ContentKey" } ], "result": { - "$ref": "#/components/contentDescriptors/TraceRecursiveFindContentResult" + "$ref": "#/components/contentDescriptors/TraceGetContentResult" }, "errors":[{ "$ref": "#/components/errors/ContentNotFoundErrorWithTrace" diff --git a/jsonrpc/src/methods/history.json b/jsonrpc/src/methods/history.json index f0a4b86..165d674 100644 --- a/jsonrpc/src/methods/history.json +++ b/jsonrpc/src/methods/history.json @@ -125,30 +125,30 @@ } }, { - "name": "portal_historyRecursiveFindContent", - "summary": "Look up a target content key in the network", + "name": "portal_historyGetContent", + "summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is validated and stored in the local database if storage criteria is met before being returned.", "params": [ { "$ref": "#/components/contentDescriptors/ContentKey" } ], "result": { - "$ref": "#/components/contentDescriptors/RecursiveFindContentResult" + "$ref": "#/components/contentDescriptors/GetContentResult" }, "errors":[{ "$ref": "#/components/errors/ContentNotFoundError" }] }, { - "name": "portal_historyTraceRecursiveFindContent", - "summary": "Look up a target content key in the network and get tracing data", + "name": "portal_historyTraceGetContent", + "summary": "Get content as defined in portal_historyGetContent and get additional tracing data", "params": [ { "$ref": "#/components/contentDescriptors/ContentKey" } ], "result": { - "$ref": "#/components/contentDescriptors/TraceRecursiveFindContentResult" + "$ref": "#/components/contentDescriptors/TraceGetContentResult" }, "errors":[{ "$ref": "#/components/errors/ContentNotFoundErrorWithTrace" diff --git a/jsonrpc/src/methods/state.json b/jsonrpc/src/methods/state.json index c5bb072..1ffe158 100644 --- a/jsonrpc/src/methods/state.json +++ b/jsonrpc/src/methods/state.json @@ -125,30 +125,30 @@ } }, { - "name": "portal_stateRecursiveFindContent", - "summary": "Look up a target content key in the network", + "name": "portal_stateGetContent", + "summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is validated and stored in the local database if storage criteria is met before being returned.", "params": [ { "$ref": "#/components/contentDescriptors/ContentKey" } ], "result": { - "$ref": "#/components/contentDescriptors/RecursiveFindContentResult" + "$ref": "#/components/contentDescriptors/GetContentResult" }, "errors":[{ "$ref": "#/components/errors/ContentNotFoundError" }] }, { - "name": "portal_stateTraceRecursiveFindContent", - "summary": "Look up a target content key in the network and get tracing data", + "name": "portal_stateTraceGetContent", + "summary": "Get content as defined in portal_stateGetContent and get additional tracing data", "params": [ { "$ref": "#/components/contentDescriptors/ContentKey" } ], "result": { - "$ref": "#/components/contentDescriptors/TraceRecursiveFindContentResult" + "$ref": "#/components/contentDescriptors/TraceGetContentResult" }, "errors":[{ "$ref": "#/components/errors/ContentNotFoundErrorWithTrace"