ballerinax/microsoft.onenote Ballerina library

2.4.0

Overview

Ballerina connector for Microsoft OneNote connects the Microsoft OneNote API through Ballerina. It provides the capability to perform CRUD operations on OneNote notebooks, sections and pages.

This module supports Microsoft Graph API v1.0 version and only allows to perform functions behalf of the currently logged in user.

Prerequisites

Before using this connector in your Ballerina application, complete the following:

Quickstart

To use the MS OneNote connector in your Ballerina application, update the .bal file as follows:

Step 1: Import connector

First, import the ballerinax/microsoft.onenote module as shown below.

Copy
import ballerinax/microsoft.onenote;

Step 2: Create a new connector instance

Create a microsoft.onenote:ConnectionConfig with the OAuth2 tokens obtained and initialize the connector with it.

Copy
microsoft.onenote:ConnectionConfig configuration = {
    auth: {
        refreshUrl: <REFRESH_URL>,
        refreshToken : <REFRESH_TOKEN>,
        clientId : <CLIENT_ID>,
        clientSecret : <CLIENT_SECRET>
    }
};

microsoft.onenote:Client oneNoteClient = check new(configuration);

Step 3: Invoke connector operation

Now you can use the operations available within the connector. Note that they are in the form of remote operations.

Following is an example on how to create a notebook using the connector.

Copy
public function main() returns error? {
    Notebook notebook = check oneNoteClient->createNotebook("test");
}

You can find a list of samples here

Import

import ballerinax/microsoft.onenote;Copy

Metadata

Released date: over 1 year ago

Version: 2.4.0

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 0

Current verison: 0


Weekly downloads


Source repository


Keywords

Content & Files/Notes

Cost/Freemium

Vendor/Microsoft


Contributors

Other versions

See more...