You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Install using Composer:
6
6
`"emilh91/groupme-api-client": "dev-master"`
7
7
8
8
### Boilerplate
9
-
Your GroupMe API key can be found on the page mentioned above once you are logged in.
9
+
Your GroupMe API key can be found on the page mentioned above once you are logged in. You do not need to specify an API key if you only plan to use this library for **sending bot messages**.
10
10
```php
11
11
require 'vendor/autoload.php';
12
12
$c = new GroupMeApi\Client('API-KEY');
@@ -20,6 +20,7 @@ All the methods in the following sub-sections should be invoked on the newly cre
20
20
public function getMyBots()
21
21
public function createBot($bot_name, $group_id, $avatar_url='', $callback_url='')
22
22
public function sendBotMessage($bot_id, $text, array $attachments=array())
23
+
public function parseBotMessage($bot_id, $text)
23
24
public function destroyBot($bot_id)
24
25
```
25
26
@@ -29,7 +30,8 @@ public function getDirectMessageChats($page=1, $per_page=10)
29
30
public function getLatestDirectMessages($other_user_id, $limit=20)
30
31
public function getDirectMessagesBefore($other_user_id, $message_id)
31
32
public function getDirectMessagesSince($other_user_id, $message_id)
32
-
public function sendDirectMessage($other_user_id, $text, $source_guid=null, array $attachments=array())
33
+
public function sendDirectMessage($other_user_id, $text, array $attachments=array(), $source_guid=null)
34
+
public function parseDirectMessage($other_user_id, $text, $source_guid=null)
33
35
public function likeDirectMessage($other_user_id, $message_id)
34
36
public function unlikeDirectMessage($other_user_id, $message_id)
35
37
```
@@ -42,7 +44,7 @@ public function getGroupByName($name)
42
44
public function getGroupById($group_id)
43
45
public function getFormerGroups()
44
46
public function createGroup($name, $description='', $image_url='', $share=false)
45
-
public function getGroupDetails($group_id)
47
+
public function getGroupDetails($group)
46
48
public function updateGroupDetails($group_id, array $payload)
47
49
public function destroyGroup($group_id)
48
50
public function joinGroup($group_id, $share_token)
@@ -62,10 +64,11 @@ public function getLatestGroupMessages($group_id, $limit=20)
62
64
public function getGroupMessagesBefore($group_id, $message_id, $limit=20)
63
65
public function getGroupMessagesAfter($group_id, $message_id, $limit=20)
64
66
public function getGroupMessagesSince($group_id, $message_id, $limit=20)
65
-
public function getGroupNameById($id)
66
-
public function getGroupIdByName($name)
67
-
public function isMemberOfGroup($grp)
67
+
public function getGroupNameById($group_id)
68
+
public function getGroupIdByName($group_name)
69
+
public function isMemberOfGroup($group_id)
68
70
public function sendGroupMessage($group_id, $text, array $attachments=array(), $source_guid=null)
71
+
public function parseGroupMessage($group_id, $text, $source_guid=null)
69
72
```
70
73
71
74
##### User methods
@@ -87,27 +90,24 @@ public static function makeEmojiAttachment(array $charmap)
87
90
```
88
91
89
92
### Emojis
90
-
Aah, the pinnacle of modern communication... To send emojis in GroupMe, you need to specify a charmap (character map) when creating the attachment. For this purpose, another factory class exists: `GroupMeApi\EmojiUtils`.
93
+
Aah, the pinnacle of modern communication... ~~To send emojis in GroupMe, you need to specify a charmap (character map) when creating the attachment. For this purpose, another factory class exists: `GroupMeApi\EmojiUtils`.~~ To send emojis without dealing with charmaps and placeholders, just write them inline and use the `parse*Message(...)` methods to send them.
91
94
92
95
```php
93
96
require 'vendor/autoload.php';
94
97
$c = new GroupMeApi\Client('API-KEY');
95
-
96
-
$raw_text = 'Hello :cool_guy_face::cigar_face:';
97
-
$emojification = GroupMeApi\EmojiUtils::extractEmojiNamesFromText($raw_text); // returns an array
0 commit comments