Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions examples/controller/Gap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

if (!defined('BASEPATH'))
exit('No direct script access allowed');

class Gap extends CI_Controller
{
private $gap_token;

public function __construct()
{
parent::__construct();
$this->gap_token = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; // Your Gap API Token
}

function index()
{
//------------------------------------------- Gap Messenger --------------------------------------//
$chat_id = "XXXXX"; // Chat id or Phone number +989...
include APPPATH . 'third_party/GAP/GapApi.php';
$gap = new GapMessenger\GapApi($this->gap_token);

$replyKeyboard = $gap->replyKeyboard([[['yes' => 'Yes'], ['no' => 'No']], [['cancel' => 'Cancel']]]);
// send text
$gap->sendText($chat_id, 'Hello world', $replyKeyboard);
//------------------------------------------- Gap Messanger --------------------------------------//


}

}
31 changes: 31 additions & 0 deletions examples/controller/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# ![gap](examples/assets/gap.png) Gap Messenger SDP API PHP

A PHP wrapper for the Gap Messenger SDP API.

## Requirements

- Codeigniter

## Get started

You will find everything you need to know to use this API in the [wiki](https://github.com/GapAfzar/Gap-SDP-API/wiki)

## Installation

copy Gap.php to controller
copy crc/GAP to controller/third_party

Enjoy!;

### What is Gap?
According to [Gap Messenger](https://gap.im/):

>

Gap is a messaging app with a focus on speed and security, it’s super fast, simple and free. You can use Gap on all your devices at the same time — your messages sync seamlessly across any of your phones, tablets or computers.

With Gap, you can send text, photos, videos and files of any type (doc, zip, mp3, etc), as well as create groups for up to 200 people. You can write to your phone contacts and find people by their usernames. As a result, Gap is like SMS and email combined — and can take care of all your personal or business messaging needs.

## License

MIT
Loading