-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Recover status code after request #188
Comments
Unfortunately, when I designed the API, I either didn't know about that part of the API or it didn't exist yet. 😅 I would be okay with adding a |
Thank you for the quick response. I might have found a workaround by listing all the members of an organization, a request that does provide a body as a response. However, I'm not too sure what approach would be the best for my case. I'll keep assessing both options. Thanks! |
@brettcannon out of curiosity what would be your thought about augmenting |
This now supports API methods whose responses are expressed in a status code, such as `/orgs/{org}/members/{username}` to determine if a group contains a specific user. /cc gidgethub#188
Without seeing how it makes the code look I don't have a specific opinion either way. |
Coincidentally, there's this pull request right over there 👉 ;) |
Oh, I know, but I'm still digging myself out from all of my GitHub notifications, so I'm treating everything in isolation in case it takes a while to get to your PR. 😁 |
This now supports API methods whose responses are expressed in a status code, such as `/orgs/{org}/members/{username}` to determine if a group contains a specific user. Closes #188 Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>
Hi!
I am using
gidgethub
to create a bot within a GitHub App. I am struggling when checking whether a user is member of a certain organization, see GitHub documentation for this call.From what I understood,
gh.getitem
only returns the body of the request. However, the call mentioned above only returns a status code as a response (either 204, 302 or 404). Thus, I am not sure how to recover this status code after usingawait gh.getitem(url, oauth_token=oauth_token)
.Please, let me know if I am misunderstanding something. Thanks!
The text was updated successfully, but these errors were encountered: