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

Add methods to expand coverage of channels endpoints #55

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

evanofslack
Copy link
Contributor

This PR adds methods and tests to cover the following endpoints:

  • channels.create
  • channels.invite
  • channels.join
  • channels.members
  • users.info

The method for users.info was required to retrieve user IDs for testing of channels.invite.

Additionally, this PR moves groups methods out of the channels file and into a new file.

@evanofslack evanofslack marked this pull request as ready for review July 9, 2022 04:14
@srrathi
Copy link
Contributor

srrathi commented Aug 10, 2022

@evanofslack just curious to know is there any specific reason to return slice of User addresses in GetChannelMembers function ?

@evanofslack
Copy link
Contributor Author

@evanofslack just curious to know is there any specific reason to return slice of User addresses in GetChannelMembers function ?

@srrathi The function's intent is to return a slice of models.User, not user addresses.

func (c *Client) GetChannelMembers(channel *models.Channel) ([]*models.User, error) 

@srrathi
Copy link
Contributor

srrathi commented Aug 19, 2022

@evanofslack just curious to know is there any specific reason to return slice of User addresses in GetChannelMembers function ?

@srrathi The function's intent is to return a slice of models.User, not user addresses.

func (c *Client) GetChannelMembers(channel *models.Channel) ([]*models.User, error) 

I'm sorry by addresses I mean Pointer. It is returning a slice of models.User pointer. Is there any specific reason for it.

@evanofslack
Copy link
Contributor Author

@srrathi Only reasoning is that other methods tend to accept pointers and it is easy to dereference if necessary.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ evanofslack
❌ evan slack


evan slack seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for review
Development

Successfully merging this pull request may close these issues.

3 participants