Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add activities iterator to ActivityPub client #903

Merged
merged 1 commit into from
Nov 26, 2021

Conversation

bstasyszyn
Copy link
Contributor

Added function, GetActivities, to the ActivityPub client so that a server may retrieve activities from another server via a REST endpoint (e.g. https://domain1/services/orb/outbox). The function returns an iterator that iterates over the items in either forward or reverse order.

closes #901

Signed-off-by: Bob Stasyszyn Bob.Stasyszyn@securekey.com

@cla-bot cla-bot bot added the cla-signed label Nov 26, 2021
@codecov
Copy link

codecov bot commented Nov 26, 2021

Codecov Report

Merging #903 (10a740e) into main (c5b8bbd) will decrease coverage by 0.02%.
The diff coverage is 86.34%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #903      +/-   ##
==========================================
- Coverage   89.45%   89.43%   -0.03%     
==========================================
  Files         157      157              
  Lines       14057    14227     +170     
==========================================
+ Hits        12575    12724     +149     
- Misses        910      922      +12     
- Partials      572      581       +9     
Impacted Files Coverage Δ
pkg/activitypub/client/client.go 87.29% <84.02%> (-1.74%) ⬇️
pkg/activitypub/client/util.go 95.00% <90.00%> (-5.00%) ⬇️
pkg/activitypub/vocab/collection.go 100.00% <100.00%> (ø)
pkg/activitypub/vocab/collectionpage.go 100.00% <100.00%> (ø)
pkg/activitypub/vocab/objectproperty.go 88.18% <100.00%> (ø)
pkg/activitypub/vocab/typeproperty.go 96.15% <100.00%> (+0.23%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5b8bbd...10a740e. Read the comment docs.

Added function, GetActivities, to the ActivityPub client so that a server may retrieve activities from another server via a REST endpoint (e.g. https://domain1/services/orb/outbox). The function returns an iterator that iterates over the items in either forward or reverse order.

closes trustbloc#901

Signed-off-by: Bob Stasyszyn <Bob.Stasyszyn@securekey.com>
@bstasyszyn bstasyszyn merged commit e274a57 into trustbloc:main Nov 26, 2021
@bstasyszyn bstasyszyn deleted the 901 branch November 26, 2021 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add function to ActivityPub client to retrieve activities from a REST endpoint
3 participants