Giter VIP home page Giter VIP logo

slides-api's Introduction

Google Slides API Codelab

In this codelab, you’ll learn how you can use Google Slides API as a custom presentation tool for an analysis of the most common software licenses. You’ll be querying all open source code on GitHub using BigQuery and creating a slide deck using Google Slides API to present your results. The sample application is built using Node.js, but the same basic principles are applicable to any architecture.

Getting Started

Go to the Slides Codelab to get started.

slides-api's People

Contributors

googleworkspace-bot avatar grant avatar tsaomao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slides-api's Issues

bug in storeToken()

in auth.js:

If the TOKEN_DIR exists, the error will always be thrown and the token will never be stored.

function storeToken(token) {
  try {
    fs.mkdirSync(TOKEN_DIR);
    fs.writeFileSync(TOKEN_PATH, JSON.stringify(token));
  } catch (err) {
    if (err.code != 'EEXIST') return err;
  }
  console.log('Token stored to ' + TOKEN_PATH);
}

Should be:

function storeToken(token) {
    try {
        fs.mkdirSync(TOKEN_DIR);
    } catch (err) {
        if (err.code != 'EEXIST') return err;
    }
    try {
        fs.writeFileSync(TOKEN_PATH, JSON.stringify(token));
    } catch (err) {
        return err;
    }
    console.log('Token stored to ' + TOKEN_PATH);
}

Schrodinger's URL

Google slides api returns a response from the slides.presentations.get endpoint that, if there is an image in the slide, contains image metadata in the pageElements object"

{
    contentUrl: 'https://lh5.googleusercontent.com/8///LONG HASH///',
    imageProperties: {
      outline: {
        outlineFill: [Object],
        weight: [Object],
        dashStyle: 'SOLID',
        propertyState: 'NOT_RENDERED'
      },
      shadow: {
        type: 'OUTER',
        transform: [Object],
        alignment: 'BOTTOM_LEFT',
        blurRadius: [Object],
        color: [Object],
        alpha: 1,
        rotateWithShape: false,
        propertyState: 'NOT_RENDERED'
      }
    }
  }

In my project I am polling for slide changes since that data isn't available. The problem is that every time you git the endpoint, slides api returns a Different URL for the image used in the slide. why on earth would this be the case? It also does not invalidate the prior url, so every time we call the api we generate new duplicate urls. is

Error when you open slides

I'm getting an error when I run the project on Step 8:

  • Start generating slides. --
    loaded secrets...
    authorizing...
    getting new auth token...

Enter the code from that page here: events.js:183
throw er; // Unhandled 'error' event
^

Error: spawn xdg-open ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

(I think this has to do with how I created an OAuth2 Client (Step 5). I have a similar issue at that point in my SPL - I was looking at the codelab to see if you guys had the fix.)

[SyncRepoSettings bot] - Invalid config file

Failed to validate the config schema at '.github/sync-repo-settings.yaml': [
{
"instancePath": "/permissionRules/1/permission",
"schemaPath": "#/properties/permissionRules/items/properties/permission/enum",
"keyword": "enum",
"params": {
"allowedValues": [
"pull",
"push",
"admin"
]
},
"message": "must be equal to one of the allowed values"
}
]

Schema can be found at https://github.com/googleapis/repo-automation-bots/blob/main/packages/sync-repo-settings/src/schema.json

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.