Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Google Sheets adapter #10

Open
kieranajp opened this issue Oct 2, 2016 · 5 comments
Open

Google Sheets adapter #10

kieranajp opened this issue Oct 2, 2016 · 5 comments

Comments

@kieranajp
Copy link
Contributor

kieranajp commented Oct 2, 2016

Ausraster comprises a set of interfaces around document libraries. The idea is to have one sane interface to interact with documents of many formats. In its current state it has a set of Spreadsheet interfaces - offering a nice API to manipulate .xlsx files by wrapping PHPExcel - and in future I'd like to have interfaces for rich text documents (.docx, Google Docs, .rtf), slideshows (.pptx, Google Slides) etc.

This issue is to add another adapter to the project so it supports a new file format - for example I've started on a CSV adapter in #9. It would be great to get some help to add an adapter for Google Sheets. That way, someone could use the same API whether they want to create an .xlsx file for download, or create a Google Sheet.

This would entail pulling in a library from Composer (as a Suggested package) to work with the Google Sheets API, creating a namespace at HelloFresh\Ausraster\Spreadsheet\<package name>, and building implementations of Document, Worksheet and Cell in a very similar manner to how the PHPExcel adapter currently works.

Please see contributing.md for contribution guidelines, and happy hacking!

@xRahul
Copy link

xRahul commented Oct 2, 2016

Hi @kieranajp
Can you provide some description as to what the issue is and where?

@kieranajp
Copy link
Contributor Author

@xRahul Updated, if you're still interested in claiming this one

@xRahul
Copy link

xRahul commented Oct 3, 2016

@kieranajp sure! I'll check the code out then!

@xRahul
Copy link

xRahul commented Oct 6, 2016

Hey @kieranajp, The google sheets require a lot more to interface with them like authorization/OAuth etc. It's not a simple Document::open('filename.xlsx') in that case.

Any ideas on how to take care of this?

@kieranajp
Copy link
Contributor Author

Hi @xRahul,

It's ok to have extra methods for these things, so long as the core API for editing spreadsheets is consistent for excel / google sheets / everything else. So feel free to add extra methods for auth etc, even an extra interface if you think it needs one (see also Interface Segregation Principle if you're not already familiar with it).

I need to have a proper read of the documentation for Google Sheets to work out how I'd do it, but feel free to open a PR even if it's not finished and I can offer feedback on your approach! (That will count towards Hacktoberfest as well)

I'll try and read the documentation soon so I have a clear idea of the issues you're having. I know how painful Google APIs can be sometimes though so I understand if it's a bit tricky.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants