Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching Events by calendar or resource id? #62

Open
Elyx0 opened this issue Sep 19, 2019 · 4 comments
Open

Fetching Events by calendar or resource id? #62

Elyx0 opened this issue Sep 19, 2019 · 4 comments

Comments

@Elyx0
Copy link

Elyx0 commented Sep 19, 2019

https://github.com/timekit-io/js-sdk/blob/master/src/endpoints.js#L329-L340

How to restrict to a project_id or resource id or calendar id?

     timekitEventsResponse = await timekit.getEvents({
                page,
                //  calendar_id: '3f5e3a3e-900d-4ef5-a3f2-u23hid2', // Does nothing
               // project_id: '5cd55254-4762-4b45-b58b-aa6f69e3751', // Same
               //  resource_id: '308040d6-357d-4da8-885e-232hd23d', // Same
                start,
                end,
            });
@Elyx0
Copy link
Author

Elyx0 commented Sep 19, 2019

Update:

timekit.include('calendars.events').getResource({
        id: '308040d6-357d-4da8-885e-5bc735e8a2b0',
    });

Might be a good start point. Can I specify start and end for the events?

@Elyx0
Copy link
Author

Elyx0 commented Sep 19, 2019

I tried

await timekit
                .carry({
                    params: {
                        calendar_id: 'my calendar id',
                    },
                })
                .getEvents({
                    page,
                    start,
                    end,
                });

Nothing

@Elyx0
Copy link
Author

Elyx0 commented Sep 19, 2019

Also

await timekit
        .carry({
            params: {
                start,
                end,
            },
        })
        .include('calendars.events')
        .getResource({
            id: resource_id, // '308040d6-357d-4da8-885e-5bc735e8a2b0',
        });

The events in the calendars returned don't respect the start & end.

@Elyx0
Copy link
Author

Elyx0 commented Sep 20, 2019

Also how do start and end work?
I use

timekit.configure({
    inputTimestampFormat: 'Y-m-d h:ia',

And specify the range 2019-09-20 12:00am 2019-09-24 11:59pm
But I still get event that started the 2019-09-19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant