2017 © Pedro Peláez
 

library meetup-api-client

Meetup.com API client written on top of Guzzle. This supports all API operations.

image

dms/meetup-api-client

Meetup.com API client written on top of Guzzle. This supports all API operations.

  • Tuesday, December 26, 2017
  • by rdohms
  • Repository
  • 8 Watchers
  • 64 Stars
  • 13,629 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 23 Forks
  • 9 Open issues
  • 16 Versions
  • 3 % Grown

The README.md

This Library is no longer maintained

Due to Meetup.com changing their policies making their API a paid product, I believe it is not fair to expect Open Source Developers like me to maintain clients for it's API for Free., (*1)

Thus this library will no longer be updated, the v3 rewrite will be abandoned., (*2)

Sorry, I hope you all find a new house for your meetups, but if you stay on meetup.com i hope other libs can offer you the needed features., (*3)


DMS Meetup.com API Client Build Status

This is a client for the Meetup.com API powered by the Guzzle Project., (*4)

Installation

The library is available through Composer, so its easy to get it. Just Run this:, (*5)

composer require dms/meetup-api-client

Features

  • All documented and non-deprecated methods from:
    • Meetup API v3
    • Meetup API v2
    • Legacy v1, except methods tagged as deprecated
  • Key authentication
  • OAuth 1.0 Authentication
  • OAuth 2.0 Authentication
  • POST, GET and DELETE methods

Usage

To use the API Client simply instantiate the preferred client (key auth or OAuth), giving it the correct parameters, (*6)

<?php

// Key Authentication
$client = MeetupKeyAuthClient::factory(array('key' => 'my-meetup-key'));

// OAuth Authentication
$config = array(
    'consumer_key'    => 'consumer-key',
    'consumer_secret' => '*****',
    'token'           => '*****',
    'token_secret'    => '*****',
);
$client = MeetupOAuthClient::factory($config);

// OAuth2 Authentication
$config = array(
    'access_token'    => 'access_token',
);
$client = MeetupOAuth2Client::factory($config);

Invoke Commands using our __call method (auto-complete phpDocs are included), (*7)

<?php

$client = MeetupKeyAuthClient::factory(array('key' => 'my-meetup-key'));

// Use our __call method (auto-complete provided)
$response = $client->getRsvps(array('event_id' => 'the-event-id'));

foreach ($response as $responseItem) {
    echo $responseItem['member']['name'] . PHP_EOL;
}

Or Use the getCommand method:, (*8)

<?php

$client = MeetupKeyAuthClient::factory(array('key' => 'my-meetup-key'));

//Retrieve the Command from Guzzle
$command = $client->getCommand('GetRsvps', array('event_id' => 'the-event-id'));
$command->prepare();

$response = $command->execute();

foreach ($response as $responseItem) {
    echo $responseItem['member']['name'] . PHP_EOL;
}

For a list of all the available commands, see the Meetup API documentation on ReadTheDocs, (*9)

Response

This wrapper implements two types of custom responses to facilitate the usage of the results directly., (*10)

Response for Collection

When querying for collections the client wraps the result in a MultiResultResponse. This response implements a Iterator allowing you to directly iterate over the results, while still giving you access to all response data, as well as the metadata returned by the API using the getMetaData() method., (*11)

<?php

$rsvps = $client->getRsvps(array('event_id' => 'the-event-id'));

foreach ($rsvps as $rsvp) {
    echo $rsvp['member']['name'] . PHP_EOL;
}

$metadata = $response->getMetaData();
echo "Debug Url:" . $metadata['url'];

Response for Single Resource

When getting information of a single resource the client will wrap that in a SingleResultResponse. This response gives you direct array access to results, but retains response data so you can still access it., (*12)

<?php

$rsvp = $client->getRsvp(array('id' => 'rsvp-id'));

echo "RSVP? " . $rsvp['response'];

echo "StatusCode: " . $rsvp->getStatusCode();

Rate Limiting

A rate limiter is included in this client, its enabled by default, but can be disabled as described below. It uses a pre-defined factor (50% by default) to determine when it should start throttling the calls, by using a sleep slowdown. Operations are based on the X-RateLimit-* headers, to determine remaining limits and reset times., (*13)

Configuring Rate Limit Kick-in Factor

To configure how late the back algorithm kicks in, you can set a custom rate factor:, (*14)

<?php

$client = MeetupKeyAuthClient::factory(array(
    'key' => 'my-meetup-key',
    'rate_limit_factor' => 0.75
));

Disabling Rate Limiting

If you do not wish to use Rate Limiting and deal with errors sent by the API yourself, use the config below., (*15)

<?php

$client = MeetupKeyAuthClient::factory(array(
    'key' => 'my-meetup-key',
    'disable_rate_limiting' => true
));

License

The API client is available under an MIT License., (*16)

The Versions

26/12 2017

dev-master

9999999-dev

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

26/12 2017

v2.3.1

2.3.1.0

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

15/10 2017

dev-guzzle6-compatible

dev-guzzle6-compatible

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

14/10 2017

dev-parity-oct-17

dev-parity-oct-17

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

11/12 2016

v2.x-dev

2.9999999.9999999.9999999-dev

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

11/12 2016

v2.3

2.3.0.0

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

14/08 2016

2.2

2.2.0.0

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

17/06 2016

v2.1

2.1.0.0

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

23/12 2015

v2.0.1

2.0.1.0

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

02/05 2015

v2.0.0

2.0.0.0

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

30/12 2014

v1.3.0

1.3.0.0

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

18/04 2014

v1.2.0

1.2.0.0

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

12/11 2013

1.1.1

1.1.1.0

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

11/04 2013

v1.1

1.1.0.0

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com

29/03 2013

1.0.0

1.0.0.0

Meetup.com API client written on top of Guzzle. This supports all API operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

api guzzle dms meetup.com