Giter VIP home page Giter VIP logo

mgwdev-m365-helpers's People

Contributors

mgwojciech avatar mgwojciechavenga avatar p333ter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mgwdev-m365-helpers's Issues

Readme details I noticed while having a first try

1๏ธโƒฃ of all

Good job ๐Ÿ’ช I only had a really quick overview on this with a simple spfx webpart but it seems to work pretty sweet ๐Ÿ‘. You rock ๐Ÿคฉ.

Potential ๐Ÿชฒs I found in readme

in the GraphODataPagedDataProvider example

let spfxGraphClient = this.context.aadHttpClientFactory.getClient('https://graph.microsoft.com');

let client = new BatchGraphClient(new SPFxGraphHttpClient(spfxGraphClient));
let pagedProvider = new GraphODataPagedDataProvider<any>(batchClient, "https://graph.microsoft.com/v1.0/users");
pagedProvider.pageSize = 10;

let users = await pagedProvider.getData();
let allUsers = pagedProvider.allItemsCount;
if(pagedProvider.isNextPageAvailable()){
    let nextPage = await pagedProvider.getNextPage();
}
if(pagedProvider.isPreviousPageAvailable()){
    let previousPage = await pagedProvider.getPreviousPage();
}

I think it should be let batchClient = new BatchGraphClient(new SPFxGraphHttpClient(spfxGraphClient)); right ๐Ÿค”?

in the spfx example

let spfxGraphClient = this.context.aadHttpClientFactory.getClient('https://graph.microsoft.com');

let client = new BatchGraphClient(new SPFxGraphHttpClient(spfxGraphClient));

let [me, photo, presence] = await Promise.all([
    client.get("https://graph.microsoft.com/v1.0/me"),
    client.get("https://graph.microsoft.com/v1.0/me/presence"),
    client.get("https://graph.microsoft.com/v1.0/me/photo/$value")
])

If I am not mistaking the aadHttpClientFactory.getClient() returns a Promise<AadHttpClient> so I think we should await it like
let spfxGraphClient = await this.context.aadHttpClientFactory.getClient('https://graph.microsoft.com');

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.