Ruby library for accessing Microsoft Dynamics 365 and 2016 via the Microsoft Web API.
Add this line to your application's Gemfile:
gem 'msdynamics'
And then execute:
$ bundle
Or install it yourself as:
$ gem install msdynamics
To obtain the initial access and refresh tokens you can use OmniAuth in combination with OmniAuth Azure
client = MSDynamics.new({
hostname: "https://test.crm3.dynamics.com",
access_token: "djhksjdhu3ye83y",
refresh_token: "djhksjdhu3ye83y",
client_id: "absjkdh3ewrwr",
client_secret: "djskdhak82u3kjhk"
})
Entity types are: accounts
, contacts
, leads
and opportunities
accounts = client.get_entity_records('accounts')
contacts = client.get_entity_records('contacts')
leads = client.get_entity_records('leads')
opportunities = client.get_entity_records('opportunities')
Modifying or creating entity records is currently not supported by this library. Pull or feature requests are welcome!
new_token_object = client.refresh_token
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request