Google Drive API - how many times a file has been downloaded? - google-api

I have been trying hard to find any information on how to see how many times a file in Google Drive has been downloaded. I have tried looking into Drive API, Google Activity API and a number of forums, but I can only find info about how to download a file, nowhere about download stats, i.e. number of downloads.
Any suggestions or hints will be greatly appreciated.
Thanks.

You can't.
But you can use Google URL Shortener and cut short the original link of this file then give the link to your friends; after this you will be able to see how many clicks are clicked at that link. You can also view any other details you need like Countries, Referrers, Browsers, Platforms and more!

At this time (2015-11-07), I don't think there's any way to do this via any Google API. Google's server logs would let you answer this, but I don't believe you can get access to them.

Related

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.

Download all messages from a Google group

I'm in the process of developing a Google apps migration/archive system and at this point in development I'm trying to come up with a way to download all messages in all the groups that my domain users have created. I know that I can set up forwarding filters and have all messages archived to an email, but this doesn't help with older messages.
Is there a way to download these messages from a Google group and if so, is there away in the admin API to get a list of all groups that users have created?
If you don't mind using #bash, you may try a tool I wrote
https://github.com/icy/google-group-crawler
It can download all mbox files from Google Group. If you have a cookie file, you can even download all files from a private Google Group, and/or to see all original emails. It can also read rss feeds and fetch the latest posts ; and this is useful for daily mirror.
An example result is here http://l.archlinuxvn.org/archlinuxvn/. MHonArch is used to convert mbox files into HTML format.
Ultimately I ended up using the gdata python library to get a list of all groups along with their respective URLs. From there I used selenium to scrape the groups for messages and all replies. Probably not the best solution but it works for what I need.
I made a simple scrap utility by using selenium and htmlunit..
you can use it.. it is not very optimized and can help you download messages of small groups only(up-to 7000 msgs)
https://github.com/himukr/google-grp-scraper

Searching for users/images using MySpace API

Anyone have an idea about searching for users/images in MySpace using their corresponding APIs ? From the site they told that by using their API allows you to search for people, videos, images, music.But is it possible now?
it think these wiki might help you
http://wiki.developer.myspace.com/index.php?title=Albums_MySpace_v1
it shows how to fetch user images.cheers !!!

Google Chrome Malware Warning when including images from image search API

I'm using Google and Bing image search APIs to provide a way for users of my web app to search for images to include in the documents they create in the app. A (rare?) problem I encountered today: a result from either Bing or Google (I'm going to assume Bing) caused the Google Chrome Malware detector to go off.
Is there any good way to avoid this that I'm not aware of, aside from only using the Google Image API (which is being deprecated!) since I assume they filter out results from sites they think contain malware?
There doesn't seem to be any performant way on my end to check these results before displaying them to prevent this error from occurring, and I'm very worried that any less savvy computer users will think my site is at fault (not to mention being unable to make the warning go away).
I guess I'm also making the assumption here that images from random Internet sites are okay to include in the page as long as they are returned by these APIs...I do copy them over to our own S3 account a few minutes after they are added to the document in case they are changed/removed on the external site...
EDIT: The result is indeed being included from the Bing API, and it is from thefatlossauthority.com.
I would prefer a solution based in Ruby, but given a general solution I'm more than willing to implement it myself.

Is it possible to generate notifications when new docs are uploaded to Google Docs?

I have shared a Google Docs folder with our remote team and a few members of my team. Is it possible to send out emails to all collaborators/viewers when a document is uploaded or edited in the folder?
Otherwise it becomes difficult to keep track of whether anything was changed or not.
Thanks.
Yes! Check out the Google Documents List Data API. Basically, you post a signed request to the API requesting specific documents or a list of documents overall and Google responds with an Atom feed of the documents that you're looking for. Among the tags is <updated>, which contains the timestamp of the last modification. If you keep a local listing of files handy, you can compare to see if any revisions were made.
Also interesting in the feed is <published>, which describes when a doc was created. If you know the last time you checked for updates, any docs published after that time can be considered newly created.
I'm not going to get into code (doesn't sound like what you're asking for), but this should get you on the right track. Hope it helps!
Yes and no.
Google Docs is not a consistent set of tools, so notifications are supported but only partially.
Google Spreadsheet has a set notification rules in the Tools menu
Google Form is linked to spreadsheet so they're covered too
You would have to do something yourself for Document/Word and Presentation apps
I would suggest reading the document from web and checking if the checksum was changed

Resources