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

API: Endpoint to get an organization's details #10931

Conversation

twinsfan421
Copy link
Contributor

@twinsfan421 twinsfan421 commented Oct 19, 2020

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

This would provide an api show endpoint dev.to/api/organizations/{org_username} to search organizations by their username.
As discussed in issue 9212, This is the first of 4 related endpoints that will include:

dev.to/api/organizations/{org_username}/users
dev.to/api/organizations/{org_username}/articles
dev.to/api/organizations/{org_username}/listings

Related Tickets & Documents

#9212

Added tests?

  • yes
  • no, because they aren't needed
  • no, because I need help

Added to documentation?

  • docs.forem.com
  • readme
  • no documentation needed

@twinsfan421 twinsfan421 requested a review from a team as a code owner October 19, 2020 17:19
@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Oct 19, 2020
@twinsfan421 twinsfan421 changed the title Twinsfan421/query organization on dev.to api show 9212 Query organization on dev.to api show 9212 Oct 19, 2020
Copy link
Contributor

@mstruve mstruve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @twinsfan421! Code looks super solid here. Could you also add some API docs for this new endpoint? docs/api_v0.yml

Please and thank you!!!

PS also looks like there is a routes.rb conflict :)

@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Oct 20, 2020
@twinsfan421
Copy link
Contributor Author

twinsfan421 commented Oct 20, 2020

Hey @twinsfan421! Code looks super solid here. Could you also add some API docs for this new endpoint? docs/api_v0.yml

Please and thank you!!!

PS also looks like there is a routes.rb conflict :)

@mstruve Ok thanks, will do!

@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Oct 20, 2020
Copy link
Contributor

@benhalpern benhalpern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. This should include an update to the API docs, as per described here. https://docs.forem.com/contributing/api/

Here's an example of the last PR with API changes that include the docs. #10547

@pr-triage pr-triage bot added PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes and removed PR: unreviewed bot applied label for PR's with no review labels Oct 20, 2020
@twinsfan421 twinsfan421 force-pushed the twinsfan421/query-organization-on-dev.to-api-show-9212 branch from 6e7d6aa to 4009005 Compare October 21, 2020 08:23
@twinsfan421 twinsfan421 requested a review from a team October 21, 2020 08:23
@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes labels Oct 21, 2020
@twinsfan421
Copy link
Contributor Author

I pushed up a fix for the merge conflict and an update to the api docs. Let me know if you want me to make any changes.

Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @twinsfan421, great work! I would align the joined/creation date to the format of the other dates

app/views/api/v0/organizations/show.json.jbuilder Outdated Show resolved Hide resolved
@pr-triage pr-triage bot added PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes and removed PR: unreviewed bot applied label for PR's with no review labels Oct 22, 2020
@rhymes rhymes changed the title Query organization on dev.to api show 9212 API: Endpoint to get an organization's details Oct 22, 2020
@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes labels Oct 23, 2020
Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the changes @twinsfan421, one tiny last bit left :)

docs/api_v0.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @twinsfan421, LGTM!

@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Oct 26, 2020
@benhalpern benhalpern merged commit c0168df into forem:master Oct 30, 2020
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants