Skip to content

Commit 657b940

Browse files
committed
Node API updated.
1 parent af1f370 commit 657b940

File tree

727 files changed

+5057
-3468
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

727 files changed

+5057
-3468
lines changed

_data/node_api.yml

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,6 +2519,146 @@ objects:
25192519
errors:
25202520
- code: push-relay.error
25212521
description: push relay service returned an error
2522+
- name: Recommendations
2523+
description: >
2524+
Recommendations API is implemented by nodes providing recommendation services for other nodes in the network.
2525+
requests:
2526+
- url: /recommendations/postings
2527+
type: GET
2528+
function: getRecommendedPostings
2529+
query:
2530+
- type: String
2531+
name: sheriff
2532+
optional: true
2533+
description: filter out entries prohibited by the given sheriff
2534+
- type: int
2535+
name: limit
2536+
optional: true
2537+
description: maximum number of recommendations returned
2538+
out:
2539+
struct: RecommendedPostingInfo
2540+
array: true
2541+
auth: optional
2542+
description: >
2543+
Find postings known to the recommendation service and may be of interest to the client. If the client is
2544+
authenticated, the service may tune the recommendations for them.
2545+
<br><br>
2546+
The service may decide to return fewer recommendations than the given <code>limit</code>.
2547+
errors:
2548+
- code: limit.invalid
2549+
description: <code>limit</code> parameter has an invalid value
2550+
- url: /recommendations/postings/reading
2551+
type: GET
2552+
function: getRecommendedPostingsForReading
2553+
query:
2554+
- type: String
2555+
name: sheriff
2556+
optional: true
2557+
description: filter out entries prohibited by the given sheriff
2558+
- type: int
2559+
name: limit
2560+
optional: true
2561+
description: maximum number of recommendations returned
2562+
out:
2563+
struct: RecommendedPostingInfo
2564+
array: true
2565+
auth: optional
2566+
description: >
2567+
Find postings known to the recommendation service and may be of interest to the client to read them.
2568+
If the client is authenticated, the service may tune the recommendations for them.
2569+
<br><br>
2570+
The service may decide to return fewer recommendations than the given <code>limit</code>.
2571+
errors:
2572+
- code: limit.invalid
2573+
description: <code>limit</code> parameter has an invalid value
2574+
- url: /recommendations/postings/commenting
2575+
type: GET
2576+
function: getRecommendedPostingsForCommenting
2577+
query:
2578+
- type: String
2579+
name: sheriff
2580+
optional: true
2581+
description: filter out entries prohibited by the given sheriff
2582+
- type: int
2583+
name: limit
2584+
optional: true
2585+
description: maximum number of recommendations returned
2586+
out:
2587+
struct: RecommendedPostingInfo
2588+
array: true
2589+
auth: optional
2590+
description: >
2591+
Find postings known to the recommendation service and may be of interest to the client to take part in
2592+
the discussion. If the client is authenticated, the service may tune the recommendations for them.
2593+
<br><br>
2594+
The service may decide to return fewer recommendations than the given <code>limit</code>.
2595+
errors:
2596+
- code: limit.invalid
2597+
description: <code>limit</code> parameter has an invalid value
2598+
- url: /recommendations/postings/accepted/{nodeName}/{postingId}
2599+
type: POST
2600+
function: acceptRecommendedPosting
2601+
params:
2602+
- type: String
2603+
name: nodeName
2604+
description: name of the remote node
2605+
- type: String
2606+
name: postingId
2607+
description: ID of the posting on the remote node
2608+
out:
2609+
struct: Result
2610+
auth: required
2611+
description: Inform the recommendation service that the recommended posting was accepted by the client.
2612+
errors:
2613+
- code: not-found
2614+
description: the posting is not found
2615+
- url: /recommendations/postings/rejected/{nodeName}/{postingId}
2616+
type: POST
2617+
function: rejectRecommendedPosting
2618+
params:
2619+
- type: String
2620+
name: nodeName
2621+
description: name of the remote node
2622+
- type: String
2623+
name: postingId
2624+
description: ID of the posting on the remote node
2625+
out:
2626+
struct: Result
2627+
auth: required
2628+
description: Inform the recommendation service that the recommended posting was rejected by the client.
2629+
errors:
2630+
- code: not-found
2631+
description: the posting is not found
2632+
- url: /recommendations/nodes/excluded/{nodeName}
2633+
type: POST
2634+
function: excludeNodeFromRecommendations
2635+
params:
2636+
- type: String
2637+
name: nodeName
2638+
description: name of the remote node
2639+
out:
2640+
struct: Result
2641+
auth: required
2642+
description: >
2643+
Ask the recommendation service to exclude all content from the given node from future recommendations.
2644+
errors:
2645+
- code: not-found
2646+
description: the node is not found
2647+
- url: /recommendations/nodes/excluded/{nodeName}
2648+
type: DELETE
2649+
function: allowNodeInRecommendations
2650+
params:
2651+
- type: String
2652+
name: nodeName
2653+
description: name of the remote node
2654+
out:
2655+
struct: Result
2656+
auth: required
2657+
description: >
2658+
Allow the recommendation service to include the content from the given node to future recommendations.
2659+
errors:
2660+
- code: not-found
2661+
description: the node is not found
25222662
- name: Remote Ask
25232663
description: >
25242664
The node may send requests to other nodes asking to subscribe to it, to add it to friends etc.
@@ -5928,6 +6068,12 @@ structures:
59286068
name: totalComments
59296069
optional: true
59306070
description: total number of comments to the posting
6071+
- type: boolean
6072+
name: recommended
6073+
optional: true
6074+
description: >
6075+
<code>true</code>, if the posting was recommended by a recommendation service (for cached copies of remote
6076+
postings only), <code>false</code> otherwise
59316077
- name: PostingRevisionInfo
59326078
fields:
59336079
- type: String
@@ -6726,6 +6872,40 @@ structures:
67266872
- other:
67276873
error: reaction.major-operations.wrong-principal
67286874
description: contain an incorrect principal
6875+
- name: RecommendedPostingInfo
6876+
fields:
6877+
- type: String
6878+
name: nodeName
6879+
description: name of the node
6880+
- type: String
6881+
name: postingId
6882+
description: ID of the posting on the node
6883+
- type: String
6884+
name: ownerName
6885+
description: node name of the posting's owner
6886+
- type: String
6887+
name: ownerFullName
6888+
optional: true
6889+
description: full name of the posting's owner
6890+
- struct: AvatarImage
6891+
name: ownerAvatar
6892+
optional: true
6893+
description: avatar of the posting's owner
6894+
- type: String
6895+
name: heading
6896+
description: heading of the posting
6897+
- type: int
6898+
name: totalPositiveReactions
6899+
description: total number of positive reactions to the posting
6900+
- type: int
6901+
name: lastDayPositiveReactions
6902+
description: number of positive reactions added to the posting in the previous 24 hours
6903+
- type: int
6904+
name: totalComments
6905+
description: total number of comments to the posting
6906+
- type: int
6907+
name: lastDayComments
6908+
description: number of comments added to the posting in the previous 24 hours
67296909
- name: RegisteredNameSecret
67306910
fields:
67316911
- type: String

0 commit comments

Comments
 (0)