{obj:'ect'}?Gun option.Gun example briefly explaining that code' ' need to be filled in for all three object keys? Should users actually be filling in the AWS S3 key information in their JS code?put section, the _no_, _one_, and _many_ should be _no peers_, _one peer_, and _many peers_ for clarity. (Yes it does become clear, but readers have additional cognitive load as they try to figure out what you are referring to, when they would be better spending their cognitive cycles on why you're telling them.options is an {keys:'values'}, currently there are no options in gun core, but specific hook implementations may have options."callback is a function(){} which gets called as a callback(err, graph) and is used for err handling and the raw graph. Note that this callback is repeatedly called, therefore it shouldn't be used for everyday development. Instead, use on or val, as they are optimized for application use, while the gun callback is engineered primarily for hooks and extensions."Same comments apply to get and path.
Applies to both get and map.
on examples, it would be nice to have longer comment sections and make a clear delineation of what data is being received in each round.on also console.log? if not, why not? (feels like an arbitrary 'good for the goose but not the gander distinction.)map examples, the examples need some type of title, or other preparatory text, e.g. map without on or val.would be good to know if the functions return anything, if at all.. thanks
All API methods should return a gun reference context that you can chain off of. Or were you talking about other functions?
thanks. will ask a follow up question on gitter if that's ok..
Yupe. :)
Docs have now been rewritten like... 2 or 3 times since July 2015? Definitely all could be improved, but I'm gonna say it is safe to close this issue. If there are still problems:
Please feel free to contribute and improve the docs (they are a wiki)! Or asking questions on Stackoverflow tagged "gun" is great. And help on gitter.
gun.js.org website needs updated docs though. Will probably add some JS there that auto-pulls from github's wiki API so it is always recent. But that is a separate thing, so I'm gonna close this one, now finally! But PLEASE do complain/help/contribute to doc clarity.
Looks like this was being used to cover ALL core documentation clarity. Woops! So I'm gonna keep it open for future use instead.
there's no content for gun.chain, I don't know if it's missing or removed
@KhaledElAnsari good observation!
I'll add that to the TODO list of things to address in the documentation.
It still exists, but end-user-developers don't really need to use it, but it should still be documented! If you have any specific question about it right now I can try to answer it.
I'm still reading about Gun, hopefully I can use it in my next project. good job by the way
In the docs, regarding the constructor it states:
the previous options are actually aggregated into an object, which you can pass in yourself.
options.peers is an object, where the URLs are properties, and the value is an empty object.
That is not actually true. The object must NOT be empty, it must be in the format of {url: "_your_url_"}
@plentylife yeah some meta-data got added to the peer objects since then, they look more like this:
{
peers: {
'http://localhost:8080/gun': {
url: 'http://localhost:8080/gun',
wire: __rawSocket
}
}
}
Now note, you do not have to pass it like that it just upgrades internally into an object that is represented like that.
If you see anything that is wrong in the docs, https://github.com/amark/gun/wiki/API is a wiki that can be edited, so feel free to improve it for everybody!
@amark I couldn't get it to work, unless I passed it with a url property filled in.
@amark The docs say we can use Gun(['http://server1.com/gun', 'http://server2.com/gun'])
But this doesn't give any idea how to set up those servers for gun. A little more explanation is necessary.
Also, if not sure if we can use server.com/gun1, server1.com/gun2
wouldnt it be better to have monothematic issues on documentation, marked with a label "documentation" ?
@feat7 server1.com/gun was suppose to be an example URL, not a real/actual URL. Fair point though, when we launch AXE hopefully we can update this with real URLs that anybody can use. https://gun.eco/docs/Installation#node should have some more info on how to setup - do those docs (and related pages) help at all, or need changes?
@thoka monothematic? I'm not sure what you mean, but sure! I think you have contributor access/rights? If not, I can give them to you, to help change whatever needs to be changed to make things better :)
@amark monothematic: one issue <=> one topic
contributor rights: not yet
Seems like constructor params at the gunjs-notes-app/server.js example
Gun({ file: 'db/data.json', web: server });
differs from the described at the docs
https://github.com/amark/gun/wiki/API#options
Neither 'file' parameter nor 'web' one.. Seems confusing especially for the basic example.
I've found many similar discrepancies - and asked @amark about them a couple of days ago before he went on vacation. If I understood correctly he suggested adding discrepancies to the Wiki and he'd edit/correct them later.
The most common I've found are additional optional arguments (such as this case).
I would also gladly accept contrib rights as well to help clarify and organize documentation structure.
@bugs181 Docs are all openly editable via the Wiki here in Github.
@Dletta There were a couple other things I thought I could help out with. Mostly cleaning up Git issues. I see a lot of users asking questions but their Markdown skills are limited. I could clean these issues up to be more readable as well.
Not sure if it is a bug or documentation fault, but back(0) returns the same result as back(1) which isn't as documented (or expected)
The semantics of map/on/once are not entirely clear. In particular it seems that a chain of gets with a single on at the end, will get updates/modification/deletions of final item in chain, but only additions to chain as a whole.
It would be good to know if there was a preferred way of looking for changes to any of the chain.