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

Is it possbile for the integration app to receive the notification from the tripit? #277

Open
ryzhang opened this issue May 30, 2022 · 6 comments

Comments

@ryzhang
Copy link

ryzhang commented May 30, 2022

I have developed an app that TripIt users can authorize to read the itinerary data from the TripIt. I want to know if it's possible for the app to receive the notification when any unfiled item is created under the user's account. If this notification function exists, is there any detailed documentation or tutorial for it? thanks

Best Regards
Yan

@julsat
Copy link

julsat commented May 31, 2022

Hi Yan,
you can find notification api documentation here: https://tripit.github.io/api/doc/v1/notification.html

-Julia

@ryzhang
Copy link
Author

ryzhang commented Jun 1, 2022

Thanks, but it seems the current notification can only notify the change of the trip object.

type - The type of the object that was changed. Currently, this is always "trip". In the future additional types may be available, so this parameter should be checked.

But I expect to monitor the creation of unfiled items so that I can make take action on it. Do you know if it's supported?

@julsat
Copy link

julsat commented Jun 2, 2022

Notification on unfiled items alone is not supported. You can track an unfiled item when a trip gets created out of it or a trip item moves into an unfiled item.

@ryzhang
Copy link
Author

ryzhang commented Jun 2, 2022

thanks, Julia. That's not exactly what I want. I want to receive the notification once the unfiled item is created, and then my app knows it can fetch new unfiled items from the TripIt platform, parse them again using its own logic and generate the expected travel objects. This is mainly for supporting some cases that TripIt cannot handle yet. Anyway, thanks for your information.

I have another question regards the unfiled item if you don't mind I ask it directly in this thread.

When I fetch the unfiled item, usually It returns a list of NoteObjects and each NoteObject contains the property "relative_url". like below

 {
            "id": "3706028873",
            "relative_url": "/trip_item/show/id/3706028873",
            "display_name": "转发: 机票确认单",
            "is_display_name_auto_generated": "false",
            "last_modified": "1654064441",
            "text": "XXXXXXXXXXXXXXXXXXX"
    }

But when I access the corresponding "relative_url" (https://api.tripit.com/trip_item/show/id/3706028873), It returns the response 404 "Page Not found". Could you let me know how I suppose to access this relative_url?

@julsat
Copy link

julsat commented Jun 2, 2022

you can use this relative url to access your item in webapp. in your case, https://www.tripit.com/trip_item/show/id/3706028873 should display details of your unfiled item.

@ryzhang
Copy link
Author

ryzhang commented Jun 3, 2022

thanks. Julia.

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

2 participants