Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

add Table of Contents and update API on README.md #30

Merged
merged 6 commits into from
May 11, 2020

Conversation

mistakia
Copy link
Contributor

@mistakia mistakia commented Aug 12, 2018

Update README with documentation for missing constructor (and options), public methods, and events. In addition, corrects a few event params and uniformly uses address to reference the OrbitDB address (instead of inconsistent usage of both dbname & address).

Edit: I have removed two defaultOptions properties (path & replicate) that don't appear to be used. In addition, I have removed the onProgressCallback param passed to loadFromSnapshot() that was never used.

I've also noticed that a couple events emit inconsistent params.

Is this desired? or should I update to have matching params?

TODO

  • document constructor options
  • loadMoreFrom description
  • replicated event description
  • closed event description
  • ready event description
  • load event description

New scripts:

  • npm run build:docs/tocs : generates a table of contents for README.md

New dev dependencies:

  • markdown-toc: generates a markdown table of contents

Fixes #26

@mistakia
Copy link
Contributor Author

mistakia commented Aug 12, 2018

Also, loadMoreFrom takes an amount param that it never uses:

https://github.com/orbitdb/orbit-db-store/blob/e782db51e9f4bcfb808466fb69bf5169a14308f7/src/Store.js#L272-L274

Edit: Is this used anywhere? seems to be sync() but just without saving the heads to IPFS.
Edit: Waiting to get some clarity on loadMoreFrom before documenting it 😃

@mistakia mistakia force-pushed the docs/readme-api branch 5 times, most recently from 7742751 to 1bcc8a1 Compare August 12, 2018 15:54
@mistakia
Copy link
Contributor Author

I've noticed that the main orbit-db Store API section is incomplete/needs updating as well.

As mentioned in orbitdb-archive/orbit-db-docstore#10, perhaps I should move this PR upstream to the orbit-db repo and simply link to the relevant API section from this repo's README.md. Either way, for ease of maintenance, it would be best if one repo references the other.

README.md Show resolved Hide resolved
@mistakia mistakia force-pushed the docs/readme-api branch 4 times, most recently from 2fb5087 to 54275c3 Compare August 16, 2018 23:01
@mistakia mistakia changed the title docs: update & fix README add Table of Contents and update API on README.md Aug 16, 2018
src/Store.js Outdated Show resolved Hide resolved
@haadcode
Copy link
Member

It'd be really great to get this PR merged as there is a lot of great documentation here that would help many users.

@mistakia are you interested to continue and finish this up? Totally fine if not and someone else can take a look.

@RichardLitt what do we need to do here from your perspective to be able to merge?

@RichardLitt
Copy link
Contributor

This looks good to me - I would just work on the params, as adding comments noting it doesn't actually fix the problem. I think @mistakia made a point about what he needs clarified above in this comment.

@mistakia
Copy link
Contributor Author

Sorry for the delay, just getting back into the swing of things.

@haadcode : As @RichardLitt has pointed out, I just need some clarity on the load/replicated events and I should be able to push the rest over the finish line.

@RichardLitt
Copy link
Contributor

@aphelionz Would you be able to help here?

@aphelionz
Copy link
Contributor

@mistakia Is this explanation from the orbit-db pinned issues helpful? orbitdb/orbitdb#579

@mistakia mistakia force-pushed the docs/readme-api branch 2 times, most recently from ab75f88 to d218871 Compare May 30, 2019 17:49
@mistakia
Copy link
Contributor Author

mistakia commented May 30, 2019

This is ready for review. I updated the docs to make a note that certain arguments are not emitted for load and replicated events when emitted as a result of loadFromSnapshot. Outside of the updates to the documentation, I made a couple trivial changes:

README.md Outdated Show resolved Hide resolved
@aphelionz
Copy link
Contributor

We probably need to update the README a bit now that things like DefaultOptions have changed, and there may be some additions/removals to the API in general as well

@aphelionz aphelionz merged commit ae16436 into orbitdb-archive:master May 11, 2020
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.

This function doesn't match the API
4 participants