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

Support more API query parameters in find_groups() #21

Open
missaugustina opened this issue Feb 12, 2018 · 3 comments
Open

Support more API query parameters in find_groups() #21

missaugustina opened this issue Feb 12, 2018 · 3 comments

Comments

@missaugustina
Copy link
Member

missaugustina commented Feb 12, 2018

To find R-Ladies meetups that aren't using the topic, I do a text search and limit to a category and then apply a regex to the result. We should support category as a parameter.

(TODO: make a reprex)

groups_url <- "https://api.meetup.com/find/groups"

  groups_query_params <- list(
    key=params$meetup_api_key, 
    sign=TRUE,
    page=200,
    radius="global")
  
  # by topic
  meetup_groups_topic <- get_meetups(groups_url, append(groups_query_params, c(topic_id=1513883, order="members")))
  
  # by text + category
  meetup_groups_text <- get_meetups(groups_url, append(groups_query_params, c(text="r-ladies", category=34)))
  
  meetup_groups_aggr <- bind_rows(meetup_groups_topic, meetup_groups_text %>% anti_join(meetup_groups_topic, by="id"))
  meetup_groups <- meetup_groups_aggr %>% filter(str_detect(name, "[Rr]([ -]?)[Ll]adies"))`

Design question - do we want to explicitly support parameters or do we want to consider dynamic arguments?

@ledell
Copy link
Member

ledell commented Feb 19, 2018

So far, we've explicitly added the arguments, but if it makes sense to group new ones together, we could do that. Lists are nice because you never really have to change the function API (new args just go inside the list) however it's much harder to document the options when they are named list elements list instead of explicit args.

@missaugustina
Copy link
Member Author

Yeah I'm on the fence myself. I like having explicit support and documentation but then we're really just supposed to be an interface for them. I'll stick with the current paradigm for now.

@maelle
Copy link
Contributor

maelle commented Mar 22, 2021

More generally I suppose one could support all documented parameters https://www.meetup.com/fr-FR/meetup_api/docs/find/groups/?uri=%2Fmeetup_api%2Fdocs%2Ffind%2Fgroups%2F

@maelle maelle changed the title Support category in find_groups() Support more API query parameters in find_groups() Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants