-
Notifications
You must be signed in to change notification settings - Fork 25
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
Use graphql
API
#123
Use graphql
API
#123
Conversation
Great stuff. Have not looked in detail and tested yet, but have an initial thought by looking at the commits and comments here. I see currently, we are appending |
@Athanasiamo I hope to eventually just have the original function names be implemented using the GraphQL queries. I've updated notes above to rename methods like Given meetup.com will drop support for From: https://www.meetup.com/meetup_api/
|
That sounds totally reasonable to me, @schloerke ! I hope to get time to do initial tests over the weekend. Great work, and I'm learning a lot by looking at how you're approaching this :) |
How's this looking so far? I was super busy last year, so I missed the ping in #118, but I've just realised the REST API has stopped - I'm getting 401 Unauthorised on my reports since 1st Feb. I'm willing to pitch in and help, but I'm unsure where to start. Trying to run > devtools::load_all()
ℹ Loading meetupr
> find_groups2('Ansible')
Error in gh_process_response(raw) :
GitHub API error (400):
Message:
Errors:
message
Variable "$topicCategoryId" of required type "Int!" was not provided.
Type .Last.error.trace to see where the error occurred
Called from: throw(cond) Any pointers for digging in @schloerke? I'm reasonably familiar with GraphQL (done a fair bit with the GH API), but I haven't yet taken a look at the Meetup query explorer... |
@GregSutcliffe Try |
@benubah that works, thanks for the pointer. I guess I should go read up on what that parameter does - right now I have 2 calls to I can see that |
@schloerke I tested removing the |
@benubah I still believe it is useful to have the With some testing on the meetup playground, I was able to turn $topicCategoryId: Int!
# into
$topicCategoryId: Int = null ... and still have the query work. This would allow for |
@schloerke This appears better and works. There seems to be several undocumented stuff around the API. Does this mean we need to provide a list of |
I also see that there are many objects and parameters that we need that are hidden in the schema without documentation. Will just take some time to figure out a whole bunch of these hidden things. I'll be taking a look in the next few days. |
@schloerke Does
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not yet tested the functions, but have had a peak through the code and made some comments on where I think there could be improvements.
@@ -8,7 +8,7 @@ name: with-auth | |||
|
|||
jobs: | |||
with-auth: | |||
runs-on: macOS-latest | |||
runs-on: macos-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason you switched the other workflows to ubuntu, while this remains macos?
country | ||
} | ||
<< extra_graphql >> | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, if I understand correctly. Most queries to the graphql API will need a similar type of graphql template to retrieve the fields and values?
if (is.null(pb)) { | ||
pb <- progress::progress_bar$new( | ||
total = total_fn(graphql_res), | ||
format = paste0(file, " ", pb_format) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to paste(file, "pb_format)
?
neater imo
"Authorization" = paste0( | ||
.token$auth_token$credentials$token_type, | ||
" ", | ||
.token$auth_token$credentials$access_token | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to paste(file, "pb_format)
?
neater imo
country <- get_country(group) | ||
group$country_name <- | ||
if (length(country) == 0 || nchar(country) == 0) { | ||
"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it perhaps better to return NA_character
rather than empty string?
Current branch is working for me to generate my reports, thanks to all for the hard work! Given the Meetup REST API is now dead anyway, does it make sense to rename the methods ( |
@GregSutcliffe were you able to find groups by
Working on this. |
Will be continuing the GraphQL updates here: #138 |
r-lib/actions
code for GHA #1210.2.99.9000
#122inst
folder Set upgh
for GraphQL calls to meetup.com #125./inst/graphql/NAME.graphql
gh
for GraphQL calls to meetup.com #125{glue}
Set upgh
for GraphQL calls to meetup.com #125get_events2()
Use location hashing. Implementfind_groups2()
,get_events2()
#132find_groups2()
Use location hashing. Implementfind_groups2()
,get_events2()
#132Not possible, see GraphQL:get_boards()
get_boards()
can not be replicated #131{meetupr}
authors:get_event_attendees2()
get_event_comments2()
get_event_rsvps2()
get_members2()
get_pro2()
meetup_query2()
. Similar tographql_query()
FUNC2()
->FUNC()
; Remove originalFUNC()
implementations.