GithubHelp home page GithubHelp logo

993544899 / onedrive-sdk-csharp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thomaslevesque/onedrive-sdk-csharp

0.0 1.0 0.0 513 KB

OneDrive SDK for C#! https://dev.onedrive.com

License: Other

C# 100.00%

onedrive-sdk-csharp's Introduction

OneDrive SDK for CSharp

Build status

Integrate the OneDrive API into your C# project!

The OneDrive SDK is built as a Portable Class Library and targets the following frameworks:

  • .NET 4.5.1
  • .NET for Windows Store apps
  • Windows Phone 8.1 and higher

Installation via Nuget

To install the OneDrive SDK via NuGet

  • Search for Microsoft.OneDriveSDK in the NuGet Library, or
  • Type Install-Package Microsoft.OneDriveSDK into the Package Manager Console.

Getting started

1. Register your application

Register your application for OneDrive by following these steps.

2. Setting your application Id and scopes

Your app must requests permissions in order to access a user's OneDrive. To do this, specify your app ID and scopes, or permission level. For more information, see Authentication scopes.

3. Getting an authenticated OneDriveClient object

The OneDriveClient object will handle authentication for you. You must get a OneDriveClient object in order for your app to make requests to the service. For more information, see Authenticate your C# app for OneDrive.

4. Making requests to the service

Once you have a OneDriveClient that is authenticated you can begin to make calls against the service. The requests against the service look like OneDrive's REST API.

To retrieve a user's drive:

    var drive = await oneDriveClient
                          .Drive
                          .Request()
                          .GetAsync();

GetAsync will return a Drive object on success and throw a OneDriveException on error.

To get the current user's root folder of their drive:

    var rootItem = await oneDriveClient
                             .Drive
                             .Root
                             .Request()
                             .GetAsync();

GetAsync will return an Item object on success and throw a OneDriveException on error.

For a general overview of how the SDK is designed, see overview.

The following sample applications are also available:

To run the OneDrivePhotoBrowser sample app your machine will need to be configured for UWP app development and the project must be associated with the Windows Store.

Documentation and resources

Issues

To view or log issues, see issues.

Other resources

License

License

onedrive-sdk-csharp's People

Contributors

ginach avatar mimisasouvanh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.