Open lookingwestapps opened 7 years ago
Hi,
Thank you for your feedback. I posted pull request to DT repo - https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21303 to fix this issue
It would be great to see this fixed 😊
Unfortunately, the PR got closed https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21303#issuecomment-355133151
There are 5 additional open issues about this #3 #4 #5 #6 #7
@Bolisov any chance you could make another PR on DT for this? As it stands the actual type declarations are pretty much unusable :(
I stumbled across this issue and documented at least one of the issues with current (stale) state in https://github.com/Bolisov/google-api-typings-generator/issues/13 before realizing there are more active forks.
@Maxim-Mazurok and @declanvong, have you chatted about the future of this library and/or started incorporating your functional forks back into DefinitelyTyped?
I stumbled across this issue and documented at least one of the issues with current (stale) state in #13 before realizing there are more active forks
I'm glad you're also interested in this project! Indeed, we have active fork, and we decided to use mine as the main one. So, feel free to open PRs. Regarding your issue, I've tested and submitted updated version of Google sheets API to Definitely Typed recently. Can you check if it'll work for you? I'll look more into this issue later, probably after holidays :)
@Maxim-Mazurok and @declanvong, have you chatted about the future of this library and/or started incorporating your functional forks back into DefinitelyTyped?
Yes, we've had some thoughts about the future of it. From the top of my head, we want to add prettier to make collaboration easier. Also, we want to drop all "pretty" stuff from generator and just reformat it after all code is generated. Otherwise, we'll be creating our own prettier, which is obviously out of scope of the project. I also think it would be great to start regularly update typings, as APIs keep changing and automatically submit them to Definitely Typed. But it's kind of a long term goal. Also, we need more people that will test all of the different APIs. Currently I'm working with Sheets for the most part. And @declanvong uses Classroom API.
Feel free to contact me on social, all links are on my website: https://maxim.mazurok.com
I've tested and submitted updated version of Google sheets API to Definitely Typed recently. Can you check if it'll work for you?
Yeah, it looks like this issue and #13 were fixed with https://github.com/DefinitelyTyped/DefinitelyTyped/pull/37847, and I see you updated things again in https://github.com/DefinitelyTyped/DefinitelyTyped/pull/41155. Things look fine from my perspective – thanks! It would be nice to close out this issue for clarity.
Yes, we've had some thoughts about the future of it.
I would be happy to help out but will continue to the conversation elsewhere!
Hi, I have this same issue with gapi.client.people.get() TypeError: Cannot read property 'get' of undefined. When I logged "gapi.client.people" the result is
How can I resolve this? (I think the structure is incorrect "gapi.client.people.people.get" instead of "gapi.client.people.get" ) Thanks!
@viviakemik indeed, it seems like you have to use it like this:
/**
* Provides information about a person by specifying a resource name. Use
* `people/me` to indicate the authenticated user.
*
* The request throws a 400 error if 'personFields' is not specified.
*/
await gapi.client.people.people.get({
personFields: "Test string",
"requestMask.includeField": "Test string",
resourceName: "Test string",
});
Please, open new issue here if you run into any issues with using gapi.client.people
typings.
I can update gapi.client.people
typings if they are outdated.
Also, you can use fresh typings from our types
branch which is updated every hour.
Thanks!
This repo is abandoned, see #19 and use active fork instead: Maxim-Mazurok/google-api-typings-generator
Please, close this issue if you will, thanks for your cooperation!
First of all, thanks for making this generator!
I'm having a problem using types/gapi.client.sheets.
When I call,
await gapi.client.spreadsheets.get({ spreadsheetId: "spreadsheetId" });
I get an error saying: "TypeError: Cannot read property 'get' of undefined"Implementation
My Angular 4 app successfully loads the "client" and then "sheets" like the example from the readme (with a few of my own additions):
I then successfully authorize the client just like the example (with a few additions of my own):
My index.html loads the javascript with this line:
<script async defer src="https://apis.google.com/js/api.js"></script>
Also I added "gapi.client.sheets" to my "types" in tsconfig.app.json.ERROR
All that works... after authorizing succeeds, when I click a button that calls,
await gapi.client.spreadsheets.get({ spreadsheetId: "spreadsheetId" });
I get an error saying: "TypeError: Cannot read property 'get' of undefined" So for some reason .spreadsheets is undefined.If I set a breakpoint in the browser I can examine the gapi.client to see it does NOT have a spreadsheets property, but it DOES have a sheets property and that has a spreadsheets property on it. So gapi.client.sheets.spreadsheets.get() exists, but gapi.client.spreadsheets is undefined.
I can workaround this issue by adding a "sheets" variable inside of types/gapi.client.sheets/index.d.ts on line 20 adding:
const sheets: any;
And then calling the spreadsheets.get() function like this:
What am I doing wrong that my gapi.client.spreadsheets is undefined?