Accessing the Google Documents List API from Ruby - ruby

I'm trying to figure out how to access the Google Documents List API from Ruby.
I've looked at the google-api-ruby-client but that doesn't seem to support that particular API. I've also looked at the gdata-ruby-util client but that looks like it's out of date and no longer active.
It seems odd that there's no ruby client for accessing such a popular API, so can anyone help with a solution?

Here is a library that lets you read/write files. It also has methods to read/write spreadsheets cells.
https://github.com/gimite/google-drive-ruby

http://code.google.com/p/gdata-ruby-util/ is the correct library.
I would say it is more "stable" than "no longer active".

Related

Creating contact folders with Outlook REST API?

Is it possible to create contact folders with Outlook REST API? I've looked into the docs for Outlook Contacts API and found only references to fetching existing contact folders (even in the beta version).
Other questions seem to focus on using C# and probably some specific SDK for that. I'm using Python, so that wouldn't work for me. I haven't found, both on StackOverflow and through Google in general, any definitive answers to this question. From the lack of any mentions in the docs, I'd assume it's not possible, but just wanted to get a definitive and/or official answer on that matter, if possible. Also please let me know if I missed something during my research.
Thanks!
There is a create folder operation, although it seems specific to Mail folders and doesn't take any parameters that can specify a folder type. It's possible it may take on the same item type as the parent folder, but I'm not certain.
Otherwise there is a create method specific for Contact folders in the Graph API; see https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/contactfolder_post_childfolders.
If you want a Python specific SDK, see: https://github.com/microsoftgraph/msgraph-sdk-python. Code samples: https://github.com/search?q=python+sample+user:microsoftgraph&type=Repositories
FYI, you can use any code platform to work with the Office 365 or Graph APIs, as long as they support REST.
After reading #Eric Legault's answer it gave me an insight to try something blindly. Even though the docs do not state it, you can create a folder by doing a POST to the contact folders endpoint with DisplayName property in the body.
So do
POST https://outlook.office.com/api/<version>/me/contactfolders with {"DisplayName": "folder_name"} in the request's body and it will work, returning the usual 201 Created response code.
This worked for me in both v2.0 and beta endpoints.
As of this writing, Outlook Contacts' UI (self-entitled Outlook People) is terrible and not user-friendly at all (either that or I just suck at understanding it), so I actually don't know how to create or delete contact folders through it, but I'm glad the REST API does the job :)

Google Drive Api - Document without authorization

I am building an app where two different users will edit the same document online, using only plain text. For this I am using the google-api-php-client-master hosted on github.
There are some examples, but I don't understand what I need to do to achieve my goal. The official documentation is deprecated because it reffers to a library that is not online, and all the classes have different names and ways of working.
I already got my credentials, and know how to get a list of the documents hosted on my drive account. But now I need to:
Create new document
Grant access to a non-google logged in user, just accessing the link
I don't expect anybody to give me a written solution, but to know where I have to start.
Thanks a lot for reading.
Ok im trying to do almost the same thing and this is what i know so far:
Most importantly please reffer to the docomentation: https://developers.google.com/drive/v2/reference
There is a written example on how to create new file!( section files->insert)
One way to make a gdrive file public is to share it to the web via the google api. Another way is to make revision of it( section revision->update) and then publish it( by setting "published" = true in the update request).
Being aware of your requirements i gues that the publishing wont really help you achieving your goal, because it is just a revision of the document from the past and not its current state.

Creating a plagiarism detector using google search appliance api

i wish to design an application that can detect plagiarism ( web based ) in all formats using Google search engine API.
what are the resources that i would be requiring for such an application.
Basically a user can upload a file and that file would be checked against various formats on the web . i have read that there are web crawlers but how exactly do we use them.
Is Google search appliance API the correct approach?
Also I have not used a Google API before so what would be the best way to start?
Thanks a lot
Maybe http://www.google.com/alerts will do? There are libraries with which you can do a single find, for example in Ruby that would be (at the first glance) a galerts gem. In Python a galerts package may help you to manage feeds. Other languages probably have similar libs. After that, parse result feeds by yourself.

Writing a web app using Dropbox API

I would like to write a web app that uses Dropbox for cloud storage.
If I understand correctly, I should use the Restful API to achieve that.
This documentation exists and is quite good but being a newcomer to Restful API I would love to see and play with a simple example that works with this API.
My questions are:
Am I right to assume that Rest API is the way to go?
Is there a quick and easy example (Maybe a live example) to get me going?
Thanks!
as you tagged your question with "ajax", i presume you want to do this entirely client-side (except for some proxy-code to be able to make requests accross domains)? I haven't tried it out myself, but there's dropbox-js on google code which will at least give you some ideas (and if the Dropbox API didn't change too much since June 2010 it might even work out of the box)?
Update: there's no "download", but you can browse the source code of trunk here.
Here's a lengthy article on the matter
Some love for Javascript Applications with code samples, a demo etc.

Ruby access/submit queries on websites

Say I wanted to create a ruby script that would access google, search for 'dogs', and then return the links of the top 5 results. How would this be implemented in ruby?
Thanks.
To clarify, I'm not looking for a way to search Google specifically. I want this to work on other sites too, such as amazon.com, dictionary.com, etc.
See the answer to this question: Using Google Search REST API in Ruby
You could hack through it with hpricot, if a google api doesn't exist already. Or here is a script
I would use cURL to actually GET the page contents (its a simple GET request to google.com/?q=stuff). Then you'll need to use regular expressions and intuition to parse the DOM, extract the links, and display :)

Resources