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

Implement statement import for archive support #135

Merged
merged 2 commits into from
Feb 22, 2017
Merged

Conversation

vyzo
Copy link
Contributor

@vyzo vyzo commented Feb 21, 2017

Implements the /import API endpoint, which verifies and merges a stream of existing statements.
Closes #134

Example:

$ mcclient id QmeiY2eHMwK92Zt6X4kUUC3MsjMmVb2VnGZ17DhnhRPCEQ
Peer ID: QmeiY2eHMwK92Zt6X4kUUC3MsjMmVb2VnGZ17DhnhRPCEQ
Publisher ID: 4XTTM4K8sqTb7xYviJJcRDJ5W6TpQxMoJ7GtBstTALgh5wzGm
Info: Metadata for CC images from DPLA, 500px, and pexels; operated by Mediachain Labs.
$ mcclient query -r QmeiY2eHMwK92Zt6X4kUUC3MsjMmVb2VnGZ17DhnhRPCEQ "SELECT * FROM images.500px LIMIT 1000" > /tmp/500px.json
$ curl --data-binary @/tmp/500px.json http://127.0.0.1:9002/import
1000
$ mcclient query "SELECT COUNT(*) FROM images.500px"
1000
$ mcclient query -r QmeiY2eHMwK92Zt6X4kUUC3MsjMmVb2VnGZ17DhnhRPCEQ "SELECT * FROM images.500px LIMIT 5000" > /tmp/more-500px.json
$ curl --data-binary @/tmp/more-500px.json http://127.0.0.1:9002/import
4000
$ mcclient query "SELECT COUNT(*) FROM images.500px"
5000

@vyzo vyzo merged commit 147b3da into master Feb 22, 2017
@vyzo vyzo deleted the vyzo-stmt-import branch February 22, 2017 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants