Skip to content

Commit 5b6ffac

Browse files
committed
Node API updates. Changed location of the profile editing page.
1 parent 8982b28 commit 5b6ffac

File tree

5 files changed

+219
-16
lines changed

5 files changed

+219
-16
lines changed

_data/node_api.yml

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,17 @@ objects:
854854
errors:
855855
- code: limit.invalid
856856
description: <code>limit</code> parameter has an invalid value
857+
- url: /people/contacts/fetch
858+
type: POST
859+
function: fetchContacts
860+
in:
861+
struct: ContactFilter
862+
name: filter
863+
out:
864+
struct: ContactWithRelationships
865+
array: true
866+
auth: admin
867+
description: Fetch the detailed information, including relationships, about the contacts matching the filter.
857868
- name: Credentials
858869
description: Credentials used to authenticate the administrator of the node.
859870
requests:
@@ -1273,7 +1284,8 @@ objects:
12731284
<ul>
12741285
<li><code>timeline</code> - the main feed of publications;</li>
12751286
<li><code>instant</code> - the feed of instant notifications;</li>
1276-
<li><code>news</code> - the main feed of publications gathered from other nodes.</li>
1287+
<li><code>news</code> - the main feed of publications gathered from other nodes;</li>
1288+
<li><code>explore</code> - the feed of recommended publications from around the network.</li>
12771289
</ul>
12781290
requests:
12791291
- url: /feeds
@@ -2554,6 +2566,12 @@ objects:
25542566
type: GET
25552567
function: getRecommendedPostings
25562568
query:
2569+
- type: String
2570+
name: feed
2571+
optional: true
2572+
description: >
2573+
name of the feed to get recommendations for ("news" by default); recommendations for every feed are
2574+
tracked separately
25572575
- type: String
25582576
name: sheriff
25592577
optional: true
@@ -2638,6 +2656,13 @@ objects:
26382656
- type: String
26392657
name: postingId
26402658
description: ID of the posting on the remote node
2659+
query:
2660+
- type: String
2661+
name: feed
2662+
optional: true
2663+
description: >
2664+
name of the feed the recommendation is accepted to ("news" by default); recommendations for every feed are
2665+
tracked separately
26412666
out:
26422667
struct: Result
26432668
auth: required
@@ -2655,6 +2680,13 @@ objects:
26552680
- type: String
26562681
name: postingId
26572682
description: ID of the posting on the remote node
2683+
query:
2684+
- type: String
2685+
name: feed
2686+
optional: true
2687+
description: >
2688+
name of the feed the recommendation is rejected for ("news" by default); recommendations for every feed
2689+
are tracked separately
26582690
out:
26592691
struct: Result
26602692
auth: required
@@ -4849,6 +4881,12 @@ structures:
48494881
- type: int
48504882
name: total
48514883
description: total number of comments in the posting after the operation
4884+
- name: ContactFilter
4885+
fields:
4886+
- type: String
4887+
array: true
4888+
name: nodeNames
4889+
description: list of node names to fetch
48524890
- name: ContactInfo
48534891
fields:
48544892
- type: String
@@ -4903,6 +4941,37 @@ structures:
49034941
name: adminOperations
49044942
optional: true
49054943
description: the operations and the corresponding principals that are overridden by the node administrator
4944+
- name: ContactWithRelationships
4945+
fields:
4946+
- struct: ContactInfo
4947+
name: contact
4948+
description: contact's details
4949+
- struct: SubscriberInfo
4950+
name: subscriber
4951+
optional: true
4952+
description: information about the contact's subscription to the node's feeds
4953+
- struct: SubscriptionInfo
4954+
name: subscription
4955+
optional: true
4956+
description: information about the nodes's subscription to the contact's feeds
4957+
- struct: FriendInfo
4958+
name: friend
4959+
optional: true
4960+
description: information about the node's friendship with the contact
4961+
- struct: FriendOfInfo
4962+
name: friendOf
4963+
optional: true
4964+
description: information about the contact's friendship with the node
4965+
- struct: BlockedUserInfo
4966+
array: true
4967+
name: blocked
4968+
optional: true
4969+
description: information about blocking the contact by the node
4970+
- struct: BlockedByUserInfo
4971+
array: true
4972+
name: blockedBy
4973+
optional: true
4974+
description: information about blocking the node by the contact
49064975
- name: Credentials
49074976
fields:
49084977
- type: String

_data/py_node_api.yml

Lines changed: 73 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,6 +1468,16 @@ objects:
14681468
name: limit
14691469
optional: true
14701470
type: int
1471+
- auth: admin
1472+
description: Fetch the detailed information, including relationships, about the
1473+
contacts matching the filter.
1474+
function: fetch_contacts(filter)
1475+
out:
1476+
array: true
1477+
struct: ContactWithRelationships
1478+
params:
1479+
- name: filter
1480+
struct: ContactFilter
14711481
- description: Credentials used to authenticate the administrator of the node.
14721482
name: Credentials
14731483
requests:
@@ -1870,7 +1880,8 @@ objects:
18701880
\ the standard feeds that have special meaning: <ul>\n <li><code>timeline</code>\
18711881
\ - the main feed of publications;</li>\n <li><code>instant</code> - the feed\
18721882
\ of instant notifications;</li>\n <li><code>news</code> - the main feed of publications\
1873-
\ gathered from other nodes.</li>\n</ul>\n"
1883+
\ gathered from other nodes;</li>\n <li><code>explore</code> - the feed of recommended\
1884+
\ publications from around the network.</li>\n</ul>\n"
18741885
name: Feeds
18751886
requests:
18761887
- auth: admin or none
@@ -3010,11 +3021,18 @@ objects:
30103021
description: <code>limit</code> parameter has an invalid value
30113022
- code: sheriff.not-found
30123023
description: sheriff node is not registered
3013-
function: get_recommended_postings(sheriff=None, limit=None)
3024+
function: get_recommended_postings(feed=None, sheriff=None, limit=None)
30143025
out:
30153026
array: true
30163027
struct: RecommendedPostingInfo
30173028
params:
3029+
- description: 'name of the feed to get recommendations for ("news" by default);
3030+
recommendations for every feed are tracked separately
3031+
3032+
'
3033+
name: feed
3034+
optional: true
3035+
type: str
30183036
- description: filter out entries prohibited by the given sheriff
30193037
name: sheriff
30203038
optional: true
@@ -3079,7 +3097,7 @@ objects:
30793097
errors:
30803098
- code: not-found
30813099
description: the posting is not found
3082-
function: accept_recommended_posting(node_name, posting_id)
3100+
function: accept_recommended_posting(node_name, posting_id, feed=None)
30833101
out:
30843102
struct: Result
30853103
params:
@@ -3089,13 +3107,20 @@ objects:
30893107
- description: ID of the posting on the remote node
30903108
name: posting_id
30913109
type: str
3110+
- description: 'name of the feed the recommendation is accepted to ("news" by
3111+
default); recommendations for every feed are tracked separately
3112+
3113+
'
3114+
name: feed
3115+
optional: true
3116+
type: str
30923117
- auth: required
30933118
description: Inform the recommendation service that the recommended posting was
30943119
rejected by the client.
30953120
errors:
30963121
- code: not-found
30973122
description: the posting is not found
3098-
function: reject_recommended_posting(node_name, posting_id)
3123+
function: reject_recommended_posting(node_name, posting_id, feed=None)
30993124
out:
31003125
struct: Result
31013126
params:
@@ -3105,6 +3130,13 @@ objects:
31053130
- description: ID of the posting on the remote node
31063131
name: posting_id
31073132
type: str
3133+
- description: 'name of the feed the recommendation is rejected for ("news" by
3134+
default); recommendations for every feed are tracked separately
3135+
3136+
'
3137+
name: feed
3138+
optional: true
3139+
type: str
31083140
- auth: required
31093141
description: 'Ask the recommendation service to exclude all content from the given
31103142
node from future recommendations.
@@ -5526,6 +5558,12 @@ structures:
55265558
name: total
55275559
type: int
55285560
name: CommentTotalInfo
5561+
- fields:
5562+
- array: true
5563+
description: list of node names to fetch
5564+
name: node_names
5565+
type: str
5566+
name: ContactFilter
55295567
- fields:
55305568
- name: node_name
55315569
type: str
@@ -5583,6 +5621,37 @@ structures:
55835621
optional: true
55845622
struct: ContactOperations
55855623
name: ContactInfo
5624+
- fields:
5625+
- description: contact's details
5626+
name: contact
5627+
struct: ContactInfo
5628+
- description: information about the contact's subscription to the node's feeds
5629+
name: subscriber
5630+
optional: true
5631+
struct: SubscriberInfo
5632+
- description: information about the nodes's subscription to the contact's feeds
5633+
name: subscription
5634+
optional: true
5635+
struct: SubscriptionInfo
5636+
- description: information about the node's friendship with the contact
5637+
name: friend
5638+
optional: true
5639+
struct: FriendInfo
5640+
- description: information about the contact's friendship with the node
5641+
name: friend_of
5642+
optional: true
5643+
struct: FriendOfInfo
5644+
- array: true
5645+
description: information about blocking the contact by the node
5646+
name: blocked
5647+
optional: true
5648+
struct: BlockedUserInfo
5649+
- array: true
5650+
description: information about blocking the node by the contact
5651+
name: blocked_by
5652+
optional: true
5653+
struct: BlockedByUserInfo
5654+
name: ContactWithRelationships
55865655
- fields:
55875656
- constraints:
55885657
- notblank:

0 commit comments

Comments
 (0)