Sync Google Calendar in Lua - lua

Does anyone have an example how to sync data to Google Calendar via Lua?
Finally just changing a dates entry and reading its content.

Google does not offer a client library for Lua so you will have to use their REST API. This means the best way to get started is by looking at the documentation at http://code.google.com/apis/calendar/v3/getting_started.html.
Besides plain Lua you will need at least something like LuaSocket to retrieve and create data over the wire and based on a quick glance of their documentation some sort of authentication library is required as well (I found LuaOAuth with a quick google, but I can not recommend it because I have personally not used it).

Related

Programmatic access to Google Docs

I have a need to generate and share Google Docs programatically. In this case, these are reports generated weekly from various sources like JIRA and a number of other tools used internally at our company.
The only documentation found so far seems to be related to use of Google scripts to generate documents.
Is there something similar to gspread for Google Spreadsheets that works with Google Docs? A python wrapper would enable us to collect the data from various sources and do some analysis before populating the report.
You may refer with this thread. It suggested that you need to create a blob of data representing your document in any of the formats listed here, depending on your programming language, simplest may be text/csv for a spreadsheet and application/rtf for a text-document. Then put in in an appropriately formatted POST data. You can also check the sample python code in the given link.

What's the proper and correct way to access files on O365 from iOS

I know that someone mean will probably close this question for being opinion, but the truth is, I'm not after opinion as such, but actual facts about the correct way and how to do this.
I've been searching around for quite a time and I'm still unclear as to what direction to take. It seems there are a billion* libraries that I could use, but I want to know what would be the correct, proper supported method of achieving this.
Essentially, I have a very simple requirement to list and download files from Sites on our Office 365 subscription to an iOS application.
Initially, I looked at the REST interface for Sharepoint and, from a browser, was able to easily perform a GET to our site and receive and receie a response with meta data about the file, for example:
https://mytenantid.sharepoint.com/_api/web/getfilebyserverrelativeurl('/MyFile/Here/Document.txt')
I could also retrieve JSON output instead of XML by specifying an Accept header of application/json using the POSTMAN REST client for Chrome.
So far, so easy. Just the authentication to do outside of the browser and that's it.
Phew!!
I started by looking at Basic authentication, but wasn't sure if this is the right way to do it and even if it would work?
On looking further, it seems that actually, using OAuth might be the way to go. Apparently, you can either do this yourself (no idea how), or use a library (ADAL?) from Microsoft? Unfortunately, this all looks half baked will very little documentation that seems to work. It also requires the use of CocoaPods and workspaces and isn't just a simple library that I can copy to my project and start using (a la SwiftyJSON). There also seems to be a lot of other libraries around too.
I should mention that I'm using Swift, so I've tried converting code from Objective C to Swift (unsuccessfully) too. Apparently I can't use "readWithCallback" with an argument list that the code tells me I should actually use -- even a sample application I downloaded had the same issue.
I've also tried using node.js with a script (not a Web Application) and the documentation and number of libraries available for that is almost worse.
Any assistance to achieve this really simple capability would be hugely appreciated -- it's been driving me nuts.
Many thanks,
D.
*this might be a slight exaggeration.
Office 365 has a RESTful API that you can use any programming language to authentication and integrate in your app.
Here is a simple example for iOS connected app to office 365. The sample shows how to do this in Objective C and SWIFT.
https://github.com/OfficeDev/O365-iOS-Connect
If you want to full iOS samples for office 365 connected apps, Check out this link:
https://msdn.microsoft.com/en-us/office/office365/howto/starter-projects-and-code-samples
Enjoy :)

How do I interact with Google Docs (Sheets) from another scripting environment (VB.net within Grasshopper3d)?

I'm scripting with VB.net (and sometimes with c#) within Grasshopper (a plug-in for a 3d modeling program called Rhino), and I'd like to interact with Google Docs, specifically with the spreadsheet app.
I want to be able to send data from Grasshopper to populate google spreadsheets.
The data is always either numerical or string.
I'd also like to generate charts from the data.
There is a solution to this at the bottom of this thread on the GH website.
.. And this is a solution for reading that should work in python as to use c# would need you to use other libraries.
You need to publish the spreadsheet as a csv first.
import urllib2
myUrl="https://docs.google.com/spreadsheet/pub?key=0AgIWT_wqd-VmdE1NekRSWFZoUnBQdWJhYUhwcU1vclE&single=true&gid=0&output=csv"
response = urllib2.urlopen(myUrl)
print response.read()
Here's a working GH implementation
[this should probably be a comment, but I can't comment yet]

iOS: Google Calendar Example

Searching around the net for almost 1 day I still did not see any simple good example of an app that implements the Google Calendar API. Or even simple explanation on how to implement the API is still not available. Can someone help me please? I'm a newbie to iOS. I need to learn how to create an event using the Google Calendar API through my app in iOS. I need a sample simple code...
Here are some very useful links when trying to figure out the google calendar api. http://code.google.com/p/gdata-objectivec-client/wiki/GDataObjCIntroduction and mainly http://code.google.com/p/iphone-gcal/. I just downloaded the source code from the second link and worked from there. It was great!
The Google Calendar API, like most Google API's, provides a straightforward REST interface. Instead of focussing first on how to create calendar events, learn how to interact with a RESTful web service. Once you know how to do that, you only have to learn what calls to make to accomplish your goal, and that's already well documented.

Getting autocomplete googleMaps data into a Delphi combobox

I am doing a Delphi transport application interacting with GoogleMaps APi and i would like to propose all "near by" names coming from the autocomplete Google Maps API when i enter the starting adress of the direction.
All of this will be displayed in a TCombobox when would be changed on the OnChange propertie.
Is that possible ??? ever heard of it ???
Thanks a lot
Gwenael
There is a part of the Google Maps API called The Google Places Autocomplete API. You can send requests (in the examples part of the reference page there is also the example with bounds for your purpose) as you will type in your combo box (ideally after some short delay for typos corrections). As the result you can receive either JSON or XML format file. After you parse it, you will get the list of appropriate suggestions.
I'm not sure with the Google Maps API Key; if it's possible to use it in standalone application (and about the limitations) because I haven't implemented static part of the Google Maps yet.
My first thought (assuming an approach which is based on remote controlling the web interface) was: this can be solved using TWebBrowser and friends (IWebBrowser2, IHTMLElement etc.). See my answer on this question to get a feeling for this. You could use Embedded Web Browser from bsalsa for easy access to all the Internet Explorer functionality.
My second thought was: there might be a part in the official API for this. But this I don't know. If there is none then the above approach could be a (work-intensive) workaround.
Yes, it's possible.
I have written a free and open source component that implements the Google Place Autocomplete and Google Place Details API's:
https://carbonsoft.co.za/components/
or
https://github.com/RynoCoetzee/TRCGPlaceAutoCompleteCombo

Resources