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

wip #9

Merged
merged 61 commits into from
Jan 25, 2023
Merged

wip #9

merged 61 commits into from
Jan 25, 2023

Conversation

willus10245
Copy link
Collaborator

No description provided.

tmecklem and others added 30 commits July 10, 2022 00:34
Many of the API calls and web hooks return string keys, and it’s not
always trivial to pass through atomization of keys as an option to Jason
or another library. As a result, practicing a little empathy here in the
struct.
Pipedrive webhook POST requests to the plug. It will process known
events (currently only the updated.deal event type, but more to come), 
And publish events via Registry.LineDriveEvents. 

See LineDrive.Incoming.Handler for more information.
add typed struct library to reduce typing boiler plate
only enforce status and type on activity
add handling of find user endpoint
@@ -0,0 +1,98 @@
# Pipedrive OAuth
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to commit this with all the ids and keys and stuff? I would have expected this to use livebook secrets and System.get_env("LB_PIPEDRIVE_CLIENT_ID"), for example, if the lived is useful to help people know how to use it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops. i did not mean to commit this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops. i did not mean to alter the entire git history.

@@ -34,6 +34,25 @@ defmodule LineDrive do
Tesla.client(middleware)
end

def build_client(refresh_token, client_id, client_secret, base_url) do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the other function that uses an api key be updated to the same name or stay separate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open to other ways of doing it, but it feels like a sufficiently different thing. client only ever returns a client struct, where build_client is doing more stuff that can fail, and returns a tuple.

@willus10245
Copy link
Collaborator Author

add oauth client

@willus10245 willus10245 merged commit af9af88 into main Jan 25, 2023
@willus10245 willus10245 deleted the oauth branch January 25, 2023 16:05
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.

3 participants