Google Drive API - using Google.Apis.Authenticatio

2019-03-04 12:04发布

I am trying to make use of the Google Drive API and looking at the example located here - https://developers.google.com/drive/v2/reference/files/get.

To get the example to work I need to include the following: using Google.Apis.Authentication;

Has anyone used this dll I cant seem to locate it where to download it from?

I have managed to find the Google.Apis.Drive.v2 dll easily.

2条回答
beautiful°
2楼-- · 2019-03-04 12:44

I found this here: https://code.google.com/p/google-api-dotnet-client/source/browse/Src/GoogleApis/Apis/Authentication/IAuthenticator.cs?r=e6585033994bfb3a24d4c140db834cb14b9738b2

namespace Google.Apis.Authentication
{
    /// <summary>
    /// Classes that implement this interface will know how 
    /// a WebRequest with the approreate authentication embed in the request.
    /// </summary>
    [Obsolete("IAuthenticator is not supported any more and it's going to be removed in 1.7.0-beta. " +
            "Consider using UserCredential or ServiceAccountCredential from the new Google.Apis.Auth NuGet package " +
            "which supports .NET 4, .NET for Windows, Store apps, Windows Phone 7.5 and 8 and Portable Class " +
            "Libraries as well")]
    public interface IAuthenticator
    {
        /// <summary>
        /// Takes an existing httpwebrequest and modifies its headers according to 
        /// the authentication system used.
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        void ApplyAuthenticationToRequest(HttpWebRequest request);
    }
}
查看更多
手持菜刀,她持情操
3楼-- · 2019-03-04 12:49

That is part of the Google APIs Client Library for .NET, you can get the dlls you need from the Downloads page:

http://code.google.com/p/google-api-dotnet-client/wiki/Downloads

查看更多
登录 后发表回答