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 _some_ Behavioural Cohort methods to AmplitudeAPI #61

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

asibs
Copy link

@asibs asibs commented Nov 14, 2022

https://www.docs.developers.amplitude.com/analytics/apis/behavioral-cohorts-api/

Adds 3x new methods to AmplitudeAPI:

  • get_cohorts - gets all Behavioural Cohorts, returns the data in the Faraday response object - a basic example of using this API and parsing the response has been added to the README
  • add_to_cohort - adds a list of users to a specific Behavioural Cohort
  • remove_from_cohort - removes a list of users from a specific Behavioural Cohort

Other changes

  • Factored out the call to get a connection with basic auth to a private helper, so it can be re-used in the new Behavioural Cohort methods
  • Added a bin/console script to make it slightly easier to manually run the gem code in an IRB session

@AlvaroMaceda
Copy link
Collaborator

Great, @asibs, thank you very much for your contribution.
Could you add some specs for the new API? It will be great to have all the functionality covered.

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