Re: [Lazarus] Google APIs
On Tue, 19 May 2015, markbass72 wrote: On 15/05/2015 12:59, Michael Van Canneyt wrote: On Fri, 15 May 2015, markbass72 wrote: Now it works! Great, because I almost got a heart attack :) Michael. please, stay away from heart attacks ok? :) I still have some problems with either commit 30859 and 30885. In calendar demo, event listbox, double click event, I have added this code: procedure TMainForm.LBEventsDblClick(Sender: TObject); var Entry: TEvent; begin Entry:=Events.items[LBEvents.ItemIndex]; try Entry.summary:='new summary'; FCalendarAPI.EventsResource.Update(FCurrentCalendar.ID, entry.id, Entry); ShowMessage('event updated'); except on e: exception do begin ShowMessage('response failed:'+#10+e.Message); end; end; end; It looks like a required field is missing but time fields are ok (as inserted from browser in google calendar web app). Can you help me? You must use Patch, not update. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On 15/05/2015 12:59, Michael Van Canneyt wrote: On Fri, 15 May 2015, markbass72 wrote: Now it works! Great, because I almost got a heart attack :) Michael. please, stay away from heart attacks ok? :) I still have some problems with either commit 30859 and 30885. In calendar demo, event listbox, double click event, I have added this code: procedure TMainForm.LBEventsDblClick(Sender: TObject); var Entry: TEvent; begin Entry:=Events.items[LBEvents.ItemIndex]; try Entry.summary:='new summary'; FCalendarAPI.EventsResource.Update(FCurrentCalendar.ID, entry.id, Entry); ShowMessage('event updated'); except on e: exception do begin ShowMessage('response failed:'+#10+e.Message); end; end; end; It looks like a required field is missing but time fields are ok (as inserted from browser in google calendar web app). Can you help me? Thanks in advantage, nomorelogic Request : PUT https://www.googleapis.com:443/calendar/v3/calendars/account...@gmail.com/events/f8umj295ncoahohqh2o8rjrsbc Headers: Content-type=application/json Authorization: Bearer ya29.eAE--gypYwbsLnh4YyQVrMXLMbbtHgujdHaQXlYxNRROhO0Oy6eAurHoVpetFYvamWgxdbYAiKb5RA Body: { summary : new summary } Response : 400 : Bad Request Headers: HTTP/1.0 400 Bad Request Vary: X-Origin Content-Type: application/json; charset=UTF-8 Date: Tue, 19 May 2015 13:26:49 GMT Expires: Tue, 19 May 2015 13:26:49 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Server: GSE Alternate-Protocol: 443:quic,p=1 Accept-Ranges: none Vary: Origin,Accept-Encoding Body: { error: { errors: [ { domain: global, reason: required, message: Missing end time. } ], code: 400, message: Missing end time. } } -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On 19/05/2015 18:54, Michael Van Canneyt wrote: You must use Patch, not update. using Patch is Ok. Thanks nomorelogic -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Google APIs - update
Hello, There seems to be a problem with RTTI and dynamic arrays when using the i386 compiler (using register calling conventions). This affects the (JSON) serialization used in the Google APIs. This problem is definitely present in the 2.6.4 compiler. Since that is the compiler used by current/recent Lazarus versions, I have created a workaround for this problem in the Google API files and have committed the necessary changes for this. It is possible that this problem is also present in the 3.x (trunk) version of the compiler, but this is not quite clear yet. As I currently have no access to a development system with the 3.X/i386 compiler, I cannot test this (yet). If the problem is confirmed, the simple solution is to enable the workaround for 2.6.4 in trunk as well (pending a fix in the compiler). Other changes in the commit are: - The code generator has experimental support for using lists of objects instead of arrays. I have tested this support in the google calendar demo, and it works. It requires regenerating the google api files using the provided generator program. As a side effect: using object lists would also alleviate the problem of the compiler bug. - Support for nested resources. (such as used in Gmail) - A GMail demo has been committed to the lazarus source tree. - Fix for a bug when doing write operations. I have tested all demos on Linux 64-bit (trunk/2.6.4) and Windows 32-bit (2.6.4 only) If you find a problem on Windows 32-bit (trunk), please let me know. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On Fri, 15 May 2015, markbass72 wrote: I'm experimenting with the calendar demo and I have problems with updating an event I created this thread on forum http://forum.lazarus.freepascal.org/index.php/topic,28431.0.html Better ask questions here. I don't use the forum, I'm old school. But I have answered on the forum. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On 15/05/2015 10:22, Michael Van Canneyt wrote: Better ask questions here. I don't use the forum, I'm old school. But I have answered on the forum. from forum: you can set the webclient.logfile to some valid filename and examine the resulting file after the request. It should contain the complete response of google Note that you better use the Patch method if you're just changing some properties. Following the response for: FCalendarAPI.EventsResource.Update(FCurrentCalendar.ID, entry.id, Entry); that is the same (except for 1st line where response begins with Request : PATCH https://...;) for: FCalendarAPI.EventsResource.Patch(FCurrentCalendar.ID, entry.id, Entry); maybe missing headers? thanks Request : PUT https://www.googleapis.com/calendar/v3/calendars/account...@gmail.com/events/f8umj295ncoahohqh2o8rjrsbc Headers: Authorization: Bearer ya29.dAGRj9MlacyM-TxfnKGMKjpAQNhL2U61xxrMjzk05LbLHPFqYNVg6llBTpL_jj0DrxLx9TVCDBfAjw Body: { description : bla bla bla[modified] } Response : 400 : Bad Request Headers: HTTP/1.0 400 Bad Request Vary: X-Origin Content-Type: application/json; charset=UTF-8 Date: Fri, 15 May 2015 09:12:07 GMT Expires: Fri, 15 May 2015 09:12:07 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Server: GSE Alternate-Protocol: 443:quic,p=1 Accept-Ranges: none Vary: Origin,Accept-Encoding Body: { error: { errors: [ { domain: global, reason: badContent, message: Unsupported content with type: text/html } ], code: 400, message: Unsupported content with type: text/html } } -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
I'm experimenting with the calendar demo and I have problems with updating an event I created this thread on forum http://forum.lazarus.freepascal.org/index.php/topic,28431.0.html nomorelogic -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On 15/05/2015 12:48, Michael Van Canneyt wrote: I checked, I had indeed another version of googleservice.pp with the fix in it. I commited the fix, rev. 30859. Michael. Now it works! Thanks -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On Fri, 15 May 2015, markbass72 wrote: On 15/05/2015 12:48, Michael Van Canneyt wrote: I checked, I had indeed another version of googleservice.pp with the fix in it. I commited the fix, rev. 30859. Michael. Now it works! Great, because I almost got a heart attack :) Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On Fri, 15 May 2015, markbass72 wrote: On 15/05/2015 10:22, Michael Van Canneyt wrote: Better ask questions here. I don't use the forum, I'm old school. But I have answered on the forum. from forum: you can set the webclient.logfile to some valid filename and examine the resulting file after the request. It should contain the complete response of google Note that you better use the Patch method if you're just changing some properties. Following the response for: FCalendarAPI.EventsResource.Update(FCurrentCalendar.ID, entry.id, Entry); that is the same (except for 1st line where response begins with Request : PATCH https://...;) for: FCalendarAPI.EventsResource.Patch(FCurrentCalendar.ID, entry.id, Entry); maybe missing headers? Looks like it, a header 'Content-type: application/javascript' should be added. Look in googleservice.pp, line 522 Req.SetContentFromString(AInput); There add a if (AMethod'GET') then Req.Headers.Add('Content-Type: application/json'); Strange. I have created a calendar sync app which does both POST and PATCH. Probably I have forgotten to copy some changes to the FPC repo. Please test and report, if this helps, I'll update the API. (I need to do some other changes anyway) Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On Fri, 15 May 2015, Michael Van Canneyt wrote: On Fri, 15 May 2015, markbass72 wrote: On 15/05/2015 10:22, Michael Van Canneyt wrote: Better ask questions here. I don't use the forum, I'm old school. But I have answered on the forum. from forum: you can set the webclient.logfile to some valid filename and examine the resulting file after the request. It should contain the complete response of google Note that you better use the Patch method if you're just changing some properties. Following the response for: FCalendarAPI.EventsResource.Update(FCurrentCalendar.ID, entry.id, Entry); that is the same (except for 1st line where response begins with Request : PATCH https://...;) for: FCalendarAPI.EventsResource.Patch(FCurrentCalendar.ID, entry.id, Entry); maybe missing headers? Looks like it, a header 'Content-type: application/javascript' should be added. I checked, I had indeed another version of googleservice.pp with the fix in it. I commited the fix, rev. 30859. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On Thu, 14 May 2015, markbass72 wrote: On 09/05/2015 17:28, Michael Van Canneyt wrote: You need FPC 3.1 for all this to work 'out of the box'. But: The code can be compiled with 2.6.4/2.6.4, but then you must copy the source files from the FPC SVN repository to the lazarus component directory. You will also need to install the synapse package then. I have updated the README.txt with the necessary instructions. I also did some fixes using some IFDEFS. I will see about making a ZIP file available so people do not need access to FPC SVN. To compile with fpc 2.6.4, I realized a script to update folder ../lazarus/components/googgleapis/2_6_4 Just create a script (e.g.: getgoogle.sh) inside this folder and paste following content. This script populates the current folder with needed sources (as specified in README.txt). Great!! I have committed the script. rev 49018. I don't know your name, but I entered your email address in the SVN log entry and script. Michael. #/bin/bash function ExitFromScript() { echo ERROR: incorrect path! echo You must execute this script from folder: .../lazarus/components/googleapis/2_6_4 exit } pwd|grep /2_6_4$ || ExitFromScript echo Folder: OK! [ ! -d /tmp/googleapi ] mkdir /tmp/googleapi svn co http://svn.freepascal.org/svn/fpc/trunk/packages/googleapi/src/ /tmp/googleapi/ cp /tmp/googleapi/* . [ ! -d /tmp/fcl-web ] mkdir /tmp/fcl-web svn co http://svn.freepascal.org/svn/fpc/trunk/packages/fcl-web/src/base/ /tmp/fcl-web/ cp /tmp/fcl-web/fpoauth2.pp . cp /tmp/fcl-web/fphttpwebclient.pp . cp /tmp/fcl-web/fpwebclient.pp . cp /tmp/fcl-web/restcodegen.pp . cp /tmp/fcl-web/restbase.pp . cp /tmp/fcl-web/fpoauth2ini.pp . cp /tmp/fcl-web/fpjwt.pp . echo -- googleapis sources -- ls -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On 09/05/2015 17:28, Michael Van Canneyt wrote: You need FPC 3.1 for all this to work 'out of the box'. But: The code can be compiled with 2.6.4/2.6.4, but then you must copy the source files from the FPC SVN repository to the lazarus component directory. You will also need to install the synapse package then. I have updated the README.txt with the necessary instructions. I also did some fixes using some IFDEFS. I will see about making a ZIP file available so people do not need access to FPC SVN. To compile with fpc 2.6.4, I realized a script to update folder ../lazarus/components/googgleapis/2_6_4 Just create a script (e.g.: getgoogle.sh) inside this folder and paste following content. This script populates the current folder with needed sources (as specified in README.txt). #/bin/bash function ExitFromScript() { echo ERROR: incorrect path! echo You must execute this script from folder: .../lazarus/components/googleapis/2_6_4 exit } pwd|grep /2_6_4$ || ExitFromScript echo Folder: OK! [ ! -d /tmp/googleapi ] mkdir /tmp/googleapi svn co http://svn.freepascal.org/svn/fpc/trunk/packages/googleapi/src/ /tmp/googleapi/ cp /tmp/googleapi/* . [ ! -d /tmp/fcl-web ] mkdir /tmp/fcl-web svn co http://svn.freepascal.org/svn/fpc/trunk/packages/fcl-web/src/base/ /tmp/fcl-web/ cp /tmp/fcl-web/fpoauth2.pp . cp /tmp/fcl-web/fphttpwebclient.pp . cp /tmp/fcl-web/fpwebclient.pp . cp /tmp/fcl-web/restcodegen.pp . cp /tmp/fcl-web/restbase.pp . cp /tmp/fcl-web/fpoauth2ini.pp . cp /tmp/fcl-web/fpjwt.pp . echo -- googleapis sources -- ls -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On 14/05/2015 11:14, Michael Van Canneyt wrote: Great!! I have committed the script. rev 49018. I don't know your name, but I entered your email address in the SVN log entry and script. thanks for reference :) btw my name is Marcello Basso (nomorelogic) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On Fri, 8 May 2015, markbass72 wrote: hi, I am very happy of the addition of this package, great work and, of course, thanks! I can't compile due to following error reggoogleapi.pp(14,3) Fatal: Cannot find restbase used by reggoogleapi of package lazgoogleapis. fpc 2.6.5 You need FPC 3.1 for all this to work 'out of the box'. But: The code can be compiled with 2.6.4/2.6.4, but then you must copy the source files from the FPC SVN repository to the lazarus component directory. You will also need to install the synapse package then. I have updated the README.txt with the necessary instructions. I also did some fixes using some IFDEFS. I will see about making a ZIP file available so people do not need access to FPC SVN. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On 07/05/15 22:00, Michael Van Canneyt wrote: Hello, Some of you may have noticed that a package 'Google APis' has been added to FPC in subversion. These contain the Google APIs as generated from the Google Discovery Service (~70 APIS). I am of the opinion that such Web APIs have meanwhile the same importance as the native APIS that make up the desktop; the world is increasingly connected to Internet, and Google, MS Office365 apis (and many others) will become more and more part of the toolset of a programmer. Object Pascal Programmers should not be left behind. Thanks * 10^6 ;) Michael. PS. The REST API for MS Office365 is next. LibreOffice is said to also developing theirs https://libreoffice-from-collabora.com/icewarp-and-collabora-are-working-on-libreoffice-online-document-editing-an-open-source-alternative-to-google-apps-office-365/ ;) el es -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
Michael Van Canneyt wrote: Hello, Some of you may have noticed that a package 'Google APis' has been added to FPC in subversion. These contain the Google APIs as generated from the Google Discovery Service (~70 APIS). I am of the opinion that such Web APIs have meanwhile the same importance as the native APIS that make up the desktop; the world is increasingly connected to Internet, and Google, MS Office365 apis (and many others) will become more and more part of the toolset of a programmer. Are these really APIs, i.e. an interface between an application program and a local library, or are they actually communication protocols? https://xkcd.com/1481/ applies. Perhaps FPC/Lazarus, which is already a large project, should package things which take a URI as a parameter and return HTML/XML/JSON etc. separately. Also there's the risk that Google will change or discontinue a service arbitrarily. They don't exactly have a good record in that area. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On Fri, 8 May 2015, Mark Morgan Lloyd wrote: Michael Van Canneyt wrote: Hello, Some of you may have noticed that a package 'Google APis' has been added to FPC in subversion. These contain the Google APIs as generated from the Google Discovery Service (~70 APIS). I am of the opinion that such Web APIs have meanwhile the same importance as the native APIS that make up the desktop; the world is increasingly connected to Internet, and Google, MS Office365 apis (and many others) will become more and more part of the toolset of a programmer. Are these really APIs, i.e. an interface between an application program and a local library, or are they actually communication protocols? https://xkcd.com/1481/ applies. This is a sterile distinction. It is the only way to communicate with Google. it is, for all practical purposes, the API. They also call it the API, for good reason. Perhaps FPC/Lazarus, which is already a large project, should package things which take a URI as a parameter and return HTML/XML/JSON etc. separately. No. For me, this is at the same level as the Win32 headers or Mac OS headers. Whether there is a protocol involved or not is irrelevant for me. It's about making functionality available. Also there's the risk that Google will change or discontinue a service arbitrarily. They don't exactly have a good record in that area. This is web programming. Things change fast. I am aware of this. The files are generated using a tool, and the tool is also in SVN. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Google APIs
hi, I am very happy of the addition of this package, great work and, of course, thanks! I can't compile due to following error reggoogleapi.pp(14,3) Fatal: Cannot find restbase used by reggoogleapi of package lazgoogleapis. fpc 2.6.5 lazarus trunk -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
+1. On 05/07/2015 06:33 PM, William Ferreira wrote: GCalendar will be very welcome! -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
Am 08.05.2015 10:30 schrieb Michael Van Canneyt mich...@freepascal.org: Also there's the risk that Google will change or discontinue a service arbitrarily. They don't exactly have a good record in that area. This is web programming. Things change fast. I am aware of this. The files are generated using a tool, and the tool is also in SVN. But maybe FPC's release cycle is too slow then. Maybe a separate fppkg would be better (like lnet) as those can be updated faster... Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
On Fri, 8 May 2015, Sven Barth wrote: Am 08.05.2015 10:30 schrieb Michael Van Canneyt mich...@freepascal.org: Also there's the risk that Google will change or discontinue a service arbitrarily. They don't exactly have a good record in that area. This is web programming. Things change fast. I am aware of this. The files are generated using a tool, and the tool is also in SVN. But maybe FPC's release cycle is too slow then. Maybe a separate fppkg would be better (like lnet) as those can be updated faster... Let's not exaggerate. These APIS are around for years. And the idea is to distribute FPC's own packages using fppkge anyway, exactly to be able to release faster. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Google APIs
Hello, Some of you may have noticed that a package 'Google APis' has been added to FPC in subversion. These contain the Google APIs as generated from the Google Discovery Service (~70 APIS). I am of the opinion that such Web APIs have meanwhile the same importance as the native APIS that make up the desktop; the world is increasingly connected to Internet, and Google, MS Office365 apis (and many others) will become more and more part of the toolset of a programmer. Object Pascal Programmers should not be left behind. Mattias Gaertner kindly gave permission to add a package to the 'components' directory of Lazarus. It will register the Google API components on the component palette (it uses the images provided by Google itself) Many of the APIS will probably not be used by most programmers, but some of the core APIs will be useful for a lot of people: Google Calendar, Google Drive, Google Tasks, Google Mail, Blogger, Youtube etc. There are already 4 example programs in the package directory, I will add more as time permits (Google Mail and Translate are definitely on my list). Note: you will need to create OAuth client ID and secret keys to make them work. The components as committed to Lazarus SVN will compile out of the box with FPC 3.1. The components can also be compiled with FPC 2.6.4 (in fact they were developed with FPC 2.6.4) but then some extra files must be copied from the FPC 3.1 repository to the components dir in lazarus. (I will commit instructions for this later on) One of the design goals was to be able to use the various TCP/IP implementations for FPC; FPC 2.6.4 will only work with Synapse, but since 3.1 contains support for the HTTPS protocol, TFPHTTPClient can be used in 3.1. Some of the components have been used in some private projects, so they work, but I would welcome experiences, suggestions for improvement, comments. One thing which I still plan to do is to adapt the code generator so it also creates fpdoc documentation. (the code generator is committed to SVN) If I broke something in the lazarus SVN or forgot a file (always an option ;) ) please let me know and I will fix it ASAP. But if you don't install the package, there should be no side effects to the commit. For those of you that read Blaise Pascal magazine: the Google APIs will be featured in the next issue (issue 41 for the English version). As usual, comments, suggestions and contributions welcome. Michael. PS. The REST API for MS Office365 is next. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Google APIs
GCalendar will be very welcome! William de Oliveira Ferreira Programador Web/Desktop (32) 8412 1897 - Whatsapp Date: Thu, 7 May 2015 23:00:45 +0200 From: mich...@freepascal.org To: laza...@lazarus.freepascal.org; fpc-de...@lists.freepascal.org; fpc-pas...@lists.freepascal.org Subject: [Lazarus] Google APIs Hello, Some of you may have noticed that a package 'Google APis' has been added to FPC in subversion. These contain the Google APIs as generated from the Google Discovery Service (~70 APIS). I am of the opinion that such Web APIs have meanwhile the same importance as the native APIS that make up the desktop; the world is increasingly connected to Internet, and Google, MS Office365 apis (and many others) will become more and more part of the toolset of a programmer. Object Pascal Programmers should not be left behind. Mattias Gaertner kindly gave permission to add a package to the 'components' directory of Lazarus. It will register the Google API components on the component palette (it uses the images provided by Google itself) Many of the APIS will probably not be used by most programmers, but some of the core APIs will be useful for a lot of people: Google Calendar, Google Drive, Google Tasks, Google Mail, Blogger, Youtube etc. There are already 4 example programs in the package directory, I will add more as time permits (Google Mail and Translate are definitely on my list). Note: you will need to create OAuth client ID and secret keys to make them work. The components as committed to Lazarus SVN will compile out of the box with FPC 3.1. The components can also be compiled with FPC 2.6.4 (in fact they were developed with FPC 2.6.4) but then some extra files must be copied from the FPC 3.1 repository to the components dir in lazarus. (I will commit instructions for this later on) One of the design goals was to be able to use the various TCP/IP implementations for FPC; FPC 2.6.4 will only work with Synapse, but since 3.1 contains support for the HTTPS protocol, TFPHTTPClient can be used in 3.1. Some of the components have been used in some private projects, so they work, but I would welcome experiences, suggestions for improvement, comments. One thing which I still plan to do is to adapt the code generator so it also creates fpdoc documentation. (the code generator is committed to SVN) If I broke something in the lazarus SVN or forgot a file (always an option ;) ) please let me know and I will fix it ASAP. But if you don't install the package, there should be no side effects to the commit. For those of you that read Blaise Pascal magazine: the Google APIs will be featured in the next issue (issue 41 for the English version). As usual, comments, suggestions and contributions welcome. Michael. PS. The REST API for MS Office365 is next. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus