Skip to content

Commit

Permalink
Merge pull request #36 from carsso/master
Browse files Browse the repository at this point in the history
Fix conversations.history limit parameter (relates to #34 & #35)
  • Loading branch information
vluzrmos committed Apr 12, 2022
2 parents a6bc39c + ec7873b commit 6fd8c3d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Vluzrmos/SlackApi/Contracts/SlackChannel.php
Expand Up @@ -7,7 +7,7 @@ interface SlackChannel
public function archive($channel);
public function unarchive($channel);
public function create($name);
public function history($channel, $count = 100, $latest = null, $oldest = 0, $inclusive = 1);
public function history($channel, $limit = 100, $latest = null, $oldest = 0, $inclusive = 1);
public function info($channel);
public function invite($channel, $user);
public function join($name);
Expand Down
2 changes: 1 addition & 1 deletion src/Vluzrmos/SlackApi/Contracts/SlackInstantMessage.php
Expand Up @@ -5,7 +5,7 @@
interface SlackInstantMessage
{
public function close($channel);
public function history($channel, $count = 100, $latest = null, $oldest = 0, $inclusive = 1);
public function history($channel, $limit = 100, $latest = null, $oldest = 0, $inclusive = 1);
public function lists();
public function all();
public function mark($channel, $ts);
Expand Down
6 changes: 3 additions & 3 deletions src/Vluzrmos/SlackApi/Methods/Channel.php
Expand Up @@ -39,16 +39,16 @@ public function create($name)
* @see https://api.slack.com/methods/conversations.history
*
* @param string $channel Channel to fetch history for.
* @param int $count Number of messages to return, between 1 and 1000.
* @param int $limit Number of messages to return, between 1 and 1000.
* @param string $latest End of time range of messages to include in results.
* @param int $oldest Start of time range of messages to include in results.
* @param int $inclusive Include messages with latest or oldest timestamp in results.
*
* @return array
*/
public function history($channel, $count = 100, $latest = null, $oldest = 0, $inclusive = 1)
public function history($channel, $limit = 100, $latest = null, $oldest = 0, $inclusive = 1)
{
return $this->method('history', compact('channel', 'count', 'latest', 'oldest', 'inclusive'));
return $this->method('history', compact('channel', 'limit', 'latest', 'oldest', 'inclusive'));
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Vluzrmos/SlackApi/Methods/InstantMessage.php
Expand Up @@ -27,16 +27,16 @@ public function close($channel)
* @see https://api.slack.com/methods/conversations.history
*
* @param string $channel Channel to fetch history for.
* @param int $count Number of messages to return, between 1 and 1000.
* @param int $limit Number of messages to return, between 1 and 1000.
* @param string $latest End of time range of messages to include in results.
* @param int|string $oldest Start of time range of messages to include in results.
* @param int $inclusive Include messages with latest or oldest timestamp in results.
*
* @return array
*/
public function history($channel, $count = 100, $latest = null, $oldest = 0, $inclusive = 1)
public function history($channel, $limit = 100, $latest = null, $oldest = 0, $inclusive = 1)
{
return $this->method('history', compact('channel', 'count', 'latest', 'oldest', 'inclusive'));
return $this->method('history', compact('channel', 'limit', 'latest', 'oldest', 'inclusive'));
}

/**
Expand Down

0 comments on commit 6fd8c3d

Please sign in to comment.