Git Product home page Git Product logo

power-bi-embedded's Introduction

PowerBiEmbedded

Gem to consume Microsoft's PowerBiEmbedded RESTfull API.

The purpose of the methods is to generate tokens for the Power Bi Embedded JS LIB (https://github.com/Microsoft/PowerBI-JavaScript)

Features

  • Authenticate on Microsoft
  • List Groups
  • List and Get Dashboards
  • List and Get Tiles
  • List and Get Reports
  • Embed Reports
  • Embed Dashboards
  • Embed Tiles

Installation

Add this line to your application's Gemfile:

gem 'power_bi_embedded'

And then execute:

$ bundle

Or install it yourself as:

$ gem install power_bi_embedded

Usage

Authenticate

PowerBiEmbedded::Authenticate.new(username: POWERBI_USERNAME, password: POWERBI_PASSWORD, refresh_token: REFRESH_TOKEN, client_id: CLIENT_ID, grant_type: GRANT_TYPE).call

List Groups

PowerBiEmbedded::Groups.list(access_token: AUTH_ACCESS_TOKEN)

List Dashboards

PowerBiEmbedded::Dashboards.list(group_id: GROUP_ID, access_token: AUTH_ACCESS_TOKEN)

Get Dashboard

PowerBiEmbedded::Dashboards.get(group_id: GROUP_ID, dashboard_id: DASHBOARD_ID, access_token: AUTH_ACCESS_TOKEN)

List Tiles

PowerBiEmbedded::Tiles.list(group_id: GROUP_ID, dashboard_id: DASHBOARD_ID, access_token: AUTH_ACCESS_TOKEN)

Get Tile

PowerBiEmbedded::Tiles.get(group_id: GROUP_ID, dashboard_id: DASHBOARD_ID, tile_id: TILE_ID, access_token: AUTH_ACCESS_TOKEN)

List Reports

PowerBiEmbedded::Reports.list(group_id: GROUP_ID, access_token: AUTH_ACCESS_TOKEN)

Get Report

PowerBiEmbedded::Reports.get(group_id: GROUP_ID, report_id: REPORT_ID, access_token: AUTH_ACCESS_TOKEN)

Embed Resource

[DOC] (https://docs.microsoft.com/pt-br/rest/api/power-bi/embedtoken)

OBS: "resource" can be "report", "dashboard" or "tile"

PowerBiEmbedded::EmbedToken.new(access_token: AUTH_ACCESS_TOKEN, group_id: GROUP_ID, resource: RESOURCE_NAME, resource_id: RESOURCE_ID, tile_id: TILE_ID, dataset_id: DATASET_ID, access_level: ACCESS_LEVEL, identities: IDENTITIES, allow_save_as: ALLOW_SAVE_AS).call

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/power_bi_embedded.

power-bi-embedded's People

Contributors

dayves avatar henriqjanuario avatar

Watchers

James Cloos avatar

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.