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

Adds Threadless Affiliation. #8

Open
wants to merge 1 commit into
base: ap-sd/refactor-affiliate
Choose a base branch
from

Conversation

alanpeabody
Copy link
Contributor

At least a basic implementation of threadless affiliation based on the
premise that the clickid is standard across links for ello.

At least a basic implementation of threadless affiliation based on the
premise that the `clickid` is standard across links for ello.
@alanpeabody
Copy link
Contributor Author

NOTE: This makes a bunch of uneducated guesses around how link affiliation on threadless works.

@ello_fake_threadless_affiliate "xrGWivQiB3WN3lVUxIzErxGGUkkz3ESwEVOtXE0"

# Don't re-affiliate links something further up the chain got
def affiliate(%Link{is_affiliated: true} = link, _conn), do: link
Copy link

Choose a reason for hiding this comment

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

@alanpeabody question for you - how are the pattern match options evaluated in Elixir? Is it order-of-declaration, or most-specific-to-least-specific, or something different?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Order of declaration (Top to bottom), first match is used.

Copy link

Choose a reason for hiding this comment

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

👍

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.

2 participants