Add direct deep-link to attachments

This commit is contained in:
Matias De lellis
2020-11-14 00:22:39 -03:00
parent e6653c171f
commit b5dfa7c65d
4 changed files with 44 additions and 10 deletions

View File

@@ -12,6 +12,7 @@ class Attach extends Entity implements JsonSerializable {
protected $createdAt;
protected $previewUrl;
protected $redirectUrl;
protected $deepLinkUrl;
public function setPreviewUrl($previewUrl) {
$this->previewUrl = $previewUrl;
@@ -21,14 +22,19 @@ class Attach extends Entity implements JsonSerializable {
$this->redirectUrl = $redirectUrl;
}
public function setDeepLinkUrl($deepLinkUrl) {
$this->deepLinkUrl = $deepLinkUrl;
}
public function jsonSerialize() {
return [
'id' => $this->id,
'note_id' => $this->noteId,
'file_id' => $this->fileId,
'created_at' => $this->createdAt,
'preview_url' => $this->previewUrl,
'redirect_url' => $this->redirectUrl
'id' => $this->id,
'note_id' => $this->noteId,
'file_id' => $this->fileId,
'created_at' => $this->createdAt,
'preview_url' => $this->previewUrl,
'redirect_url' => $this->redirectUrl,
'deep_link_url' => $this->deepLinkUrl
];
}
}