Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataStore Sample #117

Closed
noizu opened this issue Sep 20, 2018 · 5 comments
Closed

DataStore Sample #117

noizu opened this issue Sep 20, 2018 · 5 comments
Assignees
Labels
type: docs Improvement to the documentation for an API.

Comments

@noizu
Copy link

noizu commented Sep 20, 2018

For petes sake can you include a sample entity fetch and query. Inline code documentation is fairly robust but end users shoudn't need to pour over module definitions to figure out the module responsible for running queries, the setup needed to get it to work and how to setup a basic call.

;)

@noizu
Copy link
Author

noizu commented Sep 20, 2018

Thanks @bshaffer but those are using the older Diplomat Library which is a fantastic piece of software but lacks support for cursors.

@noizu
Copy link
Author

noizu commented Sep 21, 2018

For the data store project in this code base it's actually the following.

{:ok, token} = Goth.Token.for_scope("https://www.googleapis.com/auth/datastore")
 conn = GoogleApi.Datastore.V1.Connection.new(token.token)
 request = %GoogleApi.Datastore.V1.Model.RunQueryRequest{
      gqlQuery:  %GoogleApi.Datastore.V1.Model.GqlQuery{
        queryString: "select * from DataStoreEntityType limit 5",
        allowLiterals: true
      }
    }
r = GoogleApi.Datastore.V1.Api.Projects.datastore_projects_run_query(conn, "your-project-name", [body: request])

@noizu
Copy link
Author

noizu commented Sep 21, 2018

It took me 57 minutes to sleuth that out and I know the language and programming in general pretty well. So for some kid new to Elixir or to walking through other peoples source code that could have taken hours or days to figure out.

If the developer can post some simple examples in the readme and throw a few @examples into the inline exdocs I think it would go a long way for swinging adoption to this library away from the unofficial Diplomat client. Having access to cursors, etc. is a major improvement even if things look a little unnecessary verbose/java like.

https://github.com/christopheradams/elixir_style_guide

but beggars can't be choosers, super glad to have these libraries available now ^_^.

@JustinBeckwith JustinBeckwith added triage me I really want to be triaged. type: docs Improvement to the documentation for an API. and removed triage me I really want to be triaged. labels Sep 21, 2018
@fhinkel
Copy link

fhinkel commented Dec 7, 2020

Greetings, we're closing this due to inactivity. Please let us know if the issue needs to be reopened.

@fhinkel fhinkel closed this as completed Dec 7, 2020
@fhinkel fhinkel self-assigned this Dec 8, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Improvement to the documentation for an API.
Projects
None yet
Development

No branches or pull requests

4 participants