-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
579 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/notify. | ||
* | ||
* (c) guanguans <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
|
||
namespace Guanguans\Notify\Telegram; | ||
|
||
class Client extends \Guanguans\Notify\Foundation\Client | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/notify. | ||
* | ||
* (c) guanguans <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
|
||
namespace Guanguans\Notify\Telegram; | ||
|
||
use Guanguans\Notify\Foundation\UriTemplateTokenCredential; | ||
|
||
class Credential extends UriTemplateTokenCredential | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/notify. | ||
* | ||
* (c) guanguans <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
|
||
namespace Guanguans\Notify\Telegram\Messages; | ||
|
||
class AnimationMessage extends Message | ||
{ | ||
/** | ||
* @var string[] | ||
*/ | ||
protected $defined = [ | ||
'chat_id', | ||
'animation', | ||
'duration', | ||
'width', | ||
'height', | ||
'thumb', | ||
'caption', | ||
'parse_mode', | ||
'caption_entities', | ||
'disable_notification', | ||
'protect_content', | ||
'reply_to_message_id', | ||
'allow_sending_without_reply', | ||
'reply_markup', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/notify. | ||
* | ||
* (c) guanguans <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
|
||
namespace Guanguans\Notify\Telegram\Messages; | ||
|
||
class AudioMessage extends Message | ||
{ | ||
/** | ||
* @var string[] | ||
*/ | ||
protected $defined = [ | ||
'chat_id', | ||
'audio', | ||
'caption', | ||
'parse_mode', | ||
'caption_entities', | ||
'duration', | ||
'performer', | ||
'title', | ||
'thumb', | ||
'disable_notification', | ||
'protect_content', | ||
'reply_to_message_id', | ||
'allow_sending_without_reply', | ||
'reply_markup', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/notify. | ||
* | ||
* (c) guanguans <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
|
||
namespace Guanguans\Notify\Telegram\Messages; | ||
|
||
class ChatActionMessage extends Message | ||
{ | ||
/** | ||
* @var string[] | ||
*/ | ||
protected $defined = [ | ||
'chat_id', | ||
'action', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/notify. | ||
* | ||
* (c) guanguans <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
|
||
namespace Guanguans\Notify\Telegram\Messages; | ||
|
||
class ContactMessage extends Message | ||
{ | ||
/** | ||
* @var string[] | ||
*/ | ||
protected $defined = [ | ||
'chat_id', | ||
'phone_number', | ||
'first_name', | ||
'last_name', | ||
'vcard', | ||
'disable_notification', | ||
'protect_content', | ||
'reply_to_message_id', | ||
'allow_sending_without_reply', | ||
'reply_markup', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/notify. | ||
* | ||
* (c) guanguans <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
|
||
namespace Guanguans\Notify\Telegram\Messages; | ||
|
||
class DiceMessage extends Message | ||
{ | ||
/** | ||
* @var string[] | ||
*/ | ||
protected $defined = [ | ||
'chat_id', | ||
'emoji', | ||
'disable_notification', | ||
'protect_content', | ||
'reply_to_message_id', | ||
'allow_sending_without_reply', | ||
'reply_markup', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/notify. | ||
* | ||
* (c) guanguans <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
|
||
namespace Guanguans\Notify\Telegram\Messages; | ||
|
||
class DocumentMessage extends Message | ||
{ | ||
/** | ||
* @var string[] | ||
*/ | ||
protected $defined = [ | ||
'chat_id', | ||
'document', | ||
'thumb', | ||
'caption', | ||
'parse_mode', | ||
'caption_entities', | ||
'disable_content_type_detection', | ||
'disable_notification', | ||
'protect_content', | ||
'reply_to_message_id', | ||
'allow_sending_without_reply', | ||
'reply_markup', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/notify. | ||
* | ||
* (c) guanguans <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
|
||
namespace Guanguans\Notify\Telegram\Messages; | ||
|
||
class LocationMessage extends Message | ||
{ | ||
/** | ||
* @var string[] | ||
*/ | ||
protected $defined = [ | ||
'chat_id', | ||
'latitude', | ||
'longitude', | ||
'horizontal_accuracy', | ||
'live_period', | ||
'heading', | ||
'proximity_alert_radius', | ||
'disable_notification', | ||
'protect_content', | ||
'reply_to_message_id', | ||
'allow_sending_without_reply', | ||
'reply_markup', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/notify. | ||
* | ||
* (c) guanguans <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
|
||
namespace Guanguans\Notify\Telegram\Messages; | ||
|
||
class MediaGroupMessage extends Message | ||
{ | ||
/** | ||
* @var string[] | ||
*/ | ||
protected $defined = [ | ||
'chat_id', | ||
'media', | ||
'disable_notification', | ||
'protect_content', | ||
'reply_to_message_id', | ||
'allow_sending_without_reply', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/notify. | ||
* | ||
* (c) guanguans <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
|
||
namespace Guanguans\Notify\Telegram\Messages; | ||
|
||
use Guanguans\Notify\Foundation\Concerns\AsJson; | ||
use Guanguans\Notify\Foundation\Concerns\AsPost; | ||
use Guanguans\Notify\Telegram\Credential; | ||
|
||
class Message extends \Guanguans\Notify\Foundation\Message | ||
{ | ||
use AsPost; | ||
use AsJson; | ||
|
||
public function httpUri() | ||
{ | ||
return sprintf('https://api.telegram.org/bot%s/sendMessage', Credential::TEMPLATE_TOKEN); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/notify. | ||
* | ||
* (c) guanguans <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
|
||
namespace Guanguans\Notify\Telegram\Messages; | ||
|
||
class PhotoMessage extends Message | ||
{ | ||
/** | ||
* @var string[] | ||
*/ | ||
protected $defined = [ | ||
'chat_id', | ||
'photo', | ||
'caption', | ||
'parse_mode', | ||
'caption_entities', | ||
'disable_web_page_preview', | ||
'disable_notification', | ||
'protect_content', | ||
'reply_to_message_id', | ||
'allow_sending_without_reply', | ||
'reply_markup', | ||
]; | ||
} |
Oops, something went wrong.