2017 © Pedro Peláez
 

library groupme

Groupme Library for PHP

image

jspaetzel/groupme

Groupme Library for PHP

  • Saturday, December 16, 2017
  • by jspaetzel
  • Repository
  • 4 Watchers
  • 18 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 3 Open issues
  • 1 Versions
  • 9 % Grown

The README.md

Unofficial PHP Client Library for the GroupMe v3 API

Build Packagist Version, (*1)

Install with Composer, (*2)

composer require jspaetzel/groupme

Then use the autoloader to load this library in your code, (*3)

require './vendor/autoload.php';

Examples

These are some basic examples for how to interact with the api via the library. The APIKEY in these examples is the API key of a user, not a groupme bot key or application key., (*4)

For all requests you'll need create a Client

$client = new \GroupMePHP\Client('APIKEY');

Send a message to a group

$message_to_send = "Hello Group!"
$messages_service = new \GroupMePHP\Services\MessagesService($client);
$messages_service->create(12345678, ["THISISAGUID123", $message_to_send]);

Send a direct message to a user

$direct_message_service = new \GroupMePHP\Services\DirectMessagesService($client);
$direct_message_service->create([
    "source_guid" => "THISISAGUID123",
    "recipient_id" => 12345678,
    "text" => 'Hello User'
]);

Get index of groups for authenticated user

$group_service = new \GroupMePHP\Services\GroupsService($client);
$response = $group_service->index();

Get only the members of a group as json

$group_service = new \GroupMePHP\Services\GroupsService($client);
$response = $group_service->show(1234567);
$members = $response['members'];

Want to contribute?

See the contribution guide, (*5)

The Versions

16/12 2017

dev-master

9999999-dev https://github.com/jspaetzel/GroupMePHP

Groupme Library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

php groupme