Coder Social home page Coder Social logo

Get Zoom Room Locations. about pszoom HOT 8 CLOSED

josephmcevoy avatar josephmcevoy commented on July 18, 2024
Get Zoom Room Locations.

from pszoom.

Comments (8)

DamagedDingo avatar DamagedDingo commented on July 18, 2024

What that looks like as a script.
https://pastebin.com/5rVDM8KL

Simplified the script but I still have same problem where getting the Hierarchy slows the script down as I have to filter locations each loop.

from pszoom.

JosephMcEvoy avatar JosephMcEvoy commented on July 18, 2024

Are these two API calls relevant to what you're trying to do?
https://marketplace.zoom.us/docs/api-reference/zoom-api/rooms-location/getzrlocationprofile
https://marketplace.zoom.us/docs/api-reference/zoom-api/rooms-location/getzrlocationstructure

from pszoom.

DamagedDingo avatar DamagedDingo commented on July 18, 2024

Sort of.. the first one is providing a single location ID (floor) which is what I'm using to start the crawl upwards from, and the other returns the actual org structure (what would be seen in the portal to browse through). I guess that means that you could change them I.e change floor to level etc.. so that would have to be taken into consideration as well (which I didn't do above). Easy enough though, just do the second call (second link you provided) first and use the object returned for the names of structures ($structures[0] for country or whatever people called theirs etc)

I was unable to find anything to give full path/location in single request.

I can handle this in the script of cause but I feel it should be in the module as it's an important piece of information for maintenance (at least for us and I assume anyone else with a lot of rooms)

In my script I use almost all the zoom room calls and put them in a single object so that I can pass it to our CMDB. Location allows me to assign the Room to a local support group and allows service desk to know where a room is located to route tickets..

I actually had plans to take a look again today to determine if a function should be added that doesn't directly match an API call from zoom. Something like Get-AllAvalibleZoomRoomInfo.
Again, it can be handled in the script but it sure would make people's lives easier to have it contained within this module, especially as my other module (Insight/CMDB) will use PSzoom as a example on how to build the Structure and import Assets and Business Services. 😁

from pszoom.

JosephMcEvoy avatar JosephMcEvoy commented on July 18, 2024

I think there could be some limited exceptions for adding cmdlets that don't necessarily wrap existing Zoom API calls. Some cmdlets already go above and beyond, like get-zoomuser's '-all' switch which runs get-zoomuser recursively, making multiple API calls in one cmdlet. This isn't too different imo.

from pszoom.

DamagedDingo avatar DamagedDingo commented on July 18, 2024

Ok that sound good.
Let me see if I can wrap it up to something small and not too intensive and I'll push it to you for review because I'm not that efficient with my code so it will be functional but I'm sure will need to be simplified.

from pszoom.

DamagedDingo avatar DamagedDingo commented on July 18, 2024

Do you want to check my fork?
I have added a few more functions and I have a script in Get-ZoomRoomsAggregated.ps1 (which will need to be turned in to a functions later).

My problem is that I need to pull info from multiple sources. Is it better to reference existing functions as I have in the script or to put a copy of the required functions inside this one?

Also, not sure what to do about using another module. I'm using Join-Object because its simple but maybe we will want to do that natively?

The output in $Obj is good, it contains everything that's required to get a actual overview of a zoom room.

from pszoom.

JosephMcEvoy avatar JosephMcEvoy commented on July 18, 2024

Hi,

Apologies for taking a bit to get back to you.

It is best practice to not repeat yourself (DRY). So it would be best to reference other functions from other scripts. When referencing a function that isn't a PSZoom function (such as get-jwt), put it in the Private functions folder, then import it.

I don't want to have any other dependencies if it can be helped. Is there another way to not use Join-Object?

from pszoom.

JosephMcEvoy avatar JosephMcEvoy commented on July 18, 2024

Also if you could use a pull request for this, it is easier to view code.

from pszoom.

Related Issues (20)

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.