PHPackages                             cornford/pokenotifier - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. cornford/pokenotifier

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

cornford/pokenotifier
=====================

An easy way to send nearby Pokemon notifications to Slack.

v1.0.0(9y ago)214MITPHPPHP &gt;=5.5.0

Since Aug 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bradcornford/Pokenotifier)[ Packagist](https://packagist.org/packages/cornford/pokenotifier)[ RSS](/packages/cornford-pokenotifier/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (6)Versions (3)Used By (0)

An easy way to send nearby Pokemon notifications to Slack
=========================================================

[](#an-easy-way-to-send-nearby-pokemon-notifications-to-slack)

[![Latest Stable Version](https://camo.githubusercontent.com/0c29ad482c968b60427f063365ed584a6ab16ae94cd83c26941e9430d27f4b80/68747470733a2f2f706f7365722e707567782e6f72672f636f726e666f72642f506f6b656e6f7469666965722f76657273696f6e2e706e67)](https://packagist.org/packages/cornford/pokenotifier)[![Total Downloads](https://camo.githubusercontent.com/9aed6c0191dbbcfffbbeee92759725fd10111a0a02e5a2548f0b2e0404e13ccc/68747470733a2f2f706f7365722e707567782e6f72672f636f726e666f72642f706f6b656e6f7469666965722f642f746f74616c2e706e67)](https://packagist.org/packages/cornford/Pokenotifier)[![Build Status](https://camo.githubusercontent.com/2ef42b124fdb2d41906650f9628b8645d4a699e36f532d3779faf3d892c3ec2a/68747470733a2f2f7472617669732d63692e6f72672f62726164636f726e666f72642f506f6b656e6f7469666965722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bradcornford/Pokenotifier)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/aadc43f402924d36e70fae34442000b38a2a37b72ac48c28cfca93425d247594/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62726164636f726e666f72642f506f6b656e6f7469666965722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bradcornford/Pokenotifier/?branch=master)

Think of Pokenotifier as an easy way to generate Slack notifications for nearby Pokemon using PokemonGo-Map. These include:

- `processScanRequest`
- `processWebhookRequest`
- `requestPokemonGoMapScan`
- `requestPokemonGoMapData`
- `expireCachedItems`
- `sendSlackNotification`
- `processPokemon`
- `loadApplicationConfiguration`
- `getApplicationConfiguration`
- `loadPokemonConfiguration`
- `getPokemonConfiguration`
- `createGuzzleClient`
- `getGuzzleClient`
- `setGuzzleClient`
- `createSlackClient`
- `getSlackClient`
- `setSlackClient`
- `createDirectoryIteratorInstance`
- `getDirectoryIteratorInstance`
- `setDirectoryIteratorInstance`

Installation
------------

[](#installation)

Begin by installing this package through Composer. Edit your project's `composer.json` file to require `cornford/pokenotifier`.

```
"require": {
	"cornford/pokenotifier": "1.*"
}

```

Next, update Composer from the Terminal:

```
composer update

```

Finally we need to introduce the configuration files into your application/

```
cp src/config/{example.,}application.php

```

That's it! You're all set to go.

Configuration
-------------

[](#configuration)

You can now configure Pokenotifier in a few simple steps. Open `src/config/application.php` and update the options as needed.

- `default-latitude` - Default latitude used for scan.
- `default-longitude` - Default longitude used for scan.
- `cache-directory` - Cache directory location.
- `pokemongo-protocol` - The protocol of the PokemonGo-Map server.
- `pokemongo-ip` - The IP address of the PokemonGo-Map server.
- `pokemongo-port` - The port of the PokemonGo-Map server.
- `pokemon-rarity` - The Pokemon level of rarity to notify, etc (1-5).
- `slack-webhook` - The URL of the Slack server webhook.
- `slack-channel` - The channel of the Slack server.

Usage
-----

[](#usage)

It's really as simple as using the Pokenotifier class in any Controller / Model / File you see fit with:

`$notifier = new Cornford\Pokenotifier\Notifier();`

This will give you access to

- [Process Scan Request](#process-scan-request)
- [Process Webhook Request](#process-webhook-request)
- [Request Pokemon Go Map Scan](#request-pokemon-go-map-scan)
- [Request Pokemon Go Map Data](#request-pokemon-go-map-data)
- [Expire Cached Items](#expire-cached-items)
- [Send Slack Notification](#send-slack-notification)
- [Process Pokemon](#process-pokemon)
- [Load Application Configuration](#load-application-configuration)
- [Get Application Configuration](#get-application-configuration)
- [Load Pokemon Configuration](#load-pokemon-configuration)
- [Get Pokemon Configuration](#get-pokemon-configuration)
- [Create Guzzle Client](#create-guzzle-client)
- [Get Guzzle Client](#get-guzzle-client)
- [Set Guzzle Client](#set-guzzle-client)
- [Create Slack Client](#create-slack-client)
- [Get Slack Client](#get-slack-client)
- [Set Slack Client](#set-slack-client)
- [Create Directory Iterator](#create-directory-iterator)
- [Get Directory Iterator](#get-directory-iterator)
- [Set Directory Iterator](#set-directory-iterator)

### Process Scan Request

[](#process-scan-request)

The `processScanRequest` method allows you to process a scan request, using a position object as a parameter.

```
$notifier->processScanRequest(new Cornford\Pokenotifier\Models\Position(0, 0));

```

### Process Scan Request

[](#process-scan-request-1)

The `processWebhookRequest` method allows you to process a webhook request, using a position object, and request data as parameters.

```
$notifier->processWebhookRequest(new Cornford\Pokenotifier\Models\Position(0, 0), ['pokemons'=> []]);

```

### Request Pokemon Go Map Scan

[](#request-pokemon-go-map-scan)

The `requestPokemonGoMapScan` method allows you to send a scan request to PokemonGo-Map, using a position object as a parameter.

```
$notifier->requestPokemonGoMapScan(new Cornford\Pokenotifier\Models\Position(0, 0));

```

### Request Pokemon Go Map Data

[](#request-pokemon-go-map-data)

The `requestPokemonGoMapData` method allows you to send a data request to PokemonGo-Map.

```
$notifier->requestPokemonGoMapData();

```

### Expire Cached Items

[](#expire-cached-items)

The `expireCachedItems` method allows you to expire cached items that haven't been modified for a specified timeout, using a string as a parameter.

```
$notifier->expireCachedItems('-1 day');

```

### Send Slack Notification

[](#send-slack-notification)

The `sendSlackNotification` method allows you to send a Slack notification, using an array of Pokemon data, and a position object as parameters.

```
$notifier->sendSlackNotification(['pokemon_id' => '', 'pokemon_name' => '', 'latitude' => '', 'longitude' => '', 'disappear_time' => ''], new Cornford\Pokenotifier\Models\Position(0, 0));

```

### Process Pokemon

[](#process-pokemon)

The `processPokemon` method allows you to process an array of Pokemon's and optionally send a Slack notificaiton, using an array of Pokemon data, a position object, and a boolean for notification as parameters.

```
$notifier->processPokemon(['pokemons'=> []], new Cornford\Pokenotifier\Models\Position(0, 0), true);

```

### Load Application Configuration

[](#load-application-configuration)

The `loadApplicationConfiguration` method allows you to load the current application configuration file.

```
$notifier->loadApplicationConfiguration();

```

### Get Application Configuration

[](#get-application-configuration)

The `getApplicationConfiguration` method allows you to get the currently stored application configuration.

```
$notifier->getApplicationConfiguration();

```

### Load Pokemon Configuration

[](#load-pokemon-configuration)

The `loadPokemonConfiguration` method allows you to load the current Pokemon configuration file.

```
$notifier->loadPokemonConfiguration();

```

### Get Pokemon Configuration

[](#get-pokemon-configuration)

The `getPokemonConfiguration` method allows you to get the currently stored Pokemon configuration.

```
$notifier->getPokemonConfiguration();

```

### Create Guzzle Client

[](#create-guzzle-client)

The `createGuzzleClient` method allows you to instantiate a new Guzzle Client.

```
$notifier->createGuzzleClient();

```

### Get Guzzle Client

[](#get-guzzle-client)

The `getGuzzleClient` method allows you to get the currently instantiated Guzzle Client.

```
$notifier->getGuzzleClient();

```

### Set Guzzle Client

[](#set-guzzle-client)

The `setGuzzleClient` method allows you to store a new instantiation of Guzzle Client, using a client object as a parameter.

```
$notifier->setGuzzleClient(new GuzzleClient(['base_url' => 'http://www.google.com']));

```

### Create Slack Client

[](#create-slack-client)

The `createSlackClient` method allows you to instantiate a new Slack Client.

```
$notifier->createSlackClient();

```

### Get Slack Client

[](#get-slack-client)

The `getSlackClient` method allows you to get the currently instantiated Slack Client.

```
$notifier->getSlackClient();

```

### Set Slack Client

[](#set-slack-client)

The `setSlackClient` method allows you to store a new instantiation of Slack Client, using a client object as a parameter.

```
$notifier->setSlackClient(new SlackClient('https://hooks.slack.com/services/', [], $notifier->getGuzzleClient()));

```

### Create Directory Iterator

[](#create-directory-iterator)

The `createDirectoryIterator` method allows you to instantiate a new Directory Iterator.

```
$notifier->createDirectoryIterator();

```

### Get Directory Iterator

[](#get-directory-iterator)

The `getDirectoryIterator` method allows you to get the currently instantiated Directory Iterator.

```
$notifier->getDirectoryIterator();

```

### Set Directory Iterator

[](#set-directory-iterator)

The `setDirectoryIterator` method allows you to store a new instantiation of Directory Iterator, using a iterator object as a parameter.

```
$notifier->setDirectoryIterator('./cache');

```

Example
-------

[](#example)

For an example usage see `index.php`

### Webhook

[](#webhook)

You can run a webhook with PokemonGo-Map with the following command, where the `-wh` parameter is the location where the script is located. You can run a local webserver, listening locally to respond to webhook request.

```
sudo python /var/www/PokemonGo-Map/runserver.py -wh http://localhost?type=webhook

```

### Scan

[](#scan)

You can run a scan with PokemonGo-Map with the following command, where the post data contains both `lat` and `lon` parameters. You can run an application like Traccar Client, to send requests to your webserver for scan.

```
curl --data "lat=53.3811&lon=-1.4701" http://localhost?type=scan

```

### License

[](#license)

Pokenotifier is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3620d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2913887?v=4)[Bradley Cornford](/maintainers/bradcornford)[@bradcornford](https://github.com/bradcornford)

---

Tags

notificationslackmappokemonpokemon gonearby

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cornford-pokenotifier/health.svg)

```
[![Health](https://phpackages.com/badges/cornford-pokenotifier/health.svg)](https://phpackages.com/packages/cornford-pokenotifier)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.5k](/packages/aws-aws-sdk-php)[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NotifyX、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

686111.2k8](/packages/guanguans-notify)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k36](/packages/neuron-core-neuron-ai)[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.8M45](/packages/laravel-notification-channels-telegram)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[alek13/slack

A simple PHP package (fork of maknz/slack) for sending messages to Slack, with a focus on ease of use and elegant syntax.

1405.5M17](/packages/alek13-slack)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
