Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

ipfs.block API is out of sync with the implementation #3913

Closed
matheus23 opened this issue Oct 7, 2021 · 4 comments · Fixed by #4124
Closed

ipfs.block API is out of sync with the implementation #3913

matheus23 opened this issue Oct 7, 2021 · 4 comments · Fixed by #4124
Assignees
Labels
exp/novice Someone with a little familiarity can pick up good first issue Good issue for new contributors help wanted Seeking public contribution on this issue P2 Medium: Good to have, but can wait until someone steps up topic/docs Documentation

Comments

@matheus23
Copy link
Contributor

Here is what I've noticed:

  • ipfs.block.get
    • docs say it returns a Block, but it returns a Uint8Array
    • docs are missing the preload option
  • ipfs.block.put
    • docs say it can also take a Block as a parameter, but it can only be a Uint8Array
    • docs say it can take a cid as an option, but the implementation ignores such a parameter
    • docs say it returns a Block, but it's just a Uint8Array
@matheus23 matheus23 added the need/triage Needs initial labeling and prioritization label Oct 7, 2021
@lidel
Copy link
Member

lidel commented Oct 8, 2021

@matheus23 mind opening PR with updated docs (make docs match the latest implementation)? 🙏

docs are missing the preload option

which docs? (it is js-ipfs only feature)

@matheus23
Copy link
Contributor Author

which docs? (it is js-ipfs only feature)

The options parameter for ipfs.block.get is missing an optional preload: boolean parameter.

@lidel
Copy link
Member

lidel commented Oct 11, 2021

Ack. It also should be added to the docs you linked.

@lidel lidel added exp/novice Someone with a little familiarity can pick up good first issue Good issue for new contributors help wanted Seeking public contribution on this issue P2 Medium: Good to have, but can wait until someone steps up topic/docs Documentation and removed need/triage Needs initial labeling and prioritization labels Oct 11, 2021
@vogdb
Copy link

vogdb commented Jan 12, 2022

The return of ipfs.block.get has been fixed in #3990. @lidel I can help to fix the rest, if you want.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/novice Someone with a little familiarity can pick up good first issue Good issue for new contributors help wanted Seeking public contribution on this issue P2 Medium: Good to have, but can wait until someone steps up topic/docs Documentation
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants