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

Add GetInvitedFriends, RemoveInvitedFriend client functions #47

Merged
merged 2 commits into from
Mar 11, 2022
Merged

Add GetInvitedFriends, RemoveInvitedFriend client functions #47

merged 2 commits into from
Mar 11, 2022

Conversation

mooseburgr
Copy link
Contributor

closes #46

@mooseburgr
Copy link
Contributor Author

mooseburgr commented Jan 31, 2022

FWIW, this is working in "prod" against my server v1.25.3.5409, as well as via local ad-hoc tests:
mooseburgr/plex-utils@4d0295d
https://plexy.vercel.app/

I wasn't sure what kind of tests you'd like, so I only added some minimal unit tests vs committing any integration tests. If the OS env variables are expected to work, I can definitely add back my integ test placeholders, let me know of any concerns @jrudio !

@jrudio
Copy link
Owner

jrudio commented Feb 8, 2022

Hey @mooseburgr, thanks for the PR. I looked it over and so far it reads well.

I am going to test manually. As for unit and integration test, I am still trying to figure out best practice for integration testing a client against an API. Any chance you have pointers or know of an example repository that does this?

I feel like if a unit tests passes with example data, but integration fails because PMS changed an endpoint response, why not just stick with an integration test? 😞 Maybe that's a bad thought process

To your question about OS env vars, master branch doesn't utilize those variables, but feature/cloud-build branch

plexHost = os.Getenv("PLEX_HOST")
does, which I plan to work on... soon.

So if you do not want to commit those, that is fine.

@mooseburgr
Copy link
Contributor Author

mooseburgr commented Feb 11, 2022

Ha nope, I totally agree! Mocking out any sort of actual response from the server is pretty useless for client SDK stuff like this, imo. Other than maybe de/serialization testing.

Ugh, I feel like maybe spinning up a disposable / test server via Docker would meet that need, but I have yet to try it. Plus that then requires Docker available on whatever device is running the integ tests, but that's not too terrible. I might play around with it locally at some point and throw something up, but no guarantees.

Otherwise I might poke around what you're doing in the cloud-build branch and see if there's something there I could help with in terms of setting up integ tests. 🤷

update: ah, nvm! I see you were already planning on spinning one up via Docker for integ tests!

@jrudio
Copy link
Owner

jrudio commented Mar 11, 2022

Sorry for the delay, just ran the pr manually and works fine for me.

Going to merge now!

@mooseburgr
Copy link
Contributor Author

oh no problem! just happened to check in and noticed it was behind your master branch

@jrudio jrudio merged commit c211f79 into jrudio:master Mar 11, 2022
@mooseburgr
Copy link
Contributor Author

thank you so much!

@jrudio
Copy link
Owner

jrudio commented Mar 11, 2022 via email

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

Successfully merging this pull request may close these issues.

Add functions to wrap GET, DELETE /api/invites/requested APIs
2 participants