a-marenkov / gsheets

A Dart library for working with Google Sheets API.
Other
79 stars 31 forks source link

Add createSpreadsheet #10

Closed piecubed closed 4 years ago

piecubed commented 4 years ago

Tested this, seems to work. Not sure if this is me doing something wrong, but it doesn't work with any spaces in the title.

a-marenkov commented 4 years ago

Hi! Thanks for contributing to gsheets.

I checked title with space and it works, here is the snippet:

void main() async {
  final gsheets = GSheets(_credentials);
  final ss = await gsheets.createSpreadsheet('test / test');
  print(ss.id);
  print(await ss.share('dev.a.marenkov@gmail.com', role: PermRole.owner));
}

Does it throw the exception when you use space?

a-marenkov commented 4 years ago

Also, i think it might be handy to add ability to create worksheets along with creating spreadsheet. What do you think?

piecubed commented 4 years ago

Just tried it with a space again, and seems like its working. The error didn't actually say anything about a space, but it was giving me a 500 error code for a while, and I tried removing the space, and it worked. Not sure what was causing it.

piecubed commented 4 years ago

Added all your edits. I plan on trying to make full API coverage, so be ready for more PRs!