Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

refactor: Object API write methods return CIDs #399

Merged
merged 3 commits into from
Nov 27, 2018

Conversation

alanshaw
Copy link
Contributor

Since ipld-dag-pb removed multihash and cid properties, the Object API became less useful, returning the data you provided it when you call methods that write DAG nodes. This meant the user had to calculate the CID manually.

This PR updates the Object API so that write methods return CID instances instead of DAG nodes.

See discussion here for more context: #388 (review)

@ghost ghost assigned alanshaw Nov 26, 2018
@ghost ghost added the in progress label Nov 26, 2018
Copy link
Collaborator

@achingbrain achingbrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I think the commit linter is objecting (ha) to the capital O in the commit line. It wants it to be refactor: object API instead of refactor: Object API.

Since `ipld-dag-pb` removed `multihash` and `cid` properties, the Object API became less useful, returning the data you provided it when you call methods that write DAG nodes. This meant the user had to calculate the CID manually.

This PR updates the Object API so that write methods return CID instances instead of DAG nodes.

See discussion here for more context: #388 (review)

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
@alanshaw alanshaw force-pushed the refactor/object-write-return-cid branch from db2aa8b to bf2c763 Compare November 27, 2018 10:08
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
@alanshaw alanshaw merged commit 4c58485 into master Nov 27, 2018
@ghost ghost removed the in progress label Nov 27, 2018
@alanshaw alanshaw deleted the refactor/object-write-return-cid branch November 27, 2018 11:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants