The docs can always be improved. We've been working hard to make a lot of improvements since this issue.
@byrneciaran sorry for the delay in getting answers for these questions.
I'm still not sure which came first, and why there is a gcloud?
We actually have both of these addressed on our FAQ: https://googlecloudplatform.github.io/gcloud-node/#/faq
the Datastore docs don't mention anything about Datasets yet it's the first thing you come across once you get started with gcloud.
I'm not sure if you're talking about this library, but if you were to click on Datastore, you'd get to: https://googlecloudplatform.github.io/gcloud-node/#/docs/v0.16.0/datastore. That page shows how to get a Datastore object and has a list of the methods, one being "dataset". Showing an example of how to use the dataset method might be helpful here.
From there or from the sidebar ("Dataset"), you can then get to https://googlecloudplatform.github.io/gcloud-node/#/docs/v0.16.0/datastore/dataset, which seems to cover the API pretty well. Is there something about our general site, hierarchy, or something else that simply makes things harder than they need to be?
I'm still confused about Keys as there's no documentation on what params to set for specifying ancestors, etc.
This library's docs just represent our library. We link out to the official service docs for users to learn more about the basics of the services and how they work, best practices, etc. We don't want to duplicate all of the documentation (which is a lot!) that already exists there.
@jonface can you be more specific about what is poor and needs fixing?
@jgeewax RE: https://cloud.google.com/datastore/docs/concepts/entities#Datastore_Properties_and_value_types where they show examples like:
var entity = {
key: { path: [{ kind: 'Employee', name: 'asalieri' }] }
// ... some properties ...
};
datastore.commit({
// Request insertion with complete key specified
mutation: { insert: [entity] },
mode: 'NON_TRANSACTIONAL'
}).execute(callback);
I can see how this would be super confusing to a reader of those docs who we sent there from our docs for more information. Do we expect the cloud docs to ever show gcloud-node code? Assuming not or at least not for a while, is there a way to have the docs explain what library they're talking about for the example code? See below for a crude attempt at clarity:
