tripit / api

TripIt's API Documentation and Support Forum
http://www.tripit.com/developer
Other
47 stars 16 forks source link

Tripit API usage #212

Closed guillermoST closed 6 years ago

guillermoST commented 6 years ago

Hi guys (and girls),

I have a quick question regarding the use of the API as I didn't really get a response from the tripit support team.

I was looking at apps like "app in the sky" and flighttracker and it seems when you add flights in their apps it's not added to tripit, so my basic understanding would be that they create trips on one of their own accounts and segement it on their end.

If you have a tripit account you can link it, but it's not a requirement.

My question is, is that allowed? The reason is that I would love to implement some of the features the tripit API has to offer but would like to be sure before spending time coding it.

My app has about 125.000 users, using it for travel for airline staff (non-rev). I can't use tripit authentication as we run fully on Firebase/Firestore and use their authentication methods.

We have a trips section planned and would actually like to integrate it with tripit if that is a prerequisite.

garyhooper commented 6 years ago

My app has its users' auth info in Firebase. Additionally, they can optionally link their accounts to TripIt (by entering their TripIt auth info one time), and then I sync all TripIt trip info into my app. In the end, my users can enter their trip info into TripIt, my app, or both. (The TripIt trips happen to be read-only when viewed in my app.) Yes, they end up having two accounts, but only enter credentials once for TripIt. Hope this helps...

guillermoST commented 6 years ago

Hi @garyhooper thanks for the answer, kinda answers it, so we can use it this way if we want.

Also interesting for the flight notifications, by any chance do you do flights lookups? (find flightnumbers between cities) If yes, do you use tripit API for that as I can't seem to find anything on that level in the API.

garyhooper commented 6 years ago

If a TripIt user is a premium user, you can get updates for his flights. In general, I have not found a good solution for all updates. The best that I've seen is flightstats API, depending on how much you have to spend. (I do not use it.) If you find something that works well, I'd love to hear about it.

guillermoST commented 6 years ago

@garyhooper if the company tripit user which is used for adding trips for non tripit registered users is a pro you should be able to get notifications for all those flights you would add under that account if I'm correct?

So basically add all the flights of non-tripit users under the company pro user and redistribute it from our own backend.

Have tried flightstats, crazy expensive... considering we add 2500 flights a day this would cost me about $250 a day.. a bit much for my pet project...

garyhooper commented 6 years ago

Very interesting idea, depending on TripIt account limitations.

guillermoST commented 6 years ago

The issue is that I can't find any limitations and I asked this question to the support email but they said: ask in the developer forum. I might just build it to see what happens.

garyhooper commented 6 years ago

Please let me know! Clearly their system can support 100,000's of trips, but one user?

guillermoST commented 6 years ago

OKay, in theory, it should work, the only issue is that tripit creates the flights under 1 trip on a certain date. I think it would be possible, but it's pushing the limit on the Fair use policy I think..

hliss commented 6 years ago

Hi there, happy to see the discussion from earlier this year! :)

@guillermoST your suspicions are correct. It'd be a circumvention of the application to put all your users' trips into one TripIt Pro account. Your suspicions are also correct that you'll eventually run into performance issues which may prevent you from logging in or completing API requests.

Once plans are in your authorized users' TripIt accounts, you're free to synchronize the data (both read and write). This includes plans they've forwarded themselves to plans@tripit.com (i.e., converted the confirmation email to a structured itinerary!). Do keep in mind -- though clearly you are! -- that offering users services with TripIt data that compete with TripIt Pro would violate our API TOS.

@garyhooper is correct that you'll inherit the data for your users who do have TripIt Pro; you may also wish to check out the Notification API for these users: http://tripit.github.io/api/doc/v1/notification.html.

Hopefully you've found a good happy medium in the meantime!