we can share a file/folder using https://developers.google.com/drive/v2/reference/permissions/insert . But the response ( https://developers.google.com/drive/v2/reference/permissions#resource ) won't contain the link to share the file/folder.
After sharing a file/folder, you can get the link to share the file/folder using https://developers.google.com/drive/v2/reference/files/get. So we need to send one more request to get the link. It will be useful if we get the link in the first request itself.
I just played with Google drive web interface and got the pattern of the link to share a file/folder as given below:
For files: https://docs.google.com/file/d/{file-id}/edit
For folders: https://docs.google.com/folder/d/{folder-id}/edit
It is working fine now.
Is it correct to get the shared file/folder? will it break in future?