Skip to content

Commit

Permalink
CardsV1 is deprecated we must use cardsV2 instead.
Browse files Browse the repository at this point in the history
Based on google developers api documentation.
https://developers.google.com/chat/api/reference/rest/v1/cards-v1 
CardsV1 is deprecated we must use cardsV2 instead.
  • Loading branch information
daifma committed Dec 12, 2022
1 parent 233b9eb commit 4bec505
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function toArray(): array
}

/**
* @return $this
* @deprecated google chat cards-v1 deprecated, use "cardV2()" instead.
*/
public function card(array $card): static
{
Expand All @@ -71,19 +71,20 @@ public function card(array $card): static
return $this;
}

/**
* @return $this
*/
public function cardV2(array $card): static
{
$this->options['cardsV2'][] = $card;

return $this;
}

public function text(string $text): static
{
$this->options['text'] = $text;

return $this;
}

/**
* @return $this
*/
public function setThreadKey(?string $threadKey): static
{
$this->threadKey = $threadKey;
Expand Down

0 comments on commit 4bec505

Please sign in to comment.