Skip to content

Commit 6fd8c3d

Browse files
authored
Merge pull request #36 from carsso/master
Fix conversations.history limit parameter (relates to #34 & #35)
2 parents a6bc39c + ec7873b commit 6fd8c3d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/Vluzrmos/SlackApi/Contracts/SlackChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface SlackChannel
77
public function archive($channel);
88
public function unarchive($channel);
99
public function create($name);
10-
public function history($channel, $count = 100, $latest = null, $oldest = 0, $inclusive = 1);
10+
public function history($channel, $limit = 100, $latest = null, $oldest = 0, $inclusive = 1);
1111
public function info($channel);
1212
public function invite($channel, $user);
1313
public function join($name);

src/Vluzrmos/SlackApi/Contracts/SlackInstantMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
interface SlackInstantMessage
66
{
77
public function close($channel);
8-
public function history($channel, $count = 100, $latest = null, $oldest = 0, $inclusive = 1);
8+
public function history($channel, $limit = 100, $latest = null, $oldest = 0, $inclusive = 1);
99
public function lists();
1010
public function all();
1111
public function mark($channel, $ts);

src/Vluzrmos/SlackApi/Methods/Channel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ public function create($name)
3939
* @see https://api.slack.com/methods/conversations.history
4040
*
4141
* @param string $channel Channel to fetch history for.
42-
* @param int $count Number of messages to return, between 1 and 1000.
42+
* @param int $limit Number of messages to return, between 1 and 1000.
4343
* @param string $latest End of time range of messages to include in results.
4444
* @param int $oldest Start of time range of messages to include in results.
4545
* @param int $inclusive Include messages with latest or oldest timestamp in results.
4646
*
4747
* @return array
4848
*/
49-
public function history($channel, $count = 100, $latest = null, $oldest = 0, $inclusive = 1)
49+
public function history($channel, $limit = 100, $latest = null, $oldest = 0, $inclusive = 1)
5050
{
51-
return $this->method('history', compact('channel', 'count', 'latest', 'oldest', 'inclusive'));
51+
return $this->method('history', compact('channel', 'limit', 'latest', 'oldest', 'inclusive'));
5252
}
5353

5454
/**

src/Vluzrmos/SlackApi/Methods/InstantMessage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ public function close($channel)
2727
* @see https://api.slack.com/methods/conversations.history
2828
*
2929
* @param string $channel Channel to fetch history for.
30-
* @param int $count Number of messages to return, between 1 and 1000.
30+
* @param int $limit Number of messages to return, between 1 and 1000.
3131
* @param string $latest End of time range of messages to include in results.
3232
* @param int|string $oldest Start of time range of messages to include in results.
3333
* @param int $inclusive Include messages with latest or oldest timestamp in results.
3434
*
3535
* @return array
3636
*/
37-
public function history($channel, $count = 100, $latest = null, $oldest = 0, $inclusive = 1)
37+
public function history($channel, $limit = 100, $latest = null, $oldest = 0, $inclusive = 1)
3838
{
39-
return $this->method('history', compact('channel', 'count', 'latest', 'oldest', 'inclusive'));
39+
return $this->method('history', compact('channel', 'limit', 'latest', 'oldest', 'inclusive'));
4040
}
4141

4242
/**

0 commit comments

Comments
 (0)