Code Monkey home page Code Monkey logo

Comments (12)

colinhall17 avatar colinhall17 commented on September 7, 2024

Hi @DRedero

To pass query parameteres you would do $user->recordings->where('from', '2020-11-01') just like a Laravel DB query.

from laravel-zoom.

BioSehnsucht avatar BioSehnsucht commented on September 7, 2024

This does not appear to work? Viewing the call logs via the Zoom app site, I see that from and to are being set to default values of today and tomorrow, whatever those happen to be at a given time, even if I try to set them using ->where(...)

from laravel-zoom.

colinhall17 avatar colinhall17 commented on September 7, 2024

@BioSehnsucht

I'm pretty sure that you need to add both a to and a from date when requesting recordings.

from laravel-zoom.

BioSehnsucht avatar BioSehnsucht commented on September 7, 2024

I have compared command line CURL with both to and to and from, versus trying to use the ->where(...) method in laravel, and compared the resulting calls that show up in the Zoom marketplace log screen, and when I use the where method, the to and from aren't being passed as HTTP GET parameters. Maybe they would work to reduce the set of data if more data than requested was returned, but it doesn't seem to actually affect the request, so I can't get more than the current day's data. I suspect this may impact other things than just recordings, it's just the only thing I've been trying to get.

from laravel-zoom.

BioSehnsucht avatar BioSehnsucht commented on September 7, 2024

I am able to use the Laravel Http client directly to pass the relevant parameters and get results (though I've discovered that it will automatically limit you to returning a single month's worth of results if you try to specify a longer date range, aligned to the to date).

from laravel-zoom.

colinhall17 avatar colinhall17 commented on September 7, 2024

Hi @BioSehnsucht

I have tried passing both to and from into the where clause and it appears to work fine. Below is the output from the Zoom log. I have bolded the important parts and stripped much of the log data. When passing variables in a get request it will place them into the request_params array in the log

$user->recordings()->where('to', '2021-01-25')->where('from', '2021-01-20')->get();

{
"endpoint": "https://api.zoom.us/v2/users/***/recordings",
"method": "GET",
"response": {
"from": "2021-01-20",
"to": "2021-01-25",
},
"request_params": [
"from: 2021-01-20",
"to: 2021-01-25"
],
"http_status": "200"
}

from laravel-zoom.

BioSehnsucht avatar BioSehnsucht commented on September 7, 2024

I tried exactly as you have posted it, and I still am not getting the desired results (I had from and then to, but it doesn't seem to matter).

I'm not sure what could be causing the difference. Currently on laravel 8.26.1 and laravel-zoom 4.1.6

    public function handle()
    {
        $zoom = new \MacsiDigital\Zoom\Support\Entry;
        $account = new \MacsiDigital\Zoom\User($zoom);
        $user = $account->find(...);
        $recordings = $user->recordings()->where('to', '2021-01-25')->where('from', '2021-01-20')->get();
        var_export($recordings);
    }

Ends up with this in the API log:

{
    "endpoint": "https://api.zoom.us/v2/users/.../recordings",
    "response_headers": [
        "Set-Cookie: zm_aid=""; Domain=.zoom.us; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly"
    ],
    "date_time": "2021-02-07 17:14:21",
    "method": "GET",
    "request_body": "N/A",
    "response": {
        "from": "2021-02-06",
        "to": "2021-02-07",
        "page_count": 0,
        "page_size": 0,
        "total_records": 0,
        "next_page_token": "",
        "meetings": [
        ]
    },
    "request_headers": [
        "authorization: ******",
        "connection: close",
        "user-agent: GuzzleHttp/7"
    ],
    "request_params": [
        "page_number: 1",
        "page_size: 300"
    ],
    "http_status": "200"
}

from laravel-zoom.

colinhall17 avatar colinhall17 commented on September 7, 2024

What version of the API are you using?

I'm flat out on client projects at the moment but I hope to spend some time on the package in the coming weeks as there are a few new things I would like to implement

from laravel-zoom.

BioSehnsucht avatar BioSehnsucht commented on September 7, 2024

Sorry for the lack of timely response ... these winter storms been playing havoc with our ability to get anything done here in Texas.

Do you mean laravel / zoom package versions? Or the Zoom API version?

Currently...

$ composer show
...
laravel/framework                  v8.26.1   The Laravel Framework.
...
macsidigital/laravel-api-client    3.3.2     Laravel API Client Builder package
macsidigital/laravel-oauth2-client 1.2.0     Laravel OAuth2 Client
macsidigital/laravel-zoom          4.1.6     Laravel Zoom package

Currently I'm doing the calls to https://api.zoom.us/v2/users/.../recordings myself so I can pass the appropriate to/from fields since I haven't had any luck getting the laravel ->where(...) syntax to work.

from laravel-zoom.

colinhall17 avatar colinhall17 commented on September 7, 2024

I'm quite lost on this one, I just copied and pasted your code into Tinkerwell and replaced with my user and this was the response, showing both from and to being passed.

{ "endpoint": "https://api.zoom.us/v2/users/.../recordings", "response_headers": [ "Set-Cookie: zm_aid=""; Domain=.zoom.us; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly" ], "date_time": "2021-02-26 11:00:51", "method": "GET", "request_body": "N/A", "response": { "from": "2021-01-20", "to": "2021-01-25", "page_count": 0, "page_size": 0, "total_records": 0, "next_page_token": "", "meetings": [ ] }, "request_headers": [ "authorization: ******", "connection: close", "user-agent: GuzzleHttp/7" ], "request_params": [ "from: 2021-01-20", "page_number: 1", "page_size: 30", "to: 2021-01-25" ], "http_status": "200" }

from laravel-zoom.

BioSehnsucht avatar BioSehnsucht commented on September 7, 2024

🤷 Well I've manually implemented that bit and that "works" for us (is good enough), and the project is "done" (requirements met, even if not in most ideal fashion), so I won't be trying to actively debug this further on our end unless you come up with any other ideas to test then I'll give it a try, or things to check I'll look into it... I'm also stumped.

from laravel-zoom.

simonbuehler avatar simonbuehler commented on September 7, 2024

i have the same issue that stuff like

$user->meetings()->where('type', 'scheduled')->get(); // Allowed values scheduled, live and upcoming

doesn't work, no request_params are filled , how can this be debugged?

from laravel-zoom.

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.