0.0
No commit activity in last 3 years
No release in over 3 years
Simple Microsoft Graph client gem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

MSGraph::Client

Gem Version Ruby

A simple client library for Microsoft Graph.

Installation

Add this line to your application's Gemfile:

gem 'msgraph-client'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install msgraph-client

Getting started

To call Graph API using this library, you need an access token. A choice for aquiring the access token is MSIDP::Endpoint.

Usage example

require 'msgraph/client'

client = MSGraph::Client.new

# Aquire an access token and set it to `token`

endpoint = "/v1.0/users?$filter=startswith(givenName, 'J')&$top=5"
# For paging
while endpoint
  response = client.request(:get, endpoint, token)
  response[:value].each do |user|
    # do something
  end
  # Next page
  endpoint = response[MSGraph::NEXT_LINK_KEY]
end

API Reference

RubyDoc.info

License

The gem is available as open source under the terms of the MIT License.