Skip to content
This repository was archived by the owner on Dec 17, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/CL/Slack/Model/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ class Attachment extends AbstractModel
* @var AttachmentField[]|ArrayCollection
*/
private $fields;


private $footer;

/**
* @var Array
*/
Expand Down Expand Up @@ -278,4 +280,20 @@ public function getMrkdwnIn()
{
return $this->mrkdwnIn;
}

/**
* @return mixed
*/
public function getFooter()
{
return $this->footer;
}

/**
* @param mixed $footer
*/
public function setFooter($footer)
{
$this->footer = $footer;
}
}
70 changes: 70 additions & 0 deletions src/CL/Slack/Payload/ReactionsPayload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?php

/*
* This file is part of the Slack API library.
*
* (c) Cas Leentfaar <info@casleentfaar.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace CL\Slack\Payload;

/**
* @author Cas Leentfaar <info@casleentfaar.com>
*
* @link Official documentation at https://api.slack.com/methods/channels.archive
*/
class ReactionsPayload extends AbstractPayload
{
/**
* @var string
*/
private $channel;

/**
* @var string
*/
private $timestamp;

/**
* @param string $channelId
*/
public function setChannelId($channelId)
{
$this->channel = $channelId;
}

/**
* @return string
*/
public function getChannelId()
{
return $this->channel;
}

/**
* @return string
*/
public function getTimestamp()
{
return $this->timestamp;
}

/**
* @param string $timestamp
*/
public function setTimestamp($timestamp)
{
$this->timestamp = $timestamp;
}

/**
* @return string
*/
public function getMethod()
{
return 'reactions.get';
}
}
63 changes: 63 additions & 0 deletions src/CL/Slack/Payload/ReactionsPayloadResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php

/*
* This file is part of the Slack API library.
*
* (c) Cas Leentfaar <info@casleentfaar.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace CL\Slack\Payload;

/**
* @author Cas Leentfaar <info@casleentfaar.com>
*/
class ReactionsPayloadResponse extends AbstractPayloadResponse
{
private $message;

private $channel;

/**
* @return mixed
*/
public function getMessage()
{
return $this->message;
}

/**
* @param mixed $message
*/
public function setMessage($message)
{
$this->message = $message;
}

/**
* @return mixed
*/
public function getChannel()
{
return $this->channel;
}

/**
* @param mixed $channel
*/
public function setChannel($channel)
{
$this->channel = $channel;
}

public function getReactions()
{
if (!isset($this->message['reactions'])) {
return [];
}

return $this->message['reactions'];
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
CL\Slack\Model\Attachment:
properties:
titleLink:
type: string
authorName:
type: string
authorLink:
type: string
authorIcon:
type: string
mrkdwnIn:
type: array

title:
type: string
fallback:
Expand All @@ -12,5 +23,7 @@ CL\Slack\Model\Attachment:
type: string
color:
type: string
footer:
type: string
fields:
type: ArrayCollection<CL\Slack\Model\AttachmentField>
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ CL\Slack\Model\File:
groups:
type: array<string>
initialComment:
type: string
type: array
numStars:
type: integer
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CL\Slack\Model\SimpleMessage:
subtype:
type: string
channel:
type: CL\Slack\Model\SimpleChannel
type: string
user:
type: string
username:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CL\Slack\Payload\ReactionsPayloadResponse:
properties:
channel:
type: string
message:
type: array