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

[WIP] Awesome API Documentation #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[WIP] Awesome API Documentation #14

wants to merge 1 commit into from

Conversation

dignifiedquire
Copy link
Member

@shresthagrawal
Copy link

Hey, the current status of documentation for this repository is not good. I only see 2 api in the readme whereas there are more than that in the code.

@dignifiedquire @daviddias I think nobody is working on this PR? Can I create a new PR with proper documentation?

@daviddias
Copy link
Member

@shresthagrawal thank you for the offer! I believe that this module has been deprecated (@vasco-santos can confirm). Would you like to review the modules at https://github.com/libp2p/js-libp2p#packages and see which ones are lacking documentation? Those will be the ones that really benefit from better docs :)

@shresthagrawal
Copy link

shresthagrawal commented Feb 10, 2020

@daviddias thanks, I am actually trying to create an interactive tutorial (something similar to substrate-kitties) for js-libp2p using this js-libp2p chat example

I want to provide proper reference to the documentation in every chapter. In chapter 5 I need to explain the peer-book. Is peer-book itself deprecated or just this repo? What should I use as a reference?

Would also like to know what you generally think of the tutorial idea!

@shresthagrawal
Copy link

I guess libp2p/js-libp2p#470 is what made this deprecated.

@shresthagrawal
Copy link

shresthagrawal commented Feb 10, 2020

The peer-book is replaced by peer-store as per the merge request but there isn't any documentation for that too (here). In the tutorial it uses getAllArray(), I don't see there is any implementation for that in the current implementation @daviddias ?

@vasco-santos
Copy link
Member

Hey @shresthagrawal

Thanks for reaching out. We just release js-libp2p@0.27 where among a lot of other things, we merged peer-book into js-libp2p and renamed it into peer-store, to be more aligned with go-libp2p namings. In this way, you should reference the peer-store https://github.com/libp2p/js-libp2p/tree/master/src/peer-store .

Actually, we still have the peer-store README as a TODO (previous link). If you would like to work on that, it would be extremely helpful for us.

I want to also thank you for commenting here, as this got out of our radar, but we need to properly deprecate this repo.

@vasco-santos vasco-santos mentioned this pull request Feb 10, 2020
1 task
@shresthagrawal
Copy link

@vasco-santos is there a way to get the list of all peers? like getAllPeers() in the previous implementation?

@vasco-santos
Copy link
Member

We did not see a point in providing that on the API. Anyway, for someone who might want to get all the peers, you can just use the peers map property from peer-store on libp2p/js-libp2p/src/peer-store/index.js#L28.

@shresthagrawal
Copy link

shresthagrawal commented Feb 10, 2020

oh sorry! I didn't realised that the class was exported, I thought it was just the functions. Thanks! Will work on the documentation soon. Can you provide me to some reference that I can use to structure the documentation?

@vasco-santos
Copy link
Member

FYI I created an issue on libp2p/js-libp2p/issues/553, so that we can archive this repo. Regarding structure, I would say that you should have a look into the js-libp2p doc folder for inspiration.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants