npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nativescript-office365

v0.1.1

Published

Office 365 Graph API plugin for NativeScript.

Downloads

15

Readme

Office 365 Graph API plugin for NativeScript

Manage Office 365 Users, Groups, Mail, Calendars, Contacts, Files, Tasks, People, Notes and more — all from a single endpoint

Note: iOS only, for now

Features

For readability the supported features have been moved to their own README's:

Prerequisites

You should have an Office 365 Account admin account. If you don't have one yet, you can get a free trial here.

Register your mobile app here. This will require you to login with your Office 365 account. You can then click the big "Add an app" button and go through the steps listed there, starting with giving you app a name. On the app creation screen, you need to do 3 things:

  1. Click the "Add Platform" button and select "Mobile application"
  2. Copy the "Client Id" GUID from the Mobile Application section.
  3. Click "Save" at the bottom.

Setup

Add TypeScript to your NativeScript project if you don't already have it added. While this is not a requirement, it's highly recommended. If you want to watch a video on how to convert your existing JavaScript based NativeScript app to TypeScript, watch it here.

From the command prompt go to your app's root folder and execute:

tns plugin add nativescript-office365

Then open references.d.ts in the root of your project and add this line to get autocompletion and type-checking for this plugin:

/// <reference path="./node_modules/nativescript-office365/office365.d.ts" />

Usage

If you want a quickstart, get the demo app here.

Start-up wiring

We need to do some wiring when your app starts, so open app.ts and add this before application.start();:

TypeScript
import * as o365 from 'nativescript-office365';

var o365InitOptions : o365.InitOptions = {
    clientId: '<enter GUID here>', //client id for application (GUID)
    scopes: ['Files.ReadWrite']
};
o365.init(o365InitOptions);

Note 1: Enter the client id GUID value that was generated for you when you registered your app in the Prerequisites section.

Note 2: The scope listed above gives your NativeScript app SharePoint (OneDrive) file read/write permissions. Add/replace with other scope strings to give your app permissions to do other activities. More scopes are listed here

Future work

  • Add Android support
  • Add support for automatic auth token refresh for REST
  • Expose MS Graph Client to consumer

Credits

The starting point for this plugin was the NativeScript Plugin Seed by Nathan Walker. The MS Graph Client iOS version wouldn't have worked without the iOS ninja expertise of Jason Zhekov