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

Set up gh for GraphQL calls to meetup.com #125

Merged
merged 5 commits into from
Dec 28, 2021
Merged

Conversation

schloerke
Copy link
Collaborator

@schloerke schloerke commented Dec 28, 2021

Uses {gh::gh()} under the hood, not {httr::POST()}.

Queries are run through {glue::glue_data(list(extra_graphql=extra_graphql), query)} to add fields not originally in the query.

Ex:

❯❯ regular <- gql_single_event(urlname = "Data-Science-DC")

❯❯ bigger <- gql_single_event(urlname = "Data-Science-DC", extra_graphql = "host { name }")

❯❯ length(regular)
[1] 127
❯❯ str(regular[[127]])
List of 10
 $ id         : chr "281553470!chp"
 $ title      : chr "Apache Iceberg - An Architectural Look Under the Covers"
 $ eventUrl   : chr "https://www.meetup.com/Data-Science-DC/events/281553470"
 $ dateTime   : chr "2021-11-09T18:00-05:00"
 $ createdAt  : NULL
 $ going      : int 89
 $ waiting    : int 0
 $ venue      :List of 6
  ..$ name      : chr "Online event"
  ..$ address   : chr ""
  ..$ city      : chr ""
  ..$ state     : chr ""
  ..$ postalCode: chr ""
  ..$ country   : chr ""
 $ description: chr "Data Lakes were built with a desire to democratize data - to allow more and more people, tools, and application"| __truncated__
 $ type       : chr "past"
❯❯ str(bigger[[127]])
List of 11
 $ id         : chr "281553470!chp"
 $ title      : chr "Apache Iceberg - An Architectural Look Under the Covers"
 $ eventUrl   : chr "https://www.meetup.com/Data-Science-DC/events/281553470"
 $ dateTime   : chr "2021-11-09T18:00-05:00"
 $ createdAt  : NULL
 $ going      : int 89
 $ waiting    : int 0
 $ venue      :List of 6
  ..$ name      : chr "Online event"
  ..$ address   : chr ""
  ..$ city      : chr ""
  ..$ state     : chr ""
  ..$ postalCode: chr ""
  ..$ country   : chr ""
 $ description: chr "Data Lakes were built with a desire to democratize data - to allow more and more people, tools, and application"| __truncated__
 $ host       :List of 1
  ..$ name: chr "Tommy Jones"
 $ type       : chr "past"

@schloerke schloerke mentioned this pull request Dec 28, 2021
19 tasks
@schloerke schloerke merged commit fc7e4c9 into barret Dec 28, 2021
@schloerke schloerke deleted the integrate_graphql branch December 28, 2021 21:02
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.

1 participant