Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Latest commit

 

History

History
59 lines (40 loc) · 1.57 KB

README.md

File metadata and controls

59 lines (40 loc) · 1.57 KB

CopyRestAPI

CopyRestAPI is a C# client for the Copy cloud storage service through its RESTful API.

About

CopyRestAPI is a C# client for the Copy cloud storage service through its RESTful API.

CopyRestAPI aims towards being the most comprehensive implementation for the Copy REST API in .Net/C#.

Features

  • Full Async support
  • Full implementation of the API:
    • Support for OAuth Handshare
    • Support for User Profile methods
    • Support for Filesystem methods
    • Support for Links methods

Contact

You can contact me on twitter @saguiitay.

NuGet

CopyRestAPI is available as a NuGet package

Release Notes

  • 1.0.0 Initial release.

Usage

var client = new CopyClient(
    new Config
        {
            CallbackUrl = "https://www.yourapp.com/Copy",
            ConsumerKey = ConsumerKey,
            ConsumerSecret = ConsumerSecret,

            //Token = Token,
            //TokenSecret = TokenSecret
        });

// Perform authorization (alternatively, provide a Token and TokenSecret in the Config object passed to CopyClient
await Authorize(client);

// Retrieve information on the logged-in user
var user = await client.UserManager.GetUserAsync();

// Retrieve the root folder of the logged-in user
var rootFolder = await client.GetRootFolder();

foreach (var child in rootFolder.Children)
{
    var childInfo = await client.FileSystemManager.GetFileSystemInformationAsync(child.Id);
}